// Universal Media Player
// Build Date: 2026-01-30T19:38:53.098Z
// Commit: 75884aebb03ddf20d0879c90fb05c5f038daafb5
// Build Number: 20260130.01

/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let R8=class extends Event{constructor(o,s,c){super("context-request",{bubbles:!0,composed:!0}),this.context=o,this.callback=s,this.subscribe=c??!1}};/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 *//**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let N8=class{constructor(o,s,c,h){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(d,m)=>{this.unsubscribe&&(this.unsubscribe!==m&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=d,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(d,m)),this.unsubscribe=m},this.host=o,s.context!==void 0){const d=s;this.context=d.context,this.callback=d.callback,this.subscribe=d.subscribe??!1}else this.context=s,this.callback=c,this.subscribe=h??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new R8(this.context,this.t,this.subscribe))}};/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let rV=class{get value(){return this.o}set value(o){this.setValue(o)}setValue(o,s=!1){const c=s||!Object.is(o,this.o);this.o=o,c&&this.updateObservers()}constructor(o){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:c}]of this.subscriptions)s(this.o,c)},o!==void 0&&(this.value=o)}addCallback(o,s,c){if(!c)return void o(this.value);this.subscriptions.has(o)||this.subscriptions.set(o,{disposer:()=>{this.subscriptions.delete(o)},consumerHost:s});const{disposer:h}=this.subscriptions.get(o);o(this.value,h)}clearCallbacks(){this.subscriptions.clear()}};/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let iV=class extends Event{constructor(o){super("context-provider",{bubbles:!0,composed:!0}),this.context=o}},Sx=class extends rV{constructor(o,s,c){var h,d;super(s.context!==void 0?s.initialValue:c),this.onContextRequest=m=>{const b=m.composedPath()[0];m.context===this.context&&b!==this.host&&(m.stopPropagation(),this.addCallback(m.callback,b,m.subscribe))},this.onProviderRequest=m=>{const b=m.composedPath()[0];if(m.context!==this.context||b===this.host)return;const f=new Set;for(const[A,{consumerHost:M}]of this.subscriptions)f.has(A)||(f.add(A),M.dispatchEvent(new R8(this.context,A,!0)));m.stopPropagation()},this.host=o,s.context!==void 0?this.context=s.context:this.context=s,this.attachListeners(),(d=(h=this.host).addController)==null||d.call(h,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new iV(this.context))}};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function aV({context:o}){return(s,c)=>{const h=new WeakMap;if(typeof c=="object")return c.addInitializer(function(){h.set(this,new Sx(this,{context:o}))}),{get(){return s.get.call(this)},set(d){var m;return(m=h.get(this))==null||m.setValue(d),s.set.call(this,d)},init(d){var m;return(m=h.get(this))==null||m.setValue(d),d}};{s.constructor.addInitializer(b=>{h.set(b,new Sx(b,{context:o}))});const d=Object.getOwnPropertyDescriptor(s,c);let m;if(d===void 0){const b=new WeakMap;m={get(){return b.get(this)},set(f){h.get(this).setValue(f),b.set(this,f)},configurable:!0,enumerable:!0}}else{const b=d.set;m={...d,set(f){h.get(this).setValue(f),b?.call(this,f)}}}return void Object.defineProperty(s,c,m)}}}/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function Tr({context:o,subscribe:s}){return(c,h)=>{typeof h=="object"?h.addInitializer(function(){new N8(this,{context:o,callback:d=>{c.set.call(this,d)},subscribe:s})}):c.constructor.addInitializer(d=>{new N8(d,{context:o,callback:m=>{d[h]=m},subscribe:s})})}}var oV=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function O8(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var U8={};/*! codem-isoboxer v0.3.10 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */(function(o){var s={};s.parseBuffer=function(d){return new c(d).parse()},s.addBoxProcessor=function(d,m){typeof d!="string"||typeof m!="function"||(h.prototype._boxProcessors[d]=m)},s.createFile=function(){return new c},s.createBox=function(d,m,b){var f=h.create(d);return m&&m.append(f,b),f},s.createFullBox=function(d,m,b){var f=s.createBox(d,m,b);return f.version=0,f.flags=0,f},s.Utils={},s.Utils.dataViewToString=function(d,m){var b=m||"utf-8";if(typeof TextDecoder<"u")return new TextDecoder(b).decode(d);var f=[],A=0;if(b==="utf-8")for(;A<d.byteLength;){var M=d.getUint8(A++);M<128||(M<224?(M=(M&31)<<6,M|=d.getUint8(A++)&63):M<240?(M=(M&15)<<12,M|=(d.getUint8(A++)&63)<<6,M|=d.getUint8(A++)&63):(M=(M&7)<<18,M|=(d.getUint8(A++)&63)<<12,M|=(d.getUint8(A++)&63)<<6,M|=d.getUint8(A++)&63)),f.push(String.fromCharCode(M))}else for(;A<d.byteLength;)f.push(String.fromCharCode(d.getUint8(A++)));return f.join("")},s.Utils.utf8ToByteArray=function(d){var m,b;if(typeof TextEncoder<"u")m=new TextEncoder().encode(d);else for(m=[],b=0;b<d.length;++b){var f=d.charCodeAt(b);f<128?m.push(f):f<2048?(m.push(192|f>>6),m.push(128|63&f)):f<65536?(m.push(224|f>>12),m.push(128|63&f>>6),m.push(128|63&f)):(m.push(240|f>>18),m.push(128|63&f>>12),m.push(128|63&f>>6),m.push(128|63&f))}return m},s.Utils.appendBox=function(d,m,b){if(m._offset=d._cursor.offset,m._root=d._root?d._root:d,m._raw=d._raw,m._parent=d,b!==-1){if(b==null){d.boxes.push(m);return}var f=-1,A;if(typeof b=="number")f=b;else{if(typeof b=="string")A=b;else if(typeof b=="object"&&b.type)A=b.type;else{d.boxes.push(m);return}for(var M=0;M<d.boxes.length;M++)if(A===d.boxes[M].type){f=M+1;break}}d.boxes.splice(f,0,m)}},o.parseBuffer=s.parseBuffer,o.addBoxProcessor=s.addBoxProcessor,o.createFile=s.createFile,o.createBox=s.createBox,o.createFullBox=s.createFullBox,o.Utils=s.Utils,s.Cursor=function(d){this.offset=typeof d>"u"?0:d};var c=function(d){this._cursor=new s.Cursor,this.boxes=[],d&&(this._raw=new DataView(d))};c.prototype.fetch=function(d){var m=this.fetchAll(d,!0);return m.length?m[0]:null},c.prototype.fetchAll=function(d,m){var b=[];return c._sweep.call(this,d,b,m),b},c.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var d=h.parse(this);if(typeof d.type>"u")break;this.boxes.push(d)}return this},c._sweep=function(d,m,b){this.type&&this.type==d&&m.push(this);for(var f in this.boxes){if(m.length&&b)return;c._sweep.call(this.boxes[f],d,m,b)}},c.prototype.write=function(){var d=0,m;for(m=0;m<this.boxes.length;m++)d+=this.boxes[m].getLength(!1);var b=new Uint8Array(d);for(this._rawo=new DataView(b.buffer),this.bytes=b,this._cursor.offset=0,m=0;m<this.boxes.length;m++)this.boxes[m].write();return b.buffer},c.prototype.append=function(d,m){s.Utils.appendBox(this,d,m)};var h=function(){this._cursor=new s.Cursor};h.parse=function(d){var m=new h;return m._offset=d._cursor.offset,m._root=d._root?d._root:d,m._raw=d._raw,m._parent=d,m._parseBox(),d._cursor.offset=m._raw.byteOffset+m._raw.byteLength,m},h.create=function(d){var m=new h;return m.type=d,m.boxes=[],m},h.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca","meta","grpl","prsl"],h.prototype._boxProcessors={},h.prototype._procField=function(d,m,b){this._parsing?this[d]=this._readField(m,b):this._writeField(m,b,this[d])},h.prototype._procFieldArray=function(d,m,b,f){var A;if(this._parsing)for(this[d]=[],A=0;A<m;A++)this[d][A]=this._readField(b,f);else for(A=0;A<this[d].length;A++)this._writeField(b,f,this[d][A])},h.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},h.prototype._procEntries=function(d,m,b){var f;if(this._parsing)for(this[d]=[],f=0;f<m;f++)this[d].push({}),b.call(this,this[d][f]);else for(f=0;f<m;f++)b.call(this,this[d][f])},h.prototype._procSubEntries=function(d,m,b,f){var A;if(this._parsing)for(d[m]=[],A=0;A<b;A++)d[m].push({}),f.call(this,d[m][A]);else for(A=0;A<b;A++)f.call(this,d[m][A])},h.prototype._procEntryField=function(d,m,b,f){this._parsing?d[m]=this._readField(b,f):this._writeField(b,f,d[m])},h.prototype._procSubBoxes=function(d,m){var b;if(this._parsing)for(this[d]=[],b=0;b<m;b++)this[d].push(h.parse(this));else for(b=0;b<m;b++)this._rawo?this[d][b].write():this.size+=this[d][b].getLength()},h.prototype._readField=function(d,m){switch(d){case"uint":return this._readUint(m);case"int":return this._readInt(m);case"template":return this._readTemplate(m);case"string":return m===-1?this._readTerminatedString():this._readString(m);case"data":return this._readData(m);case"utf8":return this._readUTF8String();case"utf8string":return this._readUTF8TerminatedString();default:return-1}},h.prototype._readInt=function(d){var m=null,b=this._cursor.offset-this._raw.byteOffset;switch(d){case 8:m=this._raw.getInt8(b);break;case 16:m=this._raw.getInt16(b);break;case 32:m=this._raw.getInt32(b);break;case 64:var f=this._raw.getInt32(b),A=this._raw.getInt32(b+4);m=f*Math.pow(2,32)+A;break}return this._cursor.offset+=d>>3,m},h.prototype._readUint=function(d){var m=null,b=this._cursor.offset-this._raw.byteOffset,f,A;switch(d){case 8:m=this._raw.getUint8(b);break;case 16:m=this._raw.getUint16(b);break;case 24:f=this._raw.getUint16(b),A=this._raw.getUint8(b+2),m=(f<<8)+A;break;case 32:m=this._raw.getUint32(b);break;case 64:f=this._raw.getUint32(b),A=this._raw.getUint32(b+4),m=f*Math.pow(2,32)+A;break}return this._cursor.offset+=d>>3,m},h.prototype._readString=function(d){for(var m="",b=0;b<d;b++){var f=this._readUint(8);m+=String.fromCharCode(f)}return m},h.prototype._readTemplate=function(d){var m=this._readUint(d/2),b=this._readUint(d/2);return m+b/Math.pow(2,d/2)},h.prototype._readTerminatedString=function(){for(var d="";this._cursor.offset-this._offset<this._raw.byteLength;){var m=this._readUint(8);if(m===0)break;d+=String.fromCharCode(m)}return d},h.prototype._readData=function(d){var m=d>0?d:this._raw.byteLength-(this._cursor.offset-this._offset);if(m>0){var b=new Uint8Array(this._raw.buffer,this._cursor.offset,m);return this._cursor.offset+=m,b}else return null},h.prototype._readUTF8String=function(){var d=this._raw.byteLength-(this._cursor.offset-this._offset),m=null;return d>0&&(m=new DataView(this._raw.buffer,this._cursor.offset,d),this._cursor.offset+=d),m&&s.Utils.dataViewToString(m)},h.prototype._readUTF8TerminatedString=function(){var d=this._raw.byteLength-(this._cursor.offset-this._offset),m=null;if(d>0){m=new DataView(this._raw.buffer,this._cursor.offset,d);var b;for(b=0;b<d&&m.getUint8(b)!==0;b++);m=new DataView(this._raw.buffer,this._cursor.offset,b),this._cursor.offset+=Math.min(b+1,d)}return m&&s.Utils.dataViewToString(m)},h.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength){this._root._incomplete=!0;return}switch(this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1?this._parseContainerBox():this._data=this._readData())},h.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},h.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(h.parse(this))},h.prototype.append=function(d,m){s.Utils.appendBox(this,d,m)},h.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1)for(var d=0;d<this.boxes.length;d++)this.size+=this.boxes[d].getLength();return this._data&&this._writeData(this._data),this.size},h.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1)for(var d=0;d<this.boxes.length;d++)this.boxes[d].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},h.prototype._writeInt=function(d,m){if(this._rawo){var b=this._cursor.offset-this._rawo.byteOffset;switch(d){case 8:this._rawo.setInt8(b,m);break;case 16:this._rawo.setInt16(b,m);break;case 32:this._rawo.setInt32(b,m);break;case 64:var f=Math.floor(m/Math.pow(2,32)),A=m-f*Math.pow(2,32);this._rawo.setUint32(b,f),this._rawo.setUint32(b+4,A);break}this._cursor.offset+=d>>3}else this.size+=d>>3},h.prototype._writeUint=function(d,m){if(this._rawo){var b=this._cursor.offset-this._rawo.byteOffset,f,A;switch(d){case 8:this._rawo.setUint8(b,m);break;case 16:this._rawo.setUint16(b,m);break;case 24:f=(m&16776960)>>8,A=m&255,this._rawo.setUint16(b,f),this._rawo.setUint8(b+2,A);break;case 32:this._rawo.setUint32(b,m);break;case 64:f=Math.floor(m/Math.pow(2,32)),A=m-f*Math.pow(2,32),this._rawo.setUint32(b,f),this._rawo.setUint32(b+4,A);break}this._cursor.offset+=d>>3}else this.size+=d>>3},h.prototype._writeString=function(d,m){for(var b=0;b<d;b++)this._writeUint(8,m.charCodeAt(b))},h.prototype._writeTerminatedString=function(d){if(d.length!==0){for(var m=0;m<d.length;m++)this._writeUint(8,d.charCodeAt(m));this._writeUint(8,0)}},h.prototype._writeTemplate=function(d,m){var b=Math.floor(m),f=(m-b)*Math.pow(2,d/2);this._writeUint(d/2,b),this._writeUint(d/2,f)},h.prototype._writeData=function(d){var m;if(d)if(this._rawo){if(d instanceof Array){for(var b=this._cursor.offset-this._rawo.byteOffset,m=0;m<d.length;m++)this._rawo.setInt8(b+m,d[m]);this._cursor.offset+=d.length}d instanceof Uint8Array&&(this._root.bytes.set(d,this._cursor.offset),this._cursor.offset+=d.length)}else this.size+=d.length},h.prototype._writeUTF8String=function(d){var m=s.Utils.utf8ToByteArray(d);if(this._rawo)for(var b=new DataView(this._rawo.buffer,this._cursor.offset,m.length),f=0;f<m.length;f++)b.setUint8(f,m[f]);else this.size+=m.length},h.prototype._writeField=function(d,m,b){switch(d){case"uint":this._writeUint(m,b);break;case"int":this._writeInt(m,b);break;case"template":this._writeTemplate(m,b);break;case"string":m==-1?this._writeTerminatedString(b):this._writeString(m,b);break;case"data":this._writeData(b);break;case"utf8":this._writeUTF8String(b);break}},h.prototype._boxProcessors.ardi=function(){this._procFullBox(),this._procField("audio_rendering_indication","uint",8)},h.prototype._boxProcessors.avc1=h.prototype._boxProcessors.avc2=h.prototype._boxProcessors.avc3=h.prototype._boxProcessors.avc4=h.prototype._boxProcessors.hvc1=h.prototype._boxProcessors.hev1=h.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},h.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(d){this._procEntryField(d,"sample_count","uint",32),this._procEntryField(d,"sample_offset",this.version===1?"int":"uint",32)})},h.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},h.prototype._boxProcessors.elng=function(){this._procFullBox(),this._procField("extended_language","utf8string")},h.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(d){this._procEntryField(d,"segment_duration","uint",this.version===1?64:32),this._procEntryField(d,"media_time","int",this.version===1?64:32),this._procEntryField(d,"media_rate_integer","int",16),this._procEntryField(d,"media_rate_fraction","int",16)})},h.prototype._boxProcessors.emsg=function(){this._procFullBox(),this.version==1?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},h.prototype._boxProcessors.free=h.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},h.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},h.prototype._boxProcessors.ftyp=h.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var d=-1;this._parsing&&(d=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",d,"string",4)},h.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},h.prototype._boxProcessors.imda=function(){this._procField("imda_identifier","uint",32),this._procField("data","data",-1)},h.prototype._boxProcessors.kind=function(){this._procFullBox(),this._procField("schemeURI","utf8string"),this._procField("value","utf8string")},h.prototype._boxProcessors.labl=function(){this._procFullBox(),this.is_group_label=(this.flags&1)!=0,this._procField("label_id","uint",16),this._procField("language","utf8string"),this._procField("label","utf8string")},h.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},h.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",this.version==1?64:32),!this._parsing&&typeof this.language=="string"&&(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode((this.language>>10&31)+96,(this.language>>5&31)+96,(this.language&31)+96)),this._procField("pre_defined","uint",16)},h.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",this.version==1?64:32)},h.prototype._boxProcessors.meta=function(){this._procFullBox()},h.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},h.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},h.prototype._boxProcessors.mp4a=h.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},h.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},h.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},h.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",this.version==1?64:32)},h.prototype._boxProcessors.prsl=function(){this._procFullBox(),this._procField("group_id","uint",32),this._procField("num_entities_in_group","uint",32),this._procEntries("entities",this.num_entities_in_group,function(d){this._procEntryField(d,"entity_id","uint",32)}),this.flags&4096&&this._procField("preselection_tag","utf8string"),this.flags&8192&&this._procField("selection_priority","uint",8),this.flags&16384&&this._procField("interleaving_tag","utf8string")},h.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},h.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),this.flags&1&&this._procField("scheme_uri","string",-1)},h.prototype._boxProcessors.sdtp=function(){this._procFullBox();var d=-1;this._parsing&&(d=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",d,"uint",8)},h.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",this.version==1?64:32),this._procField("first_offset","uint",this.version==1?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(d){this._parsing||(d.reference=(d.reference_type&1)<<31,d.reference|=d.referenced_size&2147483647,d.sap=(d.starts_with_SAP&1)<<31,d.sap|=(d.SAP_type&3)<<28,d.sap|=d.SAP_delta_time&268435455),this._procEntryField(d,"reference","uint",32),this._procEntryField(d,"subsegment_duration","uint",32),this._procEntryField(d,"sap","uint",32),this._parsing&&(d.reference_type=d.reference>>31&1,d.referenced_size=d.reference&2147483647,d.starts_with_SAP=d.sap>>31&1,d.SAP_type=d.sap>>28&7,d.SAP_delta_time=d.sap&268435455)})},h.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},h.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(d){this._procEntryField(d,"ranges_count","uint",32),this._procSubEntries(d,"ranges",d.ranges_count,function(m){this._procEntryField(m,"level","uint",8),this._procEntryField(m,"range_size","uint",24)})})},h.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},h.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},h.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(d){this._procEntryField(d,"sample_count","uint",32),this._procEntryField(d,"sample_delta","uint",32)})},h.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(d){this._procEntryField(d,"sample_delta","uint",32),this._procEntryField(d,"subsample_count","uint",16),this._procSubEntries(d,"subsamples",d.subsample_count,function(m){this._procEntryField(m,"subsample_size","uint",this.version===1?32:16),this._procEntryField(m,"subsample_priority","uint",8),this._procEntryField(m,"discardable","uint",8),this._procEntryField(m,"codec_specific_parameters","uint",32)})})},h.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},h.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",this.version==1?64:32)},h.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),this.flags&1&&this._procField("base_data_offset","uint",64),this.flags&2&&this._procField("sample_description_offset","uint",32),this.flags&8&&this._procField("default_sample_duration","uint",32),this.flags&16&&this._procField("default_sample_size","uint",32),this.flags&32&&this._procField("default_sample_flags","uint",32)},h.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(this.length_size_of_traf_num&48)<<4,this.reserved|=(this.length_size_of_trun_num&12)<<2,this.reserved|=this.length_size_of_sample_num&3),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(this.reserved&48)>>4,this.length_size_of_trun_num=(this.reserved&12)>>2,this.length_size_of_sample_num=this.reserved&3),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(d){this._procEntryField(d,"time","uint",this.version===1?64:32),this._procEntryField(d,"moof_offset","uint",this.version===1?64:32),this._procEntryField(d,"traf_number","uint",(this.length_size_of_traf_num+1)*8),this._procEntryField(d,"trun_number","uint",(this.length_size_of_trun_num+1)*8),this._procEntryField(d,"sample_number","uint",(this.length_size_of_sample_num+1)*8)})},h.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},h.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},h.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),this.flags&1&&this._procField("data_offset","int",32),this.flags&4&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(d){this.flags&256&&this._procEntryField(d,"sample_duration","uint",32),this.flags&512&&this._procEntryField(d,"sample_size","uint",32),this.flags&1024&&this._procEntryField(d,"sample_flags","uint",32),this.flags&2048&&this._procEntryField(d,"sample_composition_time_offset",this.version===1?"int":"uint",32)})},h.prototype._boxProcessors["url "]=h.prototype._boxProcessors["urn "]=function(){this._procFullBox(),this.type==="urn "&&this._procField("name","string",-1),this._procField("location","string",-1)},h.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},h.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},h.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},h.prototype._boxProcessors.vtte=function(){}})(U8);const sV=O8(U8);/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const p0=globalThis,kx=p0.ShadowRoot&&(p0.ShadyCSS===void 0||p0.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Tx=Symbol(),F8=new WeakMap;let j8=class{constructor(o,s,c){if(this._$cssResult$=!0,c!==Tx)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=o,this.t=s}get styleSheet(){let o=this.o;const s=this.t;if(kx&&o===void 0){const c=s!==void 0&&s.length===1;c&&(o=F8.get(s)),o===void 0&&((this.o=o=new CSSStyleSheet).replaceSync(this.cssText),c&&F8.set(s,o))}return o}toString(){return this.cssText}};const Ax=o=>new j8(typeof o=="string"?o:o+"",void 0,Tx),Cn=(o,...s)=>{const c=o.length===1?o[0]:s.reduce((h,d,m)=>h+(b=>{if(b._$cssResult$===!0)return b.cssText;if(typeof b=="number")return b;throw Error("Value passed to 'css' function must be a 'css' function result: "+b+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(d)+o[m+1],o[0]);return new j8(c,o,Tx)},uV=(o,s)=>{if(kx)o.adoptedStyleSheets=s.map(c=>c instanceof CSSStyleSheet?c:c.styleSheet);else for(const c of s){const h=document.createElement("style"),d=p0.litNonce;d!==void 0&&h.setAttribute("nonce",d),h.textContent=c.cssText,o.appendChild(h)}},B8=kx?o=>o:o=>o instanceof CSSStyleSheet?(s=>{let c="";for(const h of s.cssRules)c+=h.cssText;return Ax(c)})(o):o;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const{is:lV,defineProperty:cV,getOwnPropertyDescriptor:dV,getOwnPropertyNames:pV,getOwnPropertySymbols:hV,getPrototypeOf:fV}=Object,Sd=globalThis,V8=Sd.trustedTypes,gV=V8?V8.emptyScript:"",$8=Sd.reactiveElementPolyfillSupport,lf=(o,s)=>o,h0={toAttribute(o,s){switch(s){case Boolean:o=o?gV:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,s){let c=o;switch(s){case Boolean:c=o!==null;break;case Number:c=o===null?null:Number(o);break;case Object:case Array:try{c=JSON.parse(o)}catch{c=null}}return c}},Ex=(o,s)=>!lV(o,s),z8={attribute:!0,type:String,converter:h0,reflect:!1,hasChanged:Ex};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Sd.litPropertyMetadata??(Sd.litPropertyMetadata=new WeakMap);class kd extends HTMLElement{static addInitializer(s){this._$Ei(),(this.l??(this.l=[])).push(s)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(s,c=z8){if(c.state&&(c.attribute=!1),this._$Ei(),this.elementProperties.set(s,c),!c.noAccessor){const h=Symbol(),d=this.getPropertyDescriptor(s,h,c);d!==void 0&&cV(this.prototype,s,d)}}static getPropertyDescriptor(s,c,h){const{get:d,set:m}=dV(this.prototype,s)??{get(){return this[c]},set(b){this[c]=b}};return{get(){return d?.call(this)},set(b){const f=d?.call(this);m.call(this,b),this.requestUpdate(s,f,h)},configurable:!0,enumerable:!0}}static getPropertyOptions(s){return this.elementProperties.get(s)??z8}static _$Ei(){if(this.hasOwnProperty(lf("elementProperties")))return;const s=fV(this);s.finalize(),s.l!==void 0&&(this.l=[...s.l]),this.elementProperties=new Map(s.elementProperties)}static finalize(){if(this.hasOwnProperty(lf("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(lf("properties"))){const c=this.properties,h=[...pV(c),...hV(c)];for(const d of h)this.createProperty(d,c[d])}const s=this[Symbol.metadata];if(s!==null){const c=litPropertyMetadata.get(s);if(c!==void 0)for(const[h,d]of c)this.elementProperties.set(h,d)}this._$Eh=new Map;for(const[c,h]of this.elementProperties){const d=this._$Eu(c,h);d!==void 0&&this._$Eh.set(d,c)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const c=[];if(Array.isArray(s)){const h=new Set(s.flat(1/0).reverse());for(const d of h)c.unshift(B8(d))}else s!==void 0&&c.push(B8(s));return c}static _$Eu(s,c){const h=c.attribute;return h===!1?void 0:typeof h=="string"?h:typeof s=="string"?s.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var s;this._$ES=new Promise(c=>this.enableUpdating=c),this._$AL=new Map,this._$E_(),this.requestUpdate(),(s=this.constructor.l)==null||s.forEach(c=>c(this))}addController(s){var c;(this._$EO??(this._$EO=new Set)).add(s),this.renderRoot!==void 0&&this.isConnected&&((c=s.hostConnected)==null||c.call(s))}removeController(s){var c;(c=this._$EO)==null||c.delete(s)}_$E_(){const s=new Map,c=this.constructor.elementProperties;for(const h of c.keys())this.hasOwnProperty(h)&&(s.set(h,this[h]),delete this[h]);s.size>0&&(this._$Ep=s)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return uV(s,this.constructor.elementStyles),s}connectedCallback(){var s;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(s=this._$EO)==null||s.forEach(c=>{var h;return(h=c.hostConnected)==null?void 0:h.call(c)})}enableUpdating(s){}disconnectedCallback(){var s;(s=this._$EO)==null||s.forEach(c=>{var h;return(h=c.hostDisconnected)==null?void 0:h.call(c)})}attributeChangedCallback(s,c,h){this._$AK(s,h)}_$EC(s,c){var h;const d=this.constructor.elementProperties.get(s),m=this.constructor._$Eu(s,d);if(m!==void 0&&d.reflect===!0){const b=(((h=d.converter)==null?void 0:h.toAttribute)!==void 0?d.converter:h0).toAttribute(c,d.type);this._$Em=s,b==null?this.removeAttribute(m):this.setAttribute(m,b),this._$Em=null}}_$AK(s,c){var h;const d=this.constructor,m=d._$Eh.get(s);if(m!==void 0&&this._$Em!==m){const b=d.getPropertyOptions(m),f=typeof b.converter=="function"?{fromAttribute:b.converter}:((h=b.converter)==null?void 0:h.fromAttribute)!==void 0?b.converter:h0;this._$Em=m,this[m]=f.fromAttribute(c,b.type),this._$Em=null}}requestUpdate(s,c,h){if(s!==void 0){if(h??(h=this.constructor.getPropertyOptions(s)),!(h.hasChanged??Ex)(this[s],c))return;this.P(s,c,h)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(s,c,h){this._$AL.has(s)||this._$AL.set(s,c),h.reflect===!0&&this._$Em!==s&&(this._$Ej??(this._$Ej=new Set)).add(s)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(c){Promise.reject(c)}const s=this.scheduleUpdate();return s!=null&&await s,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[m,b]of this._$Ep)this[m]=b;this._$Ep=void 0}const d=this.constructor.elementProperties;if(d.size>0)for(const[m,b]of d)b.wrapped!==!0||this._$AL.has(m)||this[m]===void 0||this.P(m,this[m],b)}let c=!1;const h=this._$AL;try{c=this.shouldUpdate(h),c?(this.willUpdate(h),(s=this._$EO)==null||s.forEach(d=>{var m;return(m=d.hostUpdate)==null?void 0:m.call(d)}),this.update(h)):this._$EU()}catch(d){throw c=!1,this._$EU(),d}c&&this._$AE(h)}willUpdate(s){}_$AE(s){var c;(c=this._$EO)==null||c.forEach(h=>{var d;return(d=h.hostUpdated)==null?void 0:d.call(h)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(s)),this.updated(s)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(s){return!0}update(s){this._$Ej&&(this._$Ej=this._$Ej.forEach(c=>this._$EC(c,this[c]))),this._$EU()}updated(s){}firstUpdated(s){}}kd.elementStyles=[],kd.shadowRootOptions={mode:"open"},kd[lf("elementProperties")]=new Map,kd[lf("finalized")]=new Map,$8?.({ReactiveElement:kd}),(Sd.reactiveElementVersions??(Sd.reactiveElementVersions=[])).push("2.0.4");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const f0=globalThis,g0=f0.trustedTypes,H8=g0?g0.createPolicy("lit-html",{createHTML:o=>o}):void 0,q8="$lit$",Js=`lit$${Math.random().toFixed(9).slice(2)}$`,G8="?"+Js,mV=`<${G8}>`,ml=document,cf=()=>ml.createComment(""),df=o=>o===null||typeof o!="object"&&typeof o!="function",Cx=Array.isArray,vV=o=>Cx(o)||typeof o?.[Symbol.iterator]=="function",Ix=`[ 	
\f\r]`,pf=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,K8=/-->/g,W8=/>/g,vl=RegExp(`>|${Ix}(?:([^\\s"'>=/]+)(${Ix}*=${Ix}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`,"g"),X8=/'/g,Y8=/"/g,J8=/^(?:script|style|textarea|title)$/i,yV=o=>(s,...c)=>({_$litType$:o,strings:s,values:c}),St=yV(1),Qs=Symbol.for("lit-noChange"),sr=Symbol.for("lit-nothing"),Q8=new WeakMap,yl=ml.createTreeWalker(ml,129);function Z8(o,s){if(!Cx(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return H8!==void 0?H8.createHTML(s):s}const bV=(o,s)=>{const c=o.length-1,h=[];let d,m=s===2?"<svg>":s===3?"<math>":"",b=pf;for(let f=0;f<c;f++){const A=o[f];let M,D,N=-1,F=0;for(;F<A.length&&(b.lastIndex=F,D=b.exec(A),D!==null);)F=b.lastIndex,b===pf?D[1]==="!--"?b=K8:D[1]!==void 0?b=W8:D[2]!==void 0?(J8.test(D[2])&&(d=RegExp("</"+D[2],"g")),b=vl):D[3]!==void 0&&(b=vl):b===vl?D[0]===">"?(b=d??pf,N=-1):D[1]===void 0?N=-2:(N=b.lastIndex-D[2].length,M=D[1],b=D[3]===void 0?vl:D[3]==='"'?Y8:X8):b===Y8||b===X8?b=vl:b===K8||b===W8?b=pf:(b=vl,d=void 0);const L=b===vl&&o[f+1].startsWith("/>")?" ":"";m+=b===pf?A+mV:N>=0?(h.push(M),A.slice(0,N)+q8+A.slice(N)+Js+L):A+Js+(N===-2?f:L)}return[Z8(o,m+(o[c]||"<?>")+(s===2?"</svg>":s===3?"</math>":"")),h]};class jg{constructor({strings:s,_$litType$:c},h){let d;this.parts=[];let m=0,b=0;const f=s.length-1,A=this.parts,[M,D]=bV(s,c);if(this.el=jg.createElement(M,h),yl.currentNode=this.el.content,c===2||c===3){const N=this.el.content.firstChild;N.replaceWith(...N.childNodes)}for(;(d=yl.nextNode())!==null&&A.length<f;){if(d.nodeType===1){if(d.hasAttributes())for(const N of d.getAttributeNames())if(N.endsWith(q8)){const F=D[b++],L=d.getAttribute(N).split(Js),w=/([.?@])?(.*)/.exec(F);A.push({type:1,index:m,name:w[2],strings:L,ctor:w[1]==="."?xV:w[1]==="?"?SV:w[1]==="@"?kV:m0}),d.removeAttribute(N)}else N.startsWith(Js)&&(A.push({type:6,index:m}),d.removeAttribute(N));if(J8.test(d.tagName)){const N=d.textContent.split(Js),F=N.length-1;if(F>0){d.textContent=g0?g0.emptyScript:"";for(let L=0;L<F;L++)d.append(N[L],cf()),yl.nextNode(),A.push({type:2,index:++m});d.append(N[F],cf())}}}else if(d.nodeType===8)if(d.data===G8)A.push({type:2,index:m});else{let N=-1;for(;(N=d.data.indexOf(Js,N+1))!==-1;)A.push({type:7,index:m}),N+=Js.length-1}m++}}static createElement(s,c){const h=ml.createElement("template");return h.innerHTML=s,h}}function Td(o,s,c=o,h){var d,m;if(s===Qs)return s;let b=h!==void 0?(d=c.o)==null?void 0:d[h]:c.l;const f=df(s)?void 0:s._$litDirective$;return b?.constructor!==f&&((m=b?._$AO)==null||m.call(b,!1),f===void 0?b=void 0:(b=new f(o),b._$AT(o,c,h)),h!==void 0?(c.o??(c.o=[]))[h]=b:c.l=b),b!==void 0&&(s=Td(o,b._$AS(o,s.values),b,h)),s}let wV=class{constructor(o,s){this._$AV=[],this._$AN=void 0,this._$AD=o,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(o){const{el:{content:s},parts:c}=this._$AD,h=(o?.creationScope??ml).importNode(s,!0);yl.currentNode=h;let d=yl.nextNode(),m=0,b=0,f=c[0];for(;f!==void 0;){if(m===f.index){let A;f.type===2?A=new Bg(d,d.nextSibling,this,o):f.type===1?A=new f.ctor(d,f.name,f.strings,this,o):f.type===6&&(A=new TV(d,this,o)),this._$AV.push(A),f=c[++b]}m!==f?.index&&(d=yl.nextNode(),m++)}return yl.currentNode=ml,h}p(o){let s=0;for(const c of this._$AV)c!==void 0&&(c.strings!==void 0?(c._$AI(o,c,s),s+=c.strings.length-2):c._$AI(o[s])),s++}};class Bg{get _$AU(){var s;return((s=this._$AM)==null?void 0:s._$AU)??this.v}constructor(s,c,h,d){this.type=2,this._$AH=sr,this._$AN=void 0,this._$AA=s,this._$AB=c,this._$AM=h,this.options=d,this.v=d?.isConnected??!0}get parentNode(){let s=this._$AA.parentNode;const c=this._$AM;return c!==void 0&&s?.nodeType===11&&(s=c.parentNode),s}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(s,c=this){s=Td(this,s,c),df(s)?s===sr||s==null||s===""?(this._$AH!==sr&&this._$AR(),this._$AH=sr):s!==this._$AH&&s!==Qs&&this._(s):s._$litType$!==void 0?this.$(s):s.nodeType!==void 0?this.T(s):vV(s)?this.k(s):this._(s)}O(s){return this._$AA.parentNode.insertBefore(s,this._$AB)}T(s){this._$AH!==s&&(this._$AR(),this._$AH=this.O(s))}_(s){this._$AH!==sr&&df(this._$AH)?this._$AA.nextSibling.data=s:this.T(ml.createTextNode(s)),this._$AH=s}$(s){var c;const{values:h,_$litType$:d}=s,m=typeof d=="number"?this._$AC(s):(d.el===void 0&&(d.el=jg.createElement(Z8(d.h,d.h[0]),this.options)),d);if(((c=this._$AH)==null?void 0:c._$AD)===m)this._$AH.p(h);else{const b=new wV(m,this),f=b.u(this.options);b.p(h),this.T(f),this._$AH=b}}_$AC(s){let c=Q8.get(s.strings);return c===void 0&&Q8.set(s.strings,c=new jg(s)),c}k(s){Cx(this._$AH)||(this._$AH=[],this._$AR());const c=this._$AH;let h,d=0;for(const m of s)d===c.length?c.push(h=new Bg(this.O(cf()),this.O(cf()),this,this.options)):h=c[d],h._$AI(m),d++;d<c.length&&(this._$AR(h&&h._$AB.nextSibling,d),c.length=d)}_$AR(s=this._$AA.nextSibling,c){var h;for((h=this._$AP)==null?void 0:h.call(this,!1,!0,c);s&&s!==this._$AB;){const d=s.nextSibling;s.remove(),s=d}}setConnected(s){var c;this._$AM===void 0&&(this.v=s,(c=this._$AP)==null||c.call(this,s))}}class m0{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(s,c,h,d,m){this.type=1,this._$AH=sr,this._$AN=void 0,this.element=s,this.name=c,this._$AM=d,this.options=m,h.length>2||h[0]!==""||h[1]!==""?(this._$AH=Array(h.length-1).fill(new String),this.strings=h):this._$AH=sr}_$AI(s,c=this,h,d){const m=this.strings;let b=!1;if(m===void 0)s=Td(this,s,c,0),b=!df(s)||s!==this._$AH&&s!==Qs,b&&(this._$AH=s);else{const f=s;let A,M;for(s=m[0],A=0;A<m.length-1;A++)M=Td(this,f[h+A],c,A),M===Qs&&(M=this._$AH[A]),b||(b=!df(M)||M!==this._$AH[A]),M===sr?s=sr:s!==sr&&(s+=(M??"")+m[A+1]),this._$AH[A]=M}b&&!d&&this.j(s)}j(s){s===sr?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,s??"")}}class xV extends m0{constructor(){super(...arguments),this.type=3}j(s){this.element[this.name]=s===sr?void 0:s}}class SV extends m0{constructor(){super(...arguments),this.type=4}j(s){this.element.toggleAttribute(this.name,!!s&&s!==sr)}}class kV extends m0{constructor(s,c,h,d,m){super(s,c,h,d,m),this.type=5}_$AI(s,c=this){if((s=Td(this,s,c,0)??sr)===Qs)return;const h=this._$AH,d=s===sr&&h!==sr||s.capture!==h.capture||s.once!==h.once||s.passive!==h.passive,m=s!==sr&&(h===sr||d);d&&this.element.removeEventListener(this.name,this,h),m&&this.element.addEventListener(this.name,this,s),this._$AH=s}handleEvent(s){var c;typeof this._$AH=="function"?this._$AH.call(((c=this.options)==null?void 0:c.host)??this.element,s):this._$AH.handleEvent(s)}}class TV{constructor(s,c,h){this.element=s,this.type=6,this._$AN=void 0,this._$AM=c,this.options=h}get _$AU(){return this._$AM._$AU}_$AI(s){Td(this,s)}}const e_=f0.litHtmlPolyfillSupport;e_?.(jg,Bg),(f0.litHtmlVersions??(f0.litHtmlVersions=[])).push("3.2.0");const AV=(o,s,c)=>{const h=c?.renderBefore??s;let d=h._$litPart$;if(d===void 0){const m=c?.renderBefore??null;h._$litPart$=d=new Bg(s.insertBefore(cf(),m),m,void 0,c??{})}return d._$AI(o),d};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class An extends kd{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var s;const c=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=c.firstChild),c}update(s){const c=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(s),this.o=AV(c,this.renderRoot,this.renderOptions)}connectedCallback(){var s;super.connectedCallback(),(s=this.o)==null||s.setConnected(!0)}disconnectedCallback(){var s;super.disconnectedCallback(),(s=this.o)==null||s.setConnected(!1)}render(){return Qs}}var t_;An._$litElement$=!0,An.finalized=!0,(t_=globalThis.litElementHydrateSupport)==null||t_.call(globalThis,{LitElement:An});const n_=globalThis.litElementPolyfillSupport;n_?.({LitElement:An}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Xn=o=>(s,c)=>{c!==void 0?c.addInitializer(()=>{customElements.define(o,s)}):customElements.define(o,s)};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const EV={attribute:!0,type:String,converter:h0,reflect:!1,hasChanged:Ex},CV=(o=EV,s,c)=>{const{kind:h,metadata:d}=c;let m=globalThis.litPropertyMetadata.get(d);if(m===void 0&&globalThis.litPropertyMetadata.set(d,m=new Map),m.set(c.name,o),h==="accessor"){const{name:b}=c;return{set(f){const A=s.get.call(this);s.set.call(this,f),this.requestUpdate(b,A,o)},init(f){return f!==void 0&&this.P(b,void 0,o),f}}}if(h==="setter"){const{name:b}=c;return function(f){const A=this[b];s.call(this,f),this.requestUpdate(b,A,o)}}throw Error("Unsupported decorator location: "+h)};function tr(o){return(s,c)=>typeof c=="object"?CV(o,s,c):((h,d,m)=>{const b=d.hasOwnProperty(m);return d.constructor.createProperty(m,b?{...h,wrapped:!0}:h),b?Object.getOwnPropertyDescriptor(d,m):void 0})(o,s,c)}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function v0(o){return tr({...o,state:!0,attribute:!1})}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const IV=(o,s,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&typeof s!="object"&&Object.defineProperty(o,s,c),c);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function On(o,s){return(c,h,d)=>{const m=b=>{var f;return((f=b.renderRoot)==null?void 0:f.querySelector(o))??null};return IV(c,h,{get(){return m(this)}})}}var r_={};/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/(function(o){(function(){var s=typeof window<"u"?window:oV,c={};(function(d,m,b){var f;function A(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var M=typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};function D(e){e=[typeof globalThis=="object"&&globalThis,e,typeof d=="object"&&d,typeof self=="object"&&self,typeof m=="object"&&m];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}var N=D(this);function F(e,t){if(t)e:{var n=N;e=e.split(".");for(var r=0;r<e.length-1;r++){var i=e[r];if(!(i in n))break e;n=n[i]}e=e[e.length-1],r=n[e],t=t(r),t!=r&&t!=null&&M(n,e,{configurable:!0,writable:!0,value:t})}}F("Symbol",function(e){function t(a){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new n(r+(a||"")+"_"+i++,a)}function n(a,u){this.g=a,M(this,"description",{configurable:!0,writable:!0,value:u})}if(e)return e;n.prototype.toString=function(){return this.g};var r="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return t}),F("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var r=N[t[n]];typeof r=="function"&&typeof r.prototype[e]!="function"&&M(r.prototype,e,{configurable:!0,writable:!0,value:function(){return L(A(this))}})}return e});function L(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}function w(e){var t=typeof Symbol<"u"&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if(typeof e.length=="number")return{next:A(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function U(e){if(!(e instanceof Array)){e=w(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}var G=typeof Object.create=="function"?Object.create:function(e){function t(){}return t.prototype=e,new t},Z;if(typeof Object.setPrototypeOf=="function")Z=Object.setPrototypeOf;else{var ie;e:{var ge={a:!0},fe={};try{fe.__proto__=ge,ie=fe.a;break e}catch{}ie=!1}Z=ie?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var Me=Z;function Te(e,t){if(e.prototype=G(t.prototype),e.prototype.constructor=e,Me)Me(e,t);else for(var n in t)if(n!="prototype")if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.Tk=t.prototype}function re(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function Pe(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}re.prototype.u=function(e){this.h=e};function ke(e,t){e.i={Ng:t,Zg:!0},e.g=e.m||e.j}re.prototype.return=function(e){this.i={return:e},this.g=this.j};function T(e,t,n){return e.g=n,{value:t}}re.prototype.s=function(e){this.g=e};function oe(e){e.g=0}function ve(e,t,n){e.m=t,n!=null&&(e.j=n)}function be(e,t){e.m=0,e.j=t||0}function V(e,t,n){e.g=t,e.m=n||0}function W(e,t){return e.m=t||0,t=e.i.Ng,e.i=null,t}function Se(e){e.A=[e.i],e.m=0,e.j=0}function te(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.Zg?e.g=e.m||e.j:n.s!=null&&e.j<n.s?(e.g=n.s,e.i=null):e.g=e.j:e.g=t}function Ue(e){this.g=new re,this.h=e}function He(e,t){Pe(e.g);var n=e.g.l;return n?mt(e,"return"in n?n.return:function(r){return{value:r,done:!0}},t,e.g.return):(e.g.return(t),X(e))}function mt(e,t,n,r){try{var i=t.call(e.g.l,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.g.o=!1,i;var a=i.value}catch(u){return e.g.l=null,ke(e.g,u),X(e)}return e.g.l=null,r.call(e.g,a),X(e)}function X(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(n){e.g.h=void 0,ke(e.g,n)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.Zg)throw t.Ng;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function pe(e){this.next=function(t){return Pe(e.g),e.g.l?t=mt(e,e.g.l.next,t,e.g.u):(e.g.u(t),t=X(e)),t},this.throw=function(t){return Pe(e.g),e.g.l?t=mt(e,e.g.l.throw,t,e.g.u):(ke(e.g,t),t=X(e)),t},this.return=function(t){return He(e,t)},this[Symbol.iterator]=function(){return this}}function Q(e){function t(r){return e.next(r)}function n(r){return e.throw(r)}return new Promise(function(r,i){function a(u){u.done?r(u.value):Promise.resolve(u.value).then(t,n).then(a,i)}a(e.next())})}function P(e){return Q(new pe(new Ue(e)))}function Re(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}F("Promise",function(e){function t(u){this.h=0,this.i=void 0,this.g=[],this.o=!1;var l=this.j();try{u(l.resolve,l.reject)}catch(p){l.reject(p)}}function n(){this.g=null}function r(u){return u instanceof t?u:new t(function(l){l(u)})}if(e)return e;n.prototype.h=function(u){if(this.g==null){this.g=[];var l=this;this.i(function(){l.l()})}this.g.push(u)};var i=N.setTimeout;n.prototype.i=function(u){i(u,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var u=this.g;this.g=[];for(var l=0;l<u.length;++l){var p=u[l];u[l]=null;try{p()}catch(g){this.j(g)}}}this.g=null},n.prototype.j=function(u){this.i(function(){throw u})},t.prototype.j=function(){function u(g){return function(v){p||(p=!0,g.call(l,v))}}var l=this,p=!1;return{resolve:u(this.F),reject:u(this.l)}},t.prototype.F=function(u){if(u===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(u instanceof t)this.H(u);else{e:switch(typeof u){case"object":var l=u!=null;break e;case"function":l=!0;break e;default:l=!1}l?this.C(u):this.m(u)}},t.prototype.C=function(u){var l=void 0;try{l=u.then}catch(p){this.l(p);return}typeof l=="function"?this.I(l,u):this.m(u)},t.prototype.l=function(u){this.u(2,u)},t.prototype.m=function(u){this.u(1,u)},t.prototype.u=function(u,l){if(this.h!=0)throw Error("Cannot settle("+u+", "+l+"): Promise already settled in state"+this.h);this.h=u,this.i=l,this.h===2&&this.G(),this.A()},t.prototype.G=function(){var u=this;i(function(){if(u.B()){var l=N.console;typeof l<"u"&&l.error(u.i)}},1)},t.prototype.B=function(){if(this.o)return!1;var u=N.CustomEvent,l=N.Event,p=N.dispatchEvent;return typeof p>"u"?!0:(typeof u=="function"?u=new u("unhandledrejection",{cancelable:!0}):typeof l=="function"?u=new l("unhandledrejection",{cancelable:!0}):(u=N.document.createEvent("CustomEvent"),u.initCustomEvent("unhandledrejection",!1,!0,u)),u.promise=this,u.reason=this.i,p(u))},t.prototype.A=function(){if(this.g!=null){for(var u=0;u<this.g.length;++u)a.h(this.g[u]);this.g=null}};var a=new n;return t.prototype.H=function(u){var l=this.j();u.Sd(l.resolve,l.reject)},t.prototype.I=function(u,l){var p=this.j();try{u.call(l,p.resolve,p.reject)}catch(g){p.reject(g)}},t.prototype.then=function(u,l){function p(x,S){return typeof x=="function"?function(k){try{g(x(k))}catch(C){v(C)}}:S}var g,v,y=new t(function(x,S){g=x,v=S});return this.Sd(p(u,g),p(l,v)),y},t.prototype.catch=function(u){return this.then(void 0,u)},t.prototype.Sd=function(u,l){function p(){switch(g.h){case 1:u(g.i);break;case 2:l(g.i);break;default:throw Error("Unexpected state: "+g.h)}}var g=this;this.g==null?a.h(p):this.g.push(p),this.o=!0},t.resolve=r,t.reject=function(u){return new t(function(l,p){p(u)})},t.race=function(u){return new t(function(l,p){for(var g=w(u),v=g.next();!v.done;v=g.next())r(v.value).Sd(l,p)})},t.all=function(u){var l=w(u),p=l.next();return p.done?r([]):new t(function(g,v){function y(k){return function(C){x[k]=C,S--,S==0&&g(x)}}var x=[],S=0;do x.push(void 0),S++,r(p.value).Sd(y(x.length-1),v),p=l.next();while(!p.done)})},t});function ft(e,t){return Object.prototype.hasOwnProperty.call(e,t)}F("WeakMap",function(e){function t(p){if(this.g=(l+=Math.random()+1).toString(),p){p=w(p);for(var g;!(g=p.next()).done;)g=g.value,this.set(g[0],g[1])}}function n(){}function r(p){var g=typeof p;return g==="object"&&p!==null||g==="function"}function i(p){if(!ft(p,u)){var g=new n;M(p,u,{value:g})}}function a(p){var g=Object[p];g&&(Object[p]=function(v){return v instanceof n?v:(Object.isExtensible(v)&&i(v),g(v))})}if(function(){if(!e||!Object.seal)return!1;try{var p=Object.seal({}),g=Object.seal({}),v=new e([[p,2],[g,3]]);return v.get(p)!=2||v.get(g)!=3?!1:(v.delete(p),v.set(g,4),!v.has(p)&&v.get(g)==4)}catch{return!1}}())return e;var u="$jscomp_hidden_"+Math.random();a("freeze"),a("preventExtensions"),a("seal");var l=0;return t.prototype.set=function(p,g){if(!r(p))throw Error("Invalid WeakMap key");if(i(p),!ft(p,u))throw Error("WeakMap key fail: "+p);return p[u][this.g]=g,this},t.prototype.get=function(p){return r(p)&&ft(p,u)?p[u][this.g]:void 0},t.prototype.has=function(p){return r(p)&&ft(p,u)&&ft(p[u],this.g)},t.prototype.delete=function(p){return r(p)&&ft(p,u)&&ft(p[u],this.g)?delete p[u][this.g]:!1},t}),F("Map",function(e){function t(){var l={};return l.Yb=l.next=l.head=l}function n(l,p){var g=l[1];return L(function(){if(g){for(;g.head!=l[1];)g=g.Yb;for(;g.next!=g.head;)return g=g.next,{done:!1,value:p(g)};g=null}return{done:!0,value:void 0}})}function r(l,p){var g=p&&typeof p;g=="object"||g=="function"?a.has(p)?g=a.get(p):(g=""+ ++u,a.set(p,g)):g="p_"+p;var v=l[0][g];if(v&&ft(l[0],g))for(l=0;l<v.length;l++){var y=v[l];if(p!==p&&y.key!==y.key||p===y.key)return{id:g,list:v,index:l,entry:y}}return{id:g,list:v,index:-1,entry:void 0}}function i(l){if(this[0]={},this[1]=t(),this.size=0,l){l=w(l);for(var p;!(p=l.next()).done;)p=p.value,this.set(p[0],p[1])}}if(function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var l=Object.seal({x:4}),p=new e(w([[l,"s"]]));if(p.get(l)!="s"||p.size!=1||p.get({x:4})||p.set({x:4},"t")!=p||p.size!=2)return!1;var g=p.entries(),v=g.next();return v.done||v.value[0]!=l||v.value[1]!="s"?!1:(v=g.next(),!(v.done||v.value[0].x!=4||v.value[1]!="t"||!g.next().done))}catch{return!1}}())return e;var a=new WeakMap;i.prototype.set=function(l,p){l=l===0?0:l;var g=r(this,l);return g.list||(g.list=this[0][g.id]=[]),g.entry?g.entry.value=p:(g.entry={next:this[1],Yb:this[1].Yb,head:this[1],key:l,value:p},g.list.push(g.entry),this[1].Yb.next=g.entry,this[1].Yb=g.entry,this.size++),this},i.prototype.delete=function(l){return l=r(this,l),l.entry&&l.list?(l.list.splice(l.index,1),l.list.length||delete this[0][l.id],l.entry.Yb.next=l.entry.next,l.entry.next.Yb=l.entry.Yb,l.entry.head=null,this.size--,!0):!1},i.prototype.clear=function(){this[0]={},this[1]=this[1].Yb=t(),this.size=0},i.prototype.has=function(l){return!!r(this,l).entry},i.prototype.get=function(l){return(l=r(this,l).entry)&&l.value},i.prototype.entries=function(){return n(this,function(l){return[l.key,l.value]})},i.prototype.keys=function(){return n(this,function(l){return l.key})},i.prototype.values=function(){return n(this,function(l){return l.value})},i.prototype.forEach=function(l,p){for(var g=this.entries(),v;!(v=g.next()).done;)v=v.value,l.call(p,v[1],v[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var u=0;return i}),F("Set",function(e){function t(n){if(this.g=new Map,n){n=w(n);for(var r;!(r=n.next()).done;)this.add(r.value)}this.size=this.g.size}return function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var n=Object.seal({x:4}),r=new e(w([n]));if(!r.has(n)||r.size!=1||r.add(n)!=r||r.size!=1||r.add({x:4})!=r||r.size!=2)return!1;var i=r.entries(),a=i.next();return a.done||a.value[0]!=n||a.value[1]!=n?!1:(a=i.next(),a.done||a.value[0]==n||a.value[0].x!=4||a.value[1]!=a.value[0]?!1:i.next().done)}catch{return!1}}()?e:(t.prototype.add=function(n){return n=n===0?0:n,this.g.set(n,n),this.size=this.g.size,this},t.prototype.delete=function(n){return n=this.g.delete(n),this.size=this.g.size,n},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(n){return this.g.has(n)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(n,r){var i=this;this.g.forEach(function(a){return n.call(r,a,a,i)})},t)});function Mt(e,t){e instanceof String&&(e+="");var n=0,r=!1,i={next:function(){if(!r&&n<e.length){var a=n++;return{value:t(a,e[a]),done:!1}}return r=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}F("Array.prototype.values",function(e){return e||function(){return Mt(this,function(t,n){return n})}}),F("Array.from",function(e){return e||function(t,n,r){n=n??function(l){return l};var i=[],a=typeof Symbol<"u"&&Symbol.iterator&&t[Symbol.iterator];if(typeof a=="function"){t=a.call(t);for(var u=0;!(a=t.next()).done;)i.push(n.call(r,a.value,u++))}else for(a=t.length,u=0;u<a;u++)i.push(n.call(r,t[u],u));return i}}),F("Array.prototype.keys",function(e){return e||function(){return Mt(this,function(t){return t})}}),F("Object.is",function(e){return e||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n}}),F("Array.prototype.includes",function(e){return e||function(t,n){var r=this;r instanceof String&&(r=String(r));var i=r.length;for(n=n||0,0>n&&(n=Math.max(n+i,0));n<i;n++){var a=r[n];if(a===t||Object.is(a,t))return!0}return!1}});function Ot(e,t,n){if(e==null)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}F("String.prototype.includes",function(e){return e||function(t,n){return Ot(this,t,"includes").indexOf(t,n||0)!==-1}}),F("String.fromCodePoint",function(e){return e||function(t){for(var n="",r=0;r<arguments.length;r++){var i=Number(arguments[r]);if(0>i||1114111<i||i!==Math.floor(i))throw new RangeError("invalid_code_point "+i);65535>=i?n+=String.fromCharCode(i):(i-=65536,n+=String.fromCharCode(i>>>10&1023|55296),n+=String.fromCharCode(i&1023|56320))}return n}});function sn(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var a=e[i];if(t.call(n,a,i,e))return{Xg:i,v:a}}return{Xg:-1,v:void 0}}F("Array.prototype.findIndex",function(e){return e||function(t,n){return sn(this,t,n).Xg}}),F("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=w(n);for(var r;!(r=n.next()).done;)this.add(r.value)}}return function(){if(!e||!Object.seal)return!1;try{var n=Object.seal({}),r=Object.seal({}),i=new e([n]);return!i.has(n)||i.has(r)?!1:(i.delete(n),i.add(r),!i.has(n)&&i.has(r))}catch{return!1}}()?e:(t.prototype.add=function(n){return this.g.set(n,!0),this},t.prototype.has=function(n){return this.g.has(n)},t.prototype.delete=function(n){return this.g.delete(n)},t)}),F("Array.prototype.find",function(e){return e||function(t,n){return sn(this,t,n).v}}),F("String.prototype.startsWith",function(e){return e||function(t,n){var r=Ot(this,t,"startsWith"),i=r.length,a=t.length;n=Math.max(0,Math.min(n|0,r.length));for(var u=0;u<a&&n<i;)if(r[n++]!=t[u++])return!1;return u>=a}}),F("Object.entries",function(e){return e||function(t){var n=[],r;for(r in t)ft(t,r)&&n.push([r,t[r]]);return n}});var Ai=typeof Object.assign=="function"?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)ft(r,i)&&(e[i]=r[i])}return e};F("Object.assign",function(e){return e||Ai}),F("Promise.prototype.finally",function(e){return e||function(t){return this.then(function(n){return Promise.resolve(t()).then(function(){return n})},function(n){return Promise.resolve(t()).then(function(){throw n})})}}),F("Array.prototype.entries",function(e){return e||function(){return Mt(this,function(t,n){return[t,n]})}}),F("Number.isNaN",function(e){return e||function(t){return typeof t=="number"&&isNaN(t)}}),F("String.prototype.repeat",function(e){return e||function(t){var n=Ot(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var r="";t;)t&1&&(r+=n),(t>>>=1)&&(n+=n);return r}}),F("Number.EPSILON",function(){return Math.pow(2,-52)}),F("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),F("Number.isFinite",function(e){return e||function(t){return typeof t!="number"?!1:!isNaN(t)&&t!==1/0&&t!==-1/0}}),F("Object.values",function(e){return e||function(t){var n=[],r;for(r in t)ft(t,r)&&n.push(t[r]);return n}}),F("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),F("String.prototype.endsWith",function(e){return e||function(t,n){var r=Ot(this,t,"endsWith");n===void 0&&(n=r.length),n=Math.max(0,Math.min(n|0,r.length));for(var i=t.length;0<i&&0<n;)if(r[--n]!=t[--i])return!1;return 0>=i}}),F("Math.trunc",function(e){return e||function(t){if(t=Number(t),isNaN(t)||t===1/0||t===-1/0||t===0)return t;var n=Math.floor(Math.abs(t));return 0>t?-n:n}});var oi=this||self;function Ee(e,t){e=e.split(".");var n=oi;e[0]in n||typeof n.execScript>"u"||n.execScript("var "+e[0]);for(var r;e.length&&(r=e.shift());)e.length||t===void 0?n[r]&&n[r]!==Object.prototype[r]?n=n[r]:n=n[r]={}:n[r]=t}function In(){}function rr(){}function me(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}me.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.i+=e)};function $e(e){return e.h/(1-Math.pow(e.g,e.i))}function ct(){this.h=new me(2),this.j=new me(5),this.g=0,this.i=128e3,this.l=16e3}ct.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},ct.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},ct.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min($e(this.h),$e(this.j))};function dt(){}function at(){}function Be(){}function $t(e){var t=Re.apply(1,arguments);Ie.has(e)||(Ie.add(e),Be.apply(dt,U(t)))}function de(){}function we(){}function De(){}var Ie=new Set;d.console&&(new Map().set(1,function(){return console.error.apply(console,U(Re.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,U(Re.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,U(Re.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,U(Re.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,U(Re.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,U(Re.apply(0,arguments)))}),Be=function(){return console.warn.apply(console,U(Re.apply(0,arguments)))},at=function(){console.error.apply(console,U(Re.apply(0,arguments)))});function Ne(){this.g=new Map}f=Ne.prototype,f.push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},f.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},f.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(r){return r!=t});this.g.set(e,n),n.length||this.g.delete(e)}},f.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},f.size=function(){return this.g.size},f.keys=function(){return Array.from(this.g.keys())};function Ce(){this.g=new Ne}f=Ce.prototype,f.release=function(){this.Qa(),this.g=null},f.D=function(e,t,n,r){this.g&&(e=new yt(e,t,n,r),this.g.push(t,e))},f.ma=function(e,t,n,r){function i(u){a.Ja(e,t,i),n(u)}var a=this;this.D(e,t,i,r)},f.Ja=function(e,t,n){if(this.g){var r=this.g.get(t)||[];r=w(r);for(var i=r.next();!i.done;i=r.next())i=i.value,i.target!=e||n!=i.listener&&n||(i.Ja(),this.g.remove(t,i))}},f.Qa=function(){if(this.g){for(var e=[],t=w(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,U(n.value));for(e=w(e),t=e.next();!t.done;t=e.next())t.value.Ja();this.g.g.clear()}},Ee("shaka.util.EventManager",Ce),Ce.prototype.removeAll=Ce.prototype.Qa,Ce.prototype.unlisten=Ce.prototype.Ja,Ce.prototype.listenOnce=Ce.prototype.ma,Ce.prototype.listen=Ce.prototype.D,Ce.prototype.release=Ce.prototype.release;function yt(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=Ut(e,r),this.target.addEventListener(t,n,this.g)}yt.prototype.Ja=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};function Ut(e,t){if(t==null)return!1;if(typeof t=="boolean")return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(r){return!n.has(r)}),Ct(e)?t:t.capture||!1}function Ct(e){var t=zt;if(t==null){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch{t=!1}zt=t}return t||!1}var zt=void 0;Ee("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function rn(e,t){this.g=e,this.h=t}rn.prototype.toString=function(){return"v"+this.g+"."+this.h};function ut(e,t){var n=new rn(5,0),r=Ur,i=r.g,a=n.h-i.h;(0<(n.g-i.g||a)?r.i:r.h)(r.g,n,e,t)}function Ei(e,t,n,r){Be([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function ua(e,t,n,r){at([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(" "))}var Ur=null;/*
 @license
 Copyright 2008 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/var Io=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/function ee(e){var t;e instanceof ee?(ye(this,e.Kb),this.Hc=e.Hc,qe(this,e.nb),Xe(this,e.$c),this.ab=e.ab,kt(this,e.g.clone()),this.qc=e.qc):e&&(t=String(e).match(Io))?(ye(this,t[1]||"",!0),this.Hc=bt(t[2]||""),qe(this,t[3]||"",!0),Xe(this,t[4]),this.ab=bt(t[5]||"",!0),kt(this,t[6]||"",!0),this.qc=bt(t[7]||"")):this.g=new Es(null)}f=ee.prototype,f.Kb="",f.Hc="",f.nb="",f.$c=null,f.ab="",f.qc="",f.toString=function(){var e=[],t=this.Kb;if(t&&e.push(Lt(t,si,!0),":"),t=this.nb){e.push("//");var n=this.Hc;n&&e.push(Lt(n,si,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.$c,t!=null&&e.push(":",String(t))}return(t=this.ab)&&(this.nb&&t.charAt(0)!="/"&&e.push("/"),e.push(Lt(t,t.charAt(0)=="/"?Op:Ft,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.qc)&&e.push("#",Lt(t,Vg)),e.join("")},f.resolve=function(e){var t=this.clone();t.Kb==="data"&&(t=new ee);var n=!!e.Kb;n?ye(t,e.Kb):n=!!e.Hc,n?t.Hc=e.Hc:n=!!e.nb,n?qe(t,e.nb):n=e.$c!=null;var r=e.ab;if(n)Xe(t,e.$c);else if(n=!!e.ab){if(r.charAt(0)!="/")if(this.nb&&!this.ab)r="/"+r;else{var i=t.ab.lastIndexOf("/");i!=-1&&(r=t.ab.substr(0,i+1)+r)}if(r==".."||r==".")r="";else if(r.indexOf("./")!=-1||r.indexOf("/.")!=-1){i=r.lastIndexOf("/",0)==0,r=r.split("/");for(var a=[],u=0;u<r.length;){var l=r[u++];l=="."?i&&u==r.length&&a.push(""):l==".."?((1<a.length||a.length==1&&a[0]!="")&&a.pop(),i&&u==r.length&&a.push("")):(a.push(l),i=!0)}r=a.join("/")}}return n?t.ab=r:n=e.g.toString()!=="",n?kt(t,e.g.clone()):n=!!e.qc,n&&(t.qc=e.qc),t},f.clone=function(){return new ee(this)};function ye(e,t,n){e.Kb=n?bt(t,!0):t,e.Kb&&(e.Kb=e.Kb.replace(/:$/,""))}function qe(e,t,n){e.nb=n?bt(t,!0):t}function Xe(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.$c=t}else e.$c=null}function kt(e,t,n){t instanceof Es?e.g=t:(n||(t=Lt(t,As)),e.g=new Es(t))}function bt(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Lt(e,t,n){return e!=null?(e=encodeURI(e).replace(t,_n),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function _n(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var si=/[#\/\?@]/g,Ft=/[#\?:]/g,Op=/[#\?]/g,As=/[#\?@]/g,Vg=/#/g;function Es(e){this.g=e||null}function Ou(e){if(!e.Va&&(e.Va=new Map,e.kd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var a=t[n].substring(0,r);i=t[n].substring(r+1)}else a=t[n];a=decodeURIComponent(a.replace(/\+/g," ")),i=i||"",e.add(a,decodeURIComponent(i.replace(/\+/g," ")))}}f=Es.prototype,f.Va=null,f.kd=null;function Uu(e){return Ou(e),e.kd}f.add=function(e,t){Ou(this),this.g=null;var n=this.Va.has(e)?this.Va.get(e):null;return n||this.Va.set(e,n=[]),n.push(t),this.kd++,this},f.set=function(e,t){return Ou(this),this.g=null,this.Va.has(e)?this.Va.set(e,[t]):this.add(e,t),this},f.get=function(e){return Ou(this),this.Va.get(e)||[]},f.toString=function(){if(this.g)return this.g;if(!this.Va||!this.Va.size)return"";for(var e=[],t=w(this.Va.keys()),n=t.next();!n.done;n=t.next()){var r=n.value;n=encodeURIComponent(r),r=this.Va.get(r);for(var i=0;i<r.length;i++){var a=n;r[i]!==""&&(a+="="+encodeURIComponent(r[i])),e.push(a)}}return this.g=e.join("&")},f.clone=function(){var e=new Es;if(e.g=this.g,this.Va){for(var t=new Map,n=w(this.Va),r=n.next();!r.done;r=n.next()){var i=w(r.value);r=i.next().value,i=i.next().value,t.set(r,i.concat())}e.Va=t,e.kd=this.kd}return e};function Pa(){}function ui(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=Ye(e);t=Ye(t);for(var r=0;r<e.byteLength;r++)if(n[r]!=t[r])return!1;return!0}function li(e){return ArrayBuffer.isView(e)?e.byteOffset==0&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function Ye(e,t,n){return n=n===void 0?1/0:n,La(e,t===void 0?0:t,n,Uint8Array)}function bc(e,t,n){return n=n===void 0?1/0:n,La(e,t===void 0?0:t,n,Uint16Array)}function pn(e,t,n){return n=n===void 0?1/0:n,La(e,t===void 0?0:t,n,DataView)}function La(e,t,n,r){var i=ArrayBuffer.isView(e)?e.buffer:e,a=1;"BYTES_PER_ELEMENT"in r&&(a=r.BYTES_PER_ELEMENT);var u=((e.byteOffset||0)+e.byteLength)/a;return e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/a,u))),new r(i,e,Math.floor(Math.min(e+Math.max(n,0),u))-e)}Ee("shaka.util.BufferUtils",Pa),Pa.toDataView=pn,Pa.toUint16=bc,Pa.toUint8=Ye,Pa.toArrayBuffer=li,Pa.equal=ui;function $(e,t,n){var r=Re.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=r,this.handled=!1,this.message="Shaka Error "+this.code;try{throw Error(this.message||"Shaka Error")}catch(i){this.stack=i.stack}}$.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")},Ee("shaka.util.Error",$),$.Severity={RECOVERABLE:1,CRITICAL:2},$.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},$.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,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,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_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,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,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,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function Up(e){this.h=e,this.g=void 0}Up.prototype.value=function(){return this.g===void 0&&(this.g=this.h()),this.g};function J3(e,t){return e.length&&t.length&&e!==t?0<O1(e,t).length:!0}function O1(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=w(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;for(var i=w(t),a=i.next();!a.done;a=i.next())if(a=a.value,r.keySystem==a.keySystem){i=new Map;for(var u=w((r.initData||[]).concat(a.initData||[])),l=u.next();!l.done;l=u.next())l=l.value,i.set(l.keyId,l);i=Array.from(i.values()),u=r.keyIds&&a.keyIds?new Set([].concat(U(r.keyIds),U(a.keyIds))):r.keyIds||a.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||a.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||a.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||a.persistentStateRequired,videoRobustness:r.videoRobustness||a.videoRobustness,audioRobustness:r.audioRobustness||a.audioRobustness,serverCertificate:r.serverCertificate||a.serverCertificate,serverCertificateUri:r.serverCertificateUri||a.serverCertificateUri,initData:i,keyIds:u});break}}return n}function U1(e){return e?!!e.match(/^com\.(microsoft|chromecast)\.playready/):!1}function $g(e){return e?!!e.match(/^com\.apple\.fps/):!1}var zg=new Up(function(){return li(new Uint8Array([0]))}),wc=new Map;function Fp(e){this.h=e,this.g=null}Fp.prototype.da=function(e){var t=this;this.stop();var n=!0,r=null;return this.g=function(){d.clearTimeout(r),n=!1},r=d.setTimeout(function(){n&&t.h()},1e3*e),this},Fp.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Tt(e){this.h=e,this.g=null}Tt.prototype.sb=function(){return this.stop(),this.h(),this},Tt.prototype.da=function(e){var t=this;return this.stop(),this.g=new Fp(function(){t.h()}).da(e),this},Tt.prototype.ua=function(e){var t=this;return this.stop(),this.g=new Fp(function(){t.g.da(e),t.h()}).da(e),this},Tt.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},Ee("shaka.util.Timer",Tt),Tt.prototype.stop=Tt.prototype.stop,Tt.prototype.tickEvery=Tt.prototype.ua,Tt.prototype.tickAfter=Tt.prototype.da,Tt.prototype.tickNow=Tt.prototype.sb;function Za(){var e=d.ManagedMediaSource||d.MediaSource;return!!(e&&e.isTypeSupported)}function jp(e){return e5().canPlayType(e)!=""}function Bp(){return!!navigator.userAgent.match(/Edge?\//)}function Ra(){return Rn("Xbox One")}function Na(){return Rn("Tizen")}function Mo(){return Rn("Tizen 3")}function _o(){return Rn("Web0S")}function Hg(){return _o()&&Q3()===38}function la(){return Rn("CrKey")&&!Rn("VIZIO SmartCast")}function Q3(){if(!Rn("Chrome")||navigator.userAgent.match(/Edge\//))return null;var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}function dr(){return Sc()&&((navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="macos":navigator.platform?navigator.platform.toLowerCase().includes("mac"):!1)||(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?!0:Sc()&&1<navigator.maxTouchPoints))}function xc(){return Rn("PlayStation 5")}function Oa(){return Rn("PlayStation 4")}function qg(){return Rn("Hisense")||Rn("VIDAA")}function Z3(){if(!dr()&&(!Sc()||dr()))return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function F1(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function Cs(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":Rn("Android")}function j1(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="fuchsia":Rn("Fuchsia")}function B1(){return!!(Na()||_o()||Ra()||Oa()||xc()||la()||qg()||Rn("VIZIO SmartCast")||Sc()&&!dr())}function Rn(e){return(navigator.userAgent||"").includes(e)}function Sc(){return(navigator.vendor||"").includes("Apple")}function e5(){return Vp||(V1||(V1=new Tt(function(){Vp=null})),(Vp=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Vp=document.createElement("video")),V1.da(1),Vp)}function P7(){if(Mo()||Rn("Tizen 2")||Hg()||Oa()||xc())return!1;var e=Z3();return!(Sc()&&!dr()&&e!=null&&15>e)}function t5(){var e,t,n,r,i,a,u,l,p,g,v,y,x,S,k,C,E;return P(function(I){switch(I.g){case 1:if(e={width:1/0,height:1/0},la()){if(S=d.cast&&cast.__platform__&&cast.__platform__.canDisplayType,e.width=1280,e.height=720,ve(I,14),!(k=S)){I.s(16);break}return T(I,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),17)}if(Na()){t=d.devicePixelRatio,e.width=1920<d.screen.width*t?3840:1920,e.height=1080<d.screen.height*t?2160:1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(n=webapis.systeminfo.getMaxVideoResolution(),e.width=n.width,e.height=n.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(e.width=7680,e.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(e.width=3840,e.height=2160)}catch{Be("Tizen: Error detecting screen size, default screen size 1920x1080.")}I.s(3);break}if(_o()){try{r=JSON.parse(d.PalmSystem.deviceInfo),e.width=Math.max(1920,r.screenWidth),e.height=Math.max(1080,r.screenHeight)}catch{Be("WebOS: Error detecting screen size, default screen size 1920x1080."),e.width=1920,e.height=1080}I.s(3);break}if(qg()){if(i=null,d.Hisense_Get4KSupportState)try{i=d.Hisense_Get4KSupportState()}catch{}i==null&&(i=Rn("UHD")),i?(e.width=3840,e.height=2160):(e.width=1920,e.height=1080),I.s(3);break}if(!Oa()&&!xc()){a=void 0;try{a=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}if(a){e.width=1920,e.height=1080;try{u=new a.Media.Protection.ProtectionCapabilities,l=a.Media.Protection.ProtectionCapabilityResult,p=null;do p=u.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(p===l.maybe);p===l.probably&&(e.width=3840,e.height=2160)}catch{Be("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else Ra()&&(e.width=1920,e.height=1080,Be("Xbox: Error detecting screen size, default screen size 1920x1080."));I.s(3);break}return g=!1,ve(I,8),T(I,d.msdk.device.getDisplayInfo(),10);case 10:v=I.h,g=v.resolution==="4K",V(I,9);break;case 8:return W(I),ve(I,11),T(I,d.msdk.device.getDisplayInfoImmediate(),13);case 13:y=I.h,g=y.resolution==="4K",V(I,9);break;case 11:x=W(I),Be("PlayStation: Failed to get the display info:",x);case 9:g?(e.width=3840,e.height=2160):(e.width=1920,e.height=1080),I.s(3);break;case 17:k=I.h;case 16:if(k){e.width=3840,e.height=2160,I.s(18);break}if(!(C=S)){I.s(19);break}return T(I,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:C=I.h;case 19:C&&(e.width=1920,e.height=1080);case 18:V(I,3);break;case 14:E=W(I),at("Failed to check canDisplayType:",E);case 3:return I.return(e)}})}var V1=null,Vp=null;function Fu(){}function yn(e){if(!e)return"";if(e=Ye(e),e[0]==239&&e[1]==187&&e[2]==191&&(e=e.subarray(3)),d.TextDecoder&&!Oa())return e=new TextDecoder().decode(e),e.includes("\uFFFD")&&at('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),e;for(var t="",n=0;n<e.length;++n){var r=65533;if(e[n]&128?e.length>=n+2&&(e[n]&224)==192&&(e[n+1]&192)==128?(r=(e[n]&31)<<6|e[n+1]&63,n+=1):e.length>=n+3&&(e[n]&240)==224&&(e[n+1]&192)==128&&(e[n+2]&192)==128?(r=(e[n]&15)<<12|(e[n+1]&63)<<6|e[n+2]&63,n+=2):e.length>=n+4&&(e[n]&241)==240&&(e[n+1]&192)==128&&(e[n+2]&192)==128&&(e[n+3]&192)==128&&(r=(e[n]&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63,n+=3):r=e[n],65535>=r)t+=String.fromCharCode(r);else{r-=65536;var i=r&1023;t+=String.fromCharCode(55296+(r>>10)),t+=String.fromCharCode(56320+i)}}return t}function Is(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new $(2,2,2004);n=Math.floor(e.byteLength/2);var r=new Uint16Array(n);e=pn(e);for(var i=0;i<n;i++)r[i]=e.getUint16(2*i,t);return z1(r)}function eo(e){function t(r){return n.byteLength<=r||9<=n[r]&&126>=n[r]}if(!e)return"";var n=Ye(e);if(n[0]==239&&n[1]==187&&n[2]==191)return yn(n);if(n[0]==254&&n[1]==255)return Is(n.subarray(2),!1);if(n[0]==255&&n[1]==254)return Is(n.subarray(2),!0);if(n[0]==0&&n[2]==0)return Is(e,!1);if(n[1]==0&&n[3]==0)return Is(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return yn(e);throw new $(2,2,2003)}function ca(e){if(d.TextEncoder&&!Oa()){var t=new TextEncoder;return li(t.encode(e))}e=encodeURIComponent(e),e=unescape(e),t=new Uint8Array(e.length);for(var n=0;n<e.length;n++)t[n]=e[n].charCodeAt(0);return li(t)}function $1(e,t){for(var n=new ArrayBuffer(2*e.length),r=new DataView(n),i=0;i<e.length;++i)r.setUint16(2*i,e.charCodeAt(i),t);return n}function z1(e){return n5.value()(e)}function Wr(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\xA0","&lrm;":"\u200E","&rlm;":"\u200F"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,function(i){return i[1]=="#"?(i=i[2]=="x"||i[2]=="X"?parseInt(i.substring(3),16):parseInt(i.substring(2),10),0<=i&&1114111>=i?String.fromCodePoint(i):""):t[i]||"'"}):e||""}Ee("shaka.util.StringUtils",Fu),Fu.resetFromCharCode=function(){n5.g=void 0},Fu.toUTF16=$1,Fu.toUTF8=ca,Fu.fromBytesAutoDetect=eo,Fu.fromUTF16=Is,Fu.fromUTF8=yn;var n5=new Up(function(){function e(n){try{var r=new Uint8Array(n);return 0<String.fromCharCode.apply(null,r).length}catch{return!1}}for(var t={jc:65536};0<t.jc;t={jc:t.jc},t.jc/=2)if(e(t.jc))return function(n){return function(r){for(var i="",a=0;a<r.length;a+=n.jc)i+=String.fromCharCode.apply(null,r.subarray(a,a+n.jc));return i}}(t);return null});function vr(){}function Gg(e){return e=z1(Ye(e)),btoa(e)}function Do(e,t){return t=t??!0,e=Gg(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function Gi(e){e=d.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}function ju(e){for(var t=e.length/2,n=new Uint8Array(t),r=0;r<t;r++)n[r]=d.parseInt(e.substr(2*r,2),16);return n}function Po(e){var t=Ye(e);e="",t=w(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n=n.toString(16),n.length==1&&(n="0"+n),e+=n;return e}function En(){for(var e=Re.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var r=n=0;r<e.length;++r){var i=e[r];ArrayBuffer.isView(i)&&i.BYTES_PER_ELEMENT===1?t.set(i,n):t.set(Ye(i),n),n+=i.byteLength}return t}Ee("shaka.util.Uint8ArrayUtils",vr),vr.concat=En,vr.toHex=Po,vr.fromHex=ju,vr.fromBase64=Gi,vr.toBase64=Do,vr.toStandardBase64=Gg;function Qn(e,t,n){if(n=n===void 0?"":n,t.length==0)return e;if(e.length==1&&t.length==1){var r=new ee(e[0]);return t=new ee(t[0]),t=r.resolve(t),n&&kt(t,n),[t.toString()]}t=t.map(function(l){return new ee(l)}),r=[],e=w(e);for(var i=e.next();!i.done;i=e.next()){i=new ee(i.value);for(var a=w(t),u=a.next();!u.done;u=a.next())u=i.resolve(u.value),n&&kt(u,n),r.push(u.toString())}return r}function Ms(e,t,n,r){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set},r&&(e.keySystemUris=new Set([r])),e}function r5(e,t){t=t===void 0?"cenc":t;var n=[],r=[],i=[];e.forEach(function(u,l){var p=l;p.length!=22&&(p=Do(ju(l),!1));var g=u;g.length!=22&&(g=Do(ju(u),!1)),u={kty:"oct",kid:p,k:g},n.push(u),r.push(u.kid),i.push(l)}),e=JSON.stringify({keys:n});var a=JSON.stringify({kids:r});return a=[{initData:Ye(ca(a)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+d.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:a,keyIds:new Set(i)}}function kc(e,t){if(t.length==1)return t[0];if(e=Xr(e,t),e!=null)return e;throw new $(2,4,4025,t)}function Xr(e,t){var n=i5.get(e);n=w(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;for(var i=w(t),a=i.next();!a.done;a=i.next())if(a=a.value,r.test(a.trim()))return a.trim()}return e==wt?"":null}function H1(e,t){var n=[];e=i5.get(e),e=w(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;for(var i=w(t),a=i.next();!a.done;a=i.next())a=a.value,r.test(a.trim())&&n.push(a.trim())}return n}var wt="text",zn={la:"video",V:"audio",za:wt,$e:"image",Mj:"application"},L7=1/15,i5=new Map().set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function $p(e,t,n,r){this.g=null,this.l=e,this.i=t,this.m=n,this.o=r,this.j=!1;e:{if(typeof libDPIModule>"u"&&Be("Could not find LCEVC Library dependencies on this page"),typeof LCEVCdec<"u")this.h=LCEVCdec;else if(typeof LcevcDil<"u")this.h=LcevcDil,this.j=!0,ut("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Be("Could not find LCEVC Library on this page"),e=!1;break e}typeof this.h.SupportObject>"u"?(Be("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||Be(this.h.SupportObject.SupportError),e=typeof this.h<"u"&&typeof libDPIModule<"u"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!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 q1(e,t,n,r){r.type!=="video"||e.o&&!r.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",r.id,-n,!e.o)}function a5(e){e.g&&e.i.classList.add("shaka-hidden")}$p.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function o5(e){return e&&typeof LCEVCdec<"u"?e.codecs=="lvc1":!1}Ee("shaka.lcevc.Dec",$p),$p.prototype.release=$p.prototype.release;function ir(e){if(G1.has(e))return G1.get(e);var t=d.ManagedMediaSource||d.MediaSource;return t?(t=t.isTypeSupported(e),G1.set(e,t),t):!1}function Bu(){var e=d.ManagedSourceBuffer||d.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType}function s5(){var e=d.ManagedMediaSource||d.MediaSource;return e&&e.prototype?!!e.prototype.setLiveSeekableRange&&!!e.prototype.clearLiveSeekableRange:!1}var G1=new Map;function zp(){}zp.prototype.extract=function(){},zp.prototype.decode=function(){return[]},zp.prototype.clear=function(){},zp.prototype.getStreams=function(){return[]};function K1(){}K1.prototype.init=function(){},K1.prototype.parse=function(){return[]};function Hp(){}Hp.prototype.init=function(){},Hp.prototype.i=function(){},Hp.prototype.g=function(){},Hp.prototype.j=function(){},Ee("shaka.media.IClosedCaptionParser",Hp);function Ci(e){this.l=new K1,(e=u5(e.toLowerCase()))&&(this.l=e()),this.h=new zp,(e=Tc)&&(this.h=e())}Ci.prototype.init=function(e,t){t!==void 0&&t||this.g(),this.l.init(e)},Ci.prototype.i=function(e){e=this.l.parse(e),e=w(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=Ye(t.packet);0<n.length&&this.h.extract(n,t.pts)}return this.h.decode()},Ci.prototype.g=function(){this.h.clear()},Ci.prototype.j=function(){return this.h.getStreams()};function W1(e,t){X1.set(e,t)}function u5(e){return X1.get(e)}Ee("shaka.media.ClosedCaptionParser",Ci),Ci.findDecoder=function(){return Tc},Ci.unregisterDecoder=function(){Tc=null},Ci.registerDecoder=function(e){Tc=e},Ci.findParser=u5,Ci.unregisterParser=function(e){X1.delete(e)},Ci.registerParser=W1;var X1=new Map,Tc=null;function Vu(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=ci,this.scroll=l5}Ee("shaka.text.CueRegion",Vu);var ci=1;Vu.units={PX:0,PERCENTAGE:ci,LINES:2};var l5="";Vu.scrollMode={NONE:l5,UP:"up"};function c5(e,t){return typeof e=="number"&&typeof t=="number"&&isNaN(e)&&isNaN(t)?!0:e===t}function da(e,t){t=e.indexOf(t),-1<t&&e.splice(t,1)}function Y1(e,t,n){if(n||(n=c5),e.length!=t.length)return!1;t=t.slice(),e=w(e);for(var r=e.next(),i={};!r.done;i={ah:void 0},r=e.next()){if(i.ah=r.value,r=t.findIndex(function(a){return function(u){return n(a.ah,u)}}(i)),r==-1)return!1;t[r]=t[t.length-1],t.pop()}return t.length==0}function Ac(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=c5),e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Ec(e){this.h=e||"",this.g=0}function Cc(e){$u(e,/[ \t]+/gm)}function $u(e,t){return t.lastIndex=e.g,t=t.exec(e.h),t=t==null?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||t==null||t.position!=e.g?null:(e.g+=t.length,t.results)}function zu(e){return e.g==e.h.length?null:(e=$u(e,/[^ \t\n]*/gm))?e[0]:null}function qp(e){if(e=$u(e,R7),e==null)return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function Ic(e){return e?qp(new Ec(e)):null}var R7=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Ua(e){function t(r){switch(typeof r){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return r;default:if(!r||ArrayBuffer.isView(r))return r;if(n.has(r))return null;var i=r.constructor==Array;if(r.constructor!=Object&&!i)return null;n.add(r);var a=i?[]:{},u;for(u in r)a[u]=t(r[u]);return i&&(a.length=r.length),a}}var n=new WeakSet;return t(e)}function Hu(e){var t={},n;for(n in e)t[n]=e[n];return t}function J1(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var r=n.toString(),i=e[n];i!==void 0&&(i=J1(i))&&t.push(r+":"+i)}e="["+t.join(",")+"]"}else if(typeof e=="function")e="";else if(e instanceof Object){for(n=Object.keys(e),n.sort(),t=[],n=w(n),r=n.next();!r.done;r=n.next())i=r.value,r=JSON.stringify(i),i=e[i],i!==void 0&&(i=J1(i))&&t.push(r+":"+i);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}function Gp(e,t){var n=n===void 0?!1:n;return e=eo(e),qu(e,t,n)}function qu(e,t,n){return e=N7(e,n===void 0?!1:n),!t&&e.length?e[0]:(e=e.find(function(r){return t.split(",").includes(r.tagName)}))?e:null}function Q1(e){return eb.has(e)?eb.get(e):""}function N7(e,t){function n(a,u){u=u===void 0?!1:u;for(var l=[];e[i];)if(e.charCodeAt(i)==60){if(e.charCodeAt(i+1)===47){u=i+2,i=e.indexOf(">",i),u=e.substring(u,i);var p=u.indexOf(a);if(p==-1){var g=a.indexOf(".");0<g&&(p=u.indexOf(a.substring(0,g)))}if(p==-1)throw a=e.substring(0,i).split(`
`),Error(`Unexpected close tag
Line: `+(a.length-1)+`
Column: `+(a[a.length-1].length+1)+`
Char: `+e[i]);i+1&&(i+=1);break}else if(e.charCodeAt(i+1)===33){if(e.charCodeAt(i+2)==45){for(;i!==-1&&(e.charCodeAt(i)!==62||e.charCodeAt(i-1)!=45||e.charCodeAt(i-2)!=45||i==-1);)i=e.indexOf(">",i+1);i===-1&&(i=e.length)}else if(e.charCodeAt(i+2)===91&&e.charCodeAt(i+8)===91&&e.substr(i+3,5).toLowerCase()==="cdata"){p=e.indexOf("]]>",i),p==-1?(l.push(e.substr(i+9)),i=e.length):(l.push(e.substring(i+9,p)),i=p+3);continue}i++;continue}e:{g=u,i++;var v=r(),y={};for(p=[];e.charCodeAt(i)!==62&&e[i];){var x=e.charCodeAt(i);if(64<x&&91>x||96<x&&123>x){x=r();for(var S=e.charCodeAt(i);S&&S!==39&&S!==34&&!(64<S&&91>S||96<S&&123>S)&&S!==62;)i++,S=e.charCodeAt(i);var k=i+1;if(i=e.indexOf(e[i],k),k=e.slice(k,i),S===39||S===34){if(i===-1){if(g={tagName:v,attributes:y,children:p,parent:null},t)for(v=0;v<p.length;v++)typeof p[v]!="string"&&(p[v].parent=g);p=g;break e}}else k=null,i--;if(x.startsWith("xmlns:")){S=k;var C=x.split(":")[1];eb.set(S,C),tb.set(C,S)}v==="tt"&&x==="xml:space"&&k==="preserve"&&(g=!0),y[x]=k}i++}for(e.charCodeAt(i-1)!==47?(i++,p=n(v,g)):i++,g={tagName:v,attributes:y,children:p,parent:null},v=p.length,y=0;y<v;y++)x=p[y],typeof x!="string"?t&&(x.parent=g):y==v-1&&x==`
`&&p.pop();p=g}if(l.push(p),typeof p=="string")break;p.tagName[0]==="?"&&p.children&&(l.push.apply(l,U(p.children)),p.children=[])}else p=i,i=e.indexOf("<",i)-1,i===-2&&(i=e.length),p=e.slice(p,i+1),u?0<p.length&&l.push(p):(l.length&&p.length==1&&p[0]==`
`||0<p.trim().length)&&l.push(p),i++;return l}function r(){for(var a=i;`\r
	>/= `.indexOf(e[i])===-1&&e[i];)i++;return e.slice(a,i)}var i=0;return n("")}function Kg(e){return typeof e=="string"}function d5(e){var t=[];if(!e.children)return[];e=w(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n!="string"&&t.push(n);return t}function Gt(e,t){var n=[];if(!e.children)return[];e=w(e.children);for(var r=e.next();!r.done;r=e.next())r=r.value,r.tagName===t&&n.push(r);return n}function jn(e){return typeof e=="string"?Wr(e):(e=e.children.reduce(function(t,n){return typeof n=="string"?t+n:t},""),e===""?null:Wr(e))}function Ii(e){return Array.from(e.children).every(function(t){return typeof t=="string"})?((e=jn(e))&&(e=e.trim()),e):null}function Fa(e,t,n){if(n=n===void 0?[]:n,e.tagName===t&&n.push(e),e.children){e=w(e.children);for(var r=e.next();!r.done;r=e.next())Fa(r.value,t,n)}return n}function Nn(e,t){return e=Gt(e,t),e.length!=1?null:e[0]}function pa(e,t,n){return e=p5(e,t,n),e.length!=1?null:e[0]}function st(e,t,n,r){r=r===void 0?null:r;var i=null;return e=e.attributes[t],e!=null&&(i=n(e)),i??r}function Lo(e,t,n){return t=Q1(t),e.attributes[t+":"+n]||null}function p5(e,t,n){var r=Q1(t);if(t=[],e.children)for(n=r?r+":"+n:n,e=w(e.children),r=e.next();!r.done;r=e.next())(r=r.value)&&r.tagName===n&&t.push(r);return t}function to(e,t,n){t=w(t);for(var r=t.next();!r.done;r=t.next())if(r=Lo(e,r.value,n))return r;return null}function _s(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function no(e){return!e||(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(e),!e)?null:(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null)}function Wg(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return!t||(e=Number(t[1]),!isFinite(e))?null:(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null)}function Fr(e){return e=Number(e),e%1===0?e:null}function Ro(e){return e=Number(e),e%1===0&&0<e?e:null}function _r(e){return e=Number(e),e%1===0&&0<=e?e:null}function Kp(e){return e=Number(e),isNaN(e)?null:e}function Xg(e){return e?e.toLowerCase()==="true":!1}function O7(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function Yg(e){var t=[];e=Wr(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/),e=w(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=n.match(/^([\w]+)/);if(r){var i=n.match(/(@id='(.*?)')/),a=n.match(/(@t='(\d+)')/),u=n.match(/(@n='(\d+)')/),l=n.match(/\[(\d+)\]/);t.push({name:r[0],id:i?i[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:a?Number(a[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:u?Number(u[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:l?Number(l[1])-1:null,ac:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].ac=n.slice(1))}return t}function h5(e,t){var n=Yg(t.attributes.sel||"");if(n.length){var r=n[n.length-1],i=t.attributes.pos||null;n=r.position,n==null&&(r.t!==null&&(n=f5(e,"t",r.t)),r.n!==null&&(n=f5(e,"n",r.n))),n===null?n=i==="prepend"?0:e.length:i==="prepend"?--n:i==="after"&&++n,i=t.tagName,(r=r.ac)&&e[n]?g5(e[n],i,r,Ii(t)||""):(i!=="remove"&&i!=="replace"||e.splice(n,1),i!=="add"&&i!=="replace"||e.splice.apply(e,[n,0].concat(U(t.children))))}}function f5(e,t,n){var r=0;e=w(e);for(var i=e.next();!i.done;i=e.next()){if(Number(i.value.attributes[t])===n)return r;r++}return null}function g5(e,t,n,r){t==="remove"?delete e.attributes[n]:(t==="add"||t==="replace")&&(e.attributes[n]=r)}function m5(e){var t="",n=e.tagName.split(":");0<n.length&&(t=n[0],t=tb.has(t)?tb.get(t):""),t=document.createElementNS(t,e.tagName);for(var r in e.attributes)t.setAttribute(r,e.attributes[r]);for(e=w(e.children),r=e.next();!r.done;r=e.next())r=r.value,n=void 0,typeof r=="string"?n=new Text(r):n=m5(r),t.appendChild(n);return t}function Z1(e){if(!e)return null;var t={tagName:e.tagName,attributes:Hu(e.attributes),children:[],parent:null};e=w(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"||(n=Z1(n),n.parent=t),t.children.push(n);return t}var eb=new Map,tb=new Map;function un(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new Vu,this.position=null,this.positionAlign=Zg,this.size=0,this.textAlign=ro,this.direction=Yp,this.writingMode=Gu,this.lineInterpretation=Jp,this.line=null,this.lineHeight="",this.lineAlign=Ku,this.displayAlign=Xp,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=k5,this.fontStyle=ib,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",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={oc:32,rows:15}}function v5(e,t){return e=new un(e,t,""),e.lineBreak=!0,e}un.prototype.clone=function(){var e=new un(0,0,""),t;for(t in this)e[t]=this[t],e[t]&&e[t].constructor==Array&&(e[t]=e[t].slice());return e};function Jg(e,t){if(e.payload!=t.payload||!(.001>Math.abs(e.startTime-t.startTime)&&.001>Math.abs(e.endTime-t.endTime)))return!1;for(var n in e)if(n!="startTime"&&n!="endTime"&&n!="payload"){if(n=="nestedCues"){if(!Ac(e.nestedCues,t.nestedCues,Jg))return!1}else if(n=="region"||n=="cellResolution"){for(var r in e[n])if(e[n][r]!=t[n][r])return!1}else if(Array.isArray(e[n])){if(!Ac(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function Qg(e,t){t=t===void 0?new Map:t;var n=e.payload;if(n.includes("<")){t.size===0&&y5(t);var r=n;n=[];for(var i=-1,a=0;a<r.length;a++)r[a]==="<"?i=a+1:r[a]===">"&&0<i&&(i=r.substr(i,a-i),i.match(F7)&&n.push(i),i=-1);for(n=w(n),a=n.next();!a.done;a=n.next())a=a.value,r=r.replace("<"+a+">",'<div time="'+a+'">'),r+="</div>";e:{a=r,i=[];var u=-1;n="",r=!1;for(var l=0;l<a.length;l++)if(a[l]==="/"){var p=a.indexOf(">",l);if(p===-1){n=a;break e}if((p=a.substring(l+1,p))&&p=="v"){r=!0;var g=null;if(i.length&&(g=i[i.length-1]),g){if(g===p)n+="/"+p+">";else{if(!g.startsWith("v")){n+=a[l];continue}n+="/"+g+">"}l+=p.length+1}else n+=a[l]}else n+=a[l]}else a[l]==="<"?(u=l+1,a[u]!="v"&&(u=-1)):a[l]===">"&&0<u&&(i.push(a.substr(u,l-u)),u=-1),n+=a[l];for(a=w(i),i=a.next();!i.done;i=a.next())i=i.value,u=i.replace(" ",".voice-"),n=n.replace("<"+i+">","<"+u+">"),n=n.replace("</"+i+">","</"+u+">"),r||(n+="</"+u+">")}n=U7(n),e.payload="";try{var v=qu("<span>"+n+"</span>","span")}catch{}if(v)if(v=v.children,v.length!=1||v[0].tagName)for(v=w(v),n=v.next();!n.done;n=v.next())b5(n.value,e,t);else e.payload=Wr(n);else e.payload=Wr(n)}else e.payload=Wr(n)}function y5(e){for(var t=w(Object.entries(x5)),n=t.next();!n.done;n=t.next()){var r=w(n.value);n=r.next().value,r=r.next().value;var i=new un(0,0,"");i.color=r,e.set("."+n,i)}for(t=w(Object.entries(S5)),n=t.next();!n.done;n=t.next())r=w(n.value),n=r.next().value,r=r.next().value,i=new un(0,0,""),i.backgroundColor=r,e.set("."+n,i)}function U7(e){var t={"< ":""," >":" &gt;"},n=/(< +>|<\s|\s>)/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,function(i){return t[i]||""}):e||""}function b5(e,t,n){var r=t.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new Vu,r.position=null,r.size=0,r.textAlign=ro,e.tagName)for(var i=w(e.tagName.split(/(?=[ .])+/g)),a=i.next();!a.done;a=i.next()){var u=a=a.value;if(u.startsWith(".voice-")){var l=u.split("-").pop();u='v[voice="'+l+'"]',n.has(u)||(u="v[voice="+l+"]")}switch(n.has(u)&&(l=r,u=n.get(u))&&(l.backgroundColor=Wp(u.backgroundColor,l.backgroundColor),l.color=Wp(u.color,l.color),l.fontFamily=Wp(u.fontFamily,l.fontFamily),l.fontSize=Wp(u.fontSize,l.fontSize),l.textShadow=Wp(u.textShadow,l.textShadow),l.fontWeight=u.fontWeight,l.fontStyle=u.fontStyle,l.opacity=u.opacity,l.rubyTag=u.rubyTag,l.textCombineUpright=u.textCombineUpright,l.wrapLine=u.wrapLine),a){case"br":r=v5(r.startTime,r.endTime),t.nestedCues.push(r);return;case"b":r.fontWeight=Mc;break;case"i":r.fontStyle=_c;break;case"u":r.textDecoration.push(No);break;case"font":(a=e.attributes.color)&&(r.color=a);break;case"div":if(a=e.attributes.time,!a)break;(a=Ic(a))&&(r.startTime=a);break;case"ruby":case"rp":case"rt":r.rubyTag=a}}if(i=e.children,Kg(e)||i.length==1&&Kg(i[0]))for(n=jn(e).split(`
`),e=!0,n=w(n),i=n.next();!i.done;i=n.next())i=i.value,e||(e=v5(r.startTime,r.endTime),t.nestedCues.push(e)),0<i.length&&(e=r.clone(),e.payload=Wr(i),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(r),t=w(i),e=t.next();!e.done;e=t.next())b5(e.value,r,n)}function Wp(e,t){return e&&0<e.length?e:t}Ee("shaka.text.Cue",un),un.parseCuePayload=Qg,un.equal=Jg,un.prototype.clone=un.prototype.clone;var Zg="auto";un.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Zg};var ro="center",nb={LEFT:"left",RIGHT:"right",CENTER:ro,START:"start",END:"end"};un.textAlign=nb;var Xp="after",w5={BEFORE:"before",CENTER:"center",AFTER:Xp};un.displayAlign=w5;var Yp="ltr";un.direction={HORIZONTAL_LEFT_TO_RIGHT:Yp,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Gu="horizontal-tb";un.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Gu,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Jp=0;un.lineInterpretation={LINE_NUMBER:Jp,PERCENTAGE:1};var Ku="start",rb={CENTER:"center",START:Ku,END:"end"};un.lineAlign=rb;var x5={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};un.defaultTextColor=x5;var S5={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};un.defaultTextBackgroundColor=S5;var k5=400,Mc=700;un.fontWeight={NORMAL:k5,BOLD:Mc};var ib="normal",_c="italic",T5={NORMAL:ib,ITALIC:_c,OBLIQUE:"oblique"};un.fontStyle=T5;var No="underline";un.textDecoration={UNDERLINE:No,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var F7=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Ds(){}Ds.prototype.destroy=function(){};function Oo(e,t,n){ab.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,se:t})}function Ps(e,t){for(var n=e.toLowerCase().split(";")[0],r=w([A5,sb,ob,Ls]),i=r.next();!i.done;i=r.next())if(i=ab.get(n+"-"+i.value)){var a=i.se(),u=a.isSupported(e,t);if(a.destroy(),u)return i.se}return null}Ee("shaka.transmuxer.TransmuxerEngine",Ds),Ds.findTransmuxer=Ps,Ds.unregisterTransmuxer=function(e,t){ab.delete(e.toLowerCase().split(";")[0]+"-"+t)},Ds.registerTransmuxer=Oo,Ds.prototype.destroy=Ds.prototype.destroy;var ab=new Map,Ls=1,ob=2,sb=3,A5=4;Ds.PluginPriority={FALLBACK:Ls,PREFERRED_SECONDARY:ob,PREFERRED:sb,APPLICATION:A5};function ub(){}function Dn(e,t){var n=e;return t&&!Uo.includes(e)&&(n+='; codecs="'+t+'"'),n}function Dc(e,t){return t&&(e+='; codecs="'+t+'"'),e}function lb(e,t,n){var r=Dn(e,t);return t=Dc(e,t),Ps(t)?(e=Ps(t))?(e=e(),n=e.convertCodecs(n,t),e.destroy()):n=t:n=e!="video/mp2t"&&n=="audio"?r.replace("video","audio"):r,n}function j7(e,t,n){var r=[t];return B7.forEach(function(i,a){var u=e[a];a=="codecs"?Uo.includes(e.mimeType)||r.push('codecs="'+n+'"'):u&&r.push(i+'="'+u+'"')}),e.hdr=="PQ"&&r.push('eotf="smpte2084"'),r.join(";")}function em(e){return e.split(";")[0].split("/")[1]}function yr(e){var t=E5(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case(e==="mp4a"&&t==="69"):case(e==="mp4a"&&t==="6b"):case(e==="mp4a"&&t==="40.34"):return"mp3";case(e==="mp4a"&&t==="66"):case(e==="mp4a"&&t==="67"):case(e==="mp4a"&&t==="68"):case(e==="mp4a"&&t==="40.2"):case(e==="mp4a"&&t==="40.02"):case(e==="mp4a"&&t==="40.5"):case(e==="mp4a"&&t==="40.05"):case(e==="mp4a"&&t==="40.29"):case(e==="mp4a"&&t==="40.42"):return"aac";case(e==="mp4a"&&t==="a5"):case e==="ac3":case e==="ac-3":return"ac-3";case(e==="mp4a"&&t==="a6"):case e==="eac3":case e==="ec-3":return"ec-3";case e==="ac-4":return"ac-4";case(e==="mp4a"&&t==="b2"):return"dtsx";case(e==="mp4a"&&t==="a9"):return"dtsc";case e==="vp09":return"vp9";case e==="avc1":case e==="avc3":return"avc";case e==="hvc1":case e==="hev1":return"hevc";case e==="vvc1":case e==="vvi1":return"vvc";case e==="dvh1":case e==="dvhe":return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case e==="dvav":case e==="dva1":return"dovi-avc";case e==="dav1":return"dovi-av1";case e==="dvc1":case e==="dvi1":return"dovi-vvc"}return e}function Rs(e){var t=[];e=w(e.split(","));for(var n=e.next();!n.done;n=e.next())n=E5(n.value),t.push(n[0]);return t.sort().join(",")}function di(e){return e.split(";")[0]}function pi(e){return e=e.split(/ *; */),e.shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function cb(e){return e==="application/x-mpegurl"||e==="application/vnd.apple.mpegurl"}function E5(e){e=e.split(".");var t=e[0];return e.shift(),[t,e.join(".")]}Ee("shaka.util.MimeUtils",ub),ub.getFullTypeWithAllCodecs=Dc,ub.getFullType=Dn;var B7=new Map().set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Uo=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Fo(e){this.i=null,this.j=e,this.B=!1,this.l=this.u=0,this.m=1/0,this.h=this.g=null,this.C="",this.A=function(){},this.o=new Map}function pr(e,t){Qp.set(e,t)}function tm(e){return Qp.get(e)}function Pc(e){return Qp.has(e)?!0:e=="application/cea-608"||e=="application/cea-708"?!!Tc:!1}Fo.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()};function V7(e,t,n,r,i){var a,u,l,p,g,v,y;return P(function(x){if(x.g==1)return T(x,Promise.resolve(),2);if(!e.i||!e.j)return x.return();if(n==null||r==null)return e.i.parseInit(Ye(t)),x.return();for(a=e.B?n:e.u,u={periodStart:e.u,segmentStart:n,segmentEnd:r,vttOffset:a},l=e.i.parseMedia(Ye(t),u,i,[]),p=w(l),g=p.next();!g.done;g=p.next())v=g.value,e.A(v,i||null,u);y=l.filter(function(S){return S.startTime>=e.l&&S.startTime<e.m}),e.j.append(y),e.g==null&&(e.g=Math.max(n,e.l)),e.h=Math.min(r,e.m),oe(x)})}Fo.prototype.remove=function(e,t){var n=this;return P(function(r){if(r.g==1)return T(r,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||n.g==null||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),oe(r)})};function $7(e,t,n){e.l=t,e.m=n}function C5(e,t,n){if(e.C=t,t=e.o.get(t))for(var r=w(t.keys()),i=r.next();!i.done;i=r.next())(i=t.get(i.value).filter(function(a){return a.endTime<=n}))&&e.j.append(i)}function I5(e,t,n){t.startTime+=n,t.endTime+=n,t=w(t.nestedCues);for(var r=t.next();!r.done;r=t.next())I5(e,r.value,n)}function z7(e,t,n,r,i){var a=n+" "+r,u=new Map;t=w(t);for(var l=t.next();!l.done;l=t.next()){var p=l.value;l=p.stream,p=p.cue,u.has(l)||u.set(l,new Map),u.get(l).has(a)||u.get(l).set(a,[]),I5(e,p,i),p.startTime>=e.l&&p.startTime<e.m&&(u.get(l).get(a).push(p),l==e.C&&e.j.append([p]))}for(i=w(u.keys()),a=i.next();!a.done;a=i.next())for(a=a.value,e.o.has(a)||e.o.set(a,new Map),t=w(u.get(a).keys()),l=t.next();!l.done;l=t.next())l=l.value,p=u.get(a).get(l),e.o.get(a).set(l,p);e.g=e.g==null?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(r,e.m))}Ee("shaka.text.TextEngine",Fo),Fo.prototype.destroy=Fo.prototype.destroy,Fo.findParser=tm,Fo.unregisterParser=function(e){Qp.delete(e)},Fo.registerParser=pr;var Qp=new Map;function H7(e,t){return e.concat(t)}function q7(){}function Ns(e){return e!=null}function Zp(e,t){return Promise.race([t,new Promise(function(n,r){new Tt(r).da(e)})])}function ha(){}function Lc(e,t){return e=Jt(e),t=Jt(t),e.split("-")[0]==t.split("-")[0]}function eh(e,t){return e=Jt(e),t=Jt(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&e.length==1&&t.length==2}function db(e,t){return e=Jt(e),t=Jt(t),e=e.split("-"),t=t.split("-"),e.length==2&&t.length==2&&e[0]==t[0]}function Jt(e){e=w(e.split("-x-"));var t=e.next().value;t=t===void 0?"":t,e=e.next().value,e=e===void 0?"":e;var n=w(t.split("-"));return t=n.next().value,t=t===void 0?"":t,n=n.next().value,n=n===void 0?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=M5.get(t)||t,n=n.toUpperCase(),(n?t+"-"+n:t)+(e?"-"+e:"")}function Wu(e,t){return e=Jt(e),t=Jt(t),t==e?4:eh(t,e)?3:db(t,e)?2:eh(e,t)?1:0}function pb(e){var t=e.indexOf("-");return e=0<=t?e.substring(0,t):e,e=e.toLowerCase(),e=M5.get(e)||e}function hb(e){return e.language?Jt(e.language):e.audio&&e.audio.language?Jt(e.audio.language):e.video&&e.video.language?Jt(e.video.language):"und"}function nm(e,t){e=Jt(e);var n=new Set;t=w(t);for(var r=t.next();!r.done;r=t.next())n.add(Jt(r.value));for(t=w(n),r=t.next();!r.done;r=t.next())if(r=r.value,r==e)return r;for(t=w(n),r=t.next();!r.done;r=t.next())if(r=r.value,eh(r,e))return r;for(t=w(n),r=t.next();!r.done;r=t.next())if(r=r.value,db(r,e))return r;for(n=w(n),t=n.next();!t.done;t=n.next())if(t=t.value,eh(e,t))return t;return null}Ee("shaka.util.LanguageUtils",ha),ha.findClosestLocale=nm,ha.getLocaleForVariant=hb,ha.getLocaleForText=function(e){return Jt(e.language||"und")},ha.getBase=pb,ha.relatedness=Wu,ha.areSiblings=function(e,t){var n=pb(e),r=pb(t);return e!=n&&t!=r&&n==r},ha.normalize=Jt,ha.isSiblingOf=db,ha.isParentOf=eh,ha.areLanguageCompatible=Lc,ha.areLocaleCompatible=function(e,t){return e=Jt(e),t=Jt(t),e==t};var M5=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","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","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","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","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function _5(){}function D5(e,t,n,r,i){function a(I){var _=String(I.width||"")+String(I.height||"")+String(Math.round(I.frameRate||0))+(I.hdr||"")+I.fastSwitching;return I.dependencyStream&&(_+=I.dependencyStream.baseOriginalId||""),_}function u(I){var _=I.language+(I.channelsCount||0)+(I.audioSamplingRate||0)+I.roles.join(",")+I.label+I.groupId+I.fastSwitching;return I.dependencyStream&&(_+=I.dependencyStream.baseOriginalId||""),_}if(i.length){var l=e.textStreams;i=w(i);for(var p=i.next(),g={};!p.done;g={sg:void 0},p=i.next())if(g.sg=p.value,p=l.filter(function(I){return function(_){return!!(_.codecs.startsWith(I.sg)||_.mimeType.startsWith(I.sg))}}(g)),p.length){l=p;break}e.textStreams=l}if(l=e.variants,(t.length||n.length)&&(l=G7(l,t,n)),r.length){for(t=new Ne,n=w(l),l=n.next();!l.done;l=n.next())l=l.value,t.push(String(l.video.width||0),l);var v=[];t.forEach(function(I,_){I=0;var j=[];_=w(_);for(var B=_.next(),q={};!B.done;q={Pe:void 0},B=_.next())q.Pe=B.value,B=r.filter(function(O){return function(R){return O.Pe.decodingInfos[0][R]}}(q)).length,B>I?(I=B,j=[q.Pe]):B==I&&j.push(q.Pe);v.push.apply(v,U(j))}),l=v}for(n=new Set,t=new Set,l=w(l),i=l.next();!i.done;i=l.next())i=i.value,i.audio&&n.add(i.audio),i.video&&t.add(i.video);l=Array.from(n).sort(function(I,_){return I.bandwidth-_.bandwidth});var y=[];for(n=new Map,l=w(l),i=l.next();!i.done;i=l.next()){if(i=i.value,p=u(i),g=n.get(p)||[],g.length){var x=g[g.length-1],S=yr(x.codecs),k=yr(i.codecs);S!=k||i.bandwidth&&x.bandwidth&&!(i.bandwidth>x.bandwidth)||(g.push(i),y.push(i.id))}else g.push(i),y.push(i.id);n.set(p,g)}var C={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};l=Array.from(t).sort(function(I,_){if(!I.bandwidth||!_.bandwidth||I.bandwidth==_.bandwidth){if(I.codecs&&_.codecs&&I.codecs!=_.codecs&&I.width==_.width){var j=yr(I.codecs),B=yr(_.codecs);if(j!=B)return(C[j]||1)-(C[B]||1)}return I.width-_.width}return I.bandwidth-_.bandwidth}),t=Bu();var E=[];for(n=new Map,l=w(l),i=l.next();!i.done;i=l.next()){if(i=i.value,p=a(i),g=n.get(p)||[],g.length){if(x=g[g.length-1],!t&&(S=yr(x.codecs),k=yr(i.codecs),S!==k))continue;S=yr(x.codecs),k=yr(i.codecs),S!=k||i.bandwidth&&x.bandwidth&&!(i.bandwidth>x.bandwidth)||(g.push(i),E.push(i.id))}else g.push(i),E.push(i.id);n.set(p,g)}e.variants=e.variants.filter(function(I){var _=I.audio;return I=I.video,!(_&&!y.includes(_.id)||I&&!E.includes(I.id))})}function G7(e,t,n){t=w(t);for(var r=t.next(),i={};!r.done;i={Lh:void 0},r=t.next())if(i.Lh=r.value,r=e.filter(function(a){return function(u){return u.video&&u.video.codecs.startsWith(a.Lh)}}(i)),r.length){e=r;break}for(n=w(n),t=n.next(),r={};!t.done;r={Cg:void 0},t=n.next())if(r.Cg=t.value,t=e.filter(function(a){return function(u){return u.audio&&u.audio.codecs.startsWith(a.Cg)}}(r)),t.length){e=t;break}return e}function K7(e,t,n){e.variants=e.variants.filter(function(r){return rm(r,t,n)})}function rm(e,t,n){function r(l,p,g){return l>=p&&l<=g}var i=e.video;if(i&&i.width&&i.height){var a=i.width,u=i.height;if(u>a&&(u=w([u,a]),a=u.next().value,u=u.next().value),!r(a,t.minWidth,Math.min(t.maxWidth,n.width))||!r(u,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i.width*i.height,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!r(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function W7(e,t,n,r){return n=n===void 0?[]:n,r=r===void 0?{}:r,P(function(i){return i.g==1?T(i,P5(e,t,0<t.offlineSessionIds.length,n,r),2):(Q7(t),T(i,Z7(t),0))})}function P5(e,t,n,r,i){var a,u;return P(function(l){if(l.g==1)return Ra()&&X7(t.variants),T(l,R5(t.variants,n,!1,r),2);a=null,e&&(u=e.h)&&(a=u.keySystem),t.variants=t.variants.filter(function(p){var g=Y7(p,a,i);if(!g){var v=[];p.audio&&v.push(B5(p.audio)),p.video&&v.push(B5(p.video))}return g}),oe(l)})}function X7(e){var t=new Map().set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set;e=w(e);for(var r=e.next();!r.done;r=e.next())r=r.value,r.video&&n.add(r.video);for(n=w(n),e=n.next();!e.done;e=n.next()){e=e.value,r=w(t);for(var i=r.next();!i.done;i=r.next()){var a=w(i.value);if(i=a.next().value,a=a.next().value,e.codecs.includes(i)){e.codecs=e.codecs.replace(i,a);break}}}}function Y7(e,t,n){if(!e.decodingInfos.some(function(p){return!(!p.supported||t&&(p=p.keySystemAccess)&&(n[p.keySystem]||p.keySystem)!=t)}))return!1;var r=Ra(),i=Rn("Firefox")&&Cs(),a=e.video,u=a&&a.width||0,l=a&&a.height||0;return r&&a&&(1920<u||1080<l)&&(a.codecs.includes("avc1.")||a.codecs.includes("avc3."))||(r=a&&a.dependencyStream)&&!o5(r)?!1:(e=e.audio,!(i&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}function L5(e,t){var n,r,i,a,u,l,p;return P(function(g){if(g.g==1){for(n=function(v,y){if(v){var x=Hu(v);return x.supported=v.supported&&y.supported,x.powerEfficient=v.powerEfficient&&y.powerEfficient,x.smooth=v.smooth&&y.smooth,y.keySystemAccess&&!x.keySystemAccess&&(x.keySystemAccess=y.keySystemAccess),x}return y},r=null,i=[],a=w(t),u=a.next(),l={};!u.done;l={cache:void 0,Rd:void 0},u=a.next())p=u.value,l.Rd=J1(p),l.cache=am,l.cache.has(l.Rd)?r=n(r,l.cache.get(l.Rd)):i.push(J7(p).then(function(v){return function(y){var x=null;y=w(y||[]);for(var S=y.next();!S.done;S=y.next())x=n(x,S.value);x&&(v.cache.set(v.Rd,x),r=n(r,x))}}(l)));return T(g,Promise.all(i),2)}r&&e.decodingInfos.push(r),oe(g)})}function J7(e){var t=[""];e.video&&(t=pi(e.video.contentType).split(","));var n=[""];e.audio&&(n=pi(e.audio.contentType).split(","));var r=[];t=w(t);for(var i=t.next();!i.done;i=t.next()){i=i.value;for(var a=w(n),u=a.next(),l={};!u.done;l={pc:void 0},u=a.next())u=u.value,l.pc=Ua(e),e.video&&(l.pc.video.contentType=Dn(di(l.pc.video.contentType),i)),e.audio&&(l.pc.audio.contentType=Dn(di(l.pc.audio.contentType),u)),r.push(new Promise(function(p){return function(g,v){(Cs()?Zp(5,navigator.mediaCapabilities.decodingInfo(p.pc)):navigator.mediaCapabilities.decodingInfo(p.pc)).then(function(y){g(y)}).catch(v)}}(l)))}return Promise.all(r).catch(function(){return JSON.stringify(e),null})}function R5(e,t,n,r){var i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q;return P(function(O){switch(O.g){case 1:if(e.some(function(R){return R.decodingInfos.length}))return O.return();i=w(r),a=i.next(),u={};case 2:if(a.done){O.s(4);break}u.mh=a.value,l=!1,p=w(e),g=p.next();case 5:if(g.done){O.s(7);break}v=g.value,y=N5(v,t,n).filter(function(R){return function(H){return H=H[0],(H.keySystemConfiguration&&H.keySystemConfiguration.keySystem)===R.mh}}(u)),x=w(y),S=x.next();case 8:if(S.done){O.s(10);break}return k=S.value,T(O,L5(v,k),9);case 9:S=x.next(),O.s(8);break;case 10:v.decodingInfos.length&&(l=!0),g=p.next(),O.s(5);break;case 7:if(l)return O.return();u={mh:void 0},a=i.next(),O.s(2);break;case 4:C=w(e),E=C.next();case 12:if(E.done){O.s(0);break}I=E.value,_=N5(I,t,n).filter(function(R){return R=R[0],R=R.keySystemConfiguration&&R.keySystemConfiguration.keySystem,!R||!r.includes(R)}),j=w(_),B=j.next();case 15:if(B.done){E=C.next(),O.s(12);break}return q=B.value,T(O,L5(I,q),16);case 16:B=j.next(),O.s(15)}})}function N5(e,t,n){var r=e.audio,i=e.video,a=[],u=[];if(i)for(var l=w(i.fullMimeTypes),p=l.next();!p.done;p=l.next()){p=p.value;var g=pi(p);if(g.includes(",")&&!r){var v=g.split(","),y=di(p);g=kc("video",v),v=kc("audio",v),v=th(v,y),y=lb(y,v,"audio"),u.push({contentType:y,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(g=fb(g),p={contentType:lb(di(p),g,"video"),width:i.width||64,height:i.height||64,bitrate:i.bandwidth||e.bandwidth||1,framerate:i.frameRate||1},i.hdr)switch(i.hdr){case"SDR":p.transferFunction="srgb";break;case"PQ":p.transferFunction="pq";break;case"HLG":p.transferFunction="hlg"}i.colorGamut&&(p.colorGamut=i.colorGamut),a.push(p)}if(r)for(l=w(r.fullMimeTypes),p=l.next();!p.done;p=l.next())g=p.value,p=di(g),g=th(pi(g),p),p=lb(p,g,"audio"),u.push({contentType:p,channels:r.channelsCount||2,bitrate:r.bandwidth||e.bandwidth||1,samplerate:r.audioSamplingRate||1,spatialRendering:r.spatialAudio});for(l=[],a.length==0&&a.push(null),u.length==0&&u.push(null),a=w(a),p=a.next();!p.done;p=a.next())for(p=p.value,g=w(u),y=g.next();!y.done;y=g.next())y=y.value,v={type:n?"file":"media-source"},p&&(v.video=p),y&&(v.audio=y),l.push(v);if(u=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]),!u.length)return[l];for(e=[],n=new Map,u=w(u),a=u.next();!a.done;a=u.next())a=a.value,n.get(a.keySystem)||n.set(a.keySystem,[]),n.get(a.keySystem).push(a);for(u=t?"required":"optional",t=t?["persistent-license"]:["temporary"],a=w(n.keys()),p=a.next();!p.done;p=a.next()){for(p=p.value,y=n.get(p),g=new Map,y=w(y),v=y.next();!v.done;v=y.next()){v=v.value;var x=v.videoRobustness+","+v.audioRobustness;g.get(x)||g.set(x,[]),g.get(x).push(v)}for(g=w(g.values()),y=g.next();!y.done;y=g.next()){y=y.value,v=[],x=w(l);for(var S=x.next();!S.done;S=x.next()){S=Object.assign({},S.value);for(var k={keySystem:p,initDataType:"cenc",persistentState:u,distinctiveIdentifier:"optional",sessionTypes:t},C=w(y),E=C.next();!E.done;E=C.next()){if(E=E.value,E.initData&&E.initData.length){for(var I=new Set,_=w(E.initData),j=_.next();!j.done;j=_.next())I.add(j.value.initDataType);k.initDataType=E.initData[0].initDataType}E.distinctiveIdentifierRequired&&(k.distinctiveIdentifier="required"),E.persistentStateRequired&&(k.persistentState="required"),E.sessionType&&(k.sessionTypes=[E.sessionType]),r&&(k.audio?(E.encryptionScheme&&(k.audio.encryptionScheme=k.audio.encryptionScheme||E.encryptionScheme),k.audio.robustness=k.audio.robustness||E.audioRobustness):(k.audio={robustness:E.audioRobustness},E.encryptionScheme&&(k.audio.encryptionScheme=E.encryptionScheme)),k.audio.robustness==""&&delete k.audio.robustness),i&&(k.video?(E.encryptionScheme&&(k.video.encryptionScheme=k.video.encryptionScheme||E.encryptionScheme),k.video.robustness=k.video.robustness||E.videoRobustness):(k.video={robustness:E.videoRobustness},E.encryptionScheme&&(k.video.encryptionScheme=E.encryptionScheme)),k.video.robustness==""&&delete k.video.robustness)}S.keySystemConfiguration=k,v.push(S)}e.push(v)}}return e}function th(e,t){return e.toLowerCase()=="flac"?dr()?"fLaC":"flac":e.toLowerCase()==="opus"?dr()&&em(t)=="mp4"?"Opus":"opus":e.toLowerCase()=="ac-3"&&Mo()?"ec-3":e}function fb(e){if(e.includes("avc1")){var t=e.split(".");if(t.length==3)return e=t.shift()+".",e+=parseInt(t.shift(),10).toString(16),e+=("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if(e=="vp9")return"vp09.00.41.08";return e}function Q7(e){e.textStreams=e.textStreams.filter(function(t){return t=Dn(t.mimeType,t.codecs),Pc(t)})}function Z7(e){var t,n,r,i,a,u,l;return P(function(p){switch(p.g){case 1:t=[],n=w(e.imageStreams),r=n.next();case 2:if(r.done){p.s(4);break}if(i=r.value,a=i.mimeType,a=="application/mp4"&&i.codecs=="mjpg"&&(a="image/jpg"),om.has(a)){p.s(5);break}if(u=nR.get(a),!u){om.set(a,!1),p.s(5);break}return T(p,eR(u),7);case 7:l=p.h,om.set(a,l);case 5:om.get(a)&&t.push(i),r=n.next(),p.s(2);break;case 4:e.imageStreams=t,oe(p)}})}function eR(e){return new Promise(function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then(function(){t(!0)}).catch(function(){t(!1)}):n.onload=n.onerror=function(){t(n.height===2)}})}function Xu(e){var t=e.audio,n=e.video,r=t?t.mimeType:null,i=n?n.mimeType:null,a=t?t.codecs:null,u=n?n.codecs:null,l=t?t.groupId:null,p=[];n&&p.push(n.mimeType),t&&p.push(t.mimeType),p=p[0]||null;var g=[];t&&g.push(t.kind),n&&g.push(n.kind),g=g[0]||null;var v=new Set;if(t)for(var y=w(t.roles),x=y.next();!x.done;x=y.next())v.add(x.value);if(n)for(y=w(n.roles),x=y.next();!x.done;x=y.next())v.add(x.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:g,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:p,audioMimeType:r,videoMimeType:i,codecs:"",audioCodec:a,videoCodec:u,primary:e.primary,roles:Array.from(v),audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:l,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,(r=n.dependencyStream)&&(e.width=r.width||e.width,e.height=r.height||e.height,e.videoCodec=r.codecs||e.videoCodec),u.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=i,n=u.split(",");try{e.videoCodec=kc("video",n),e.audioCodec=kc("audio",n)}catch{}}return t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage,t=t.dependencyStream)&&(e.audioCodec=t.codecs||e.audioCodec),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function nh(e){return{id:e.id,active:!1,type:wt,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null,accessibilityPurpose:e.accessibilityPurpose,originalLanguage:e.originalLanguage}}function gb(e){var t=e.width||null,n=e.height||null,r=null;e.segmentIndex&&(r=Ba(e.segmentIndex));var i=e.tilesLayout;return r&&(i=r.tilesLayout||i),i&&t!=null&&(t/=Number(i.split("x")[0])),i&&n!=null&&(n/=Number(i.split("x")[1])),{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:i||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId,accessibilityPurpose:null,originalLanguage:null}}function mb(e){return e.__shaka_id||(e.__shaka_id=tR++),e.__shaka_id}function O5(e){var t=U5(e);return t.active=e.mode!="disabled",t.type="text",t.originalTextId=e.id,e.kind=="captions"&&(t.mimeType="unknown"),e.kind=="subtitles"&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),e.kind=="forced"&&(t.forced=!0),t}function vb(e){var t=U5(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,e.kind=="main"&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function U5(e){var t=e.language;return{id:mb(e),active:!1,type:"",bandwidth:0,language:Jt(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:t}}function rh(e){return e.allowedByApplication&&e.allowedByKeySystem&&e.disabledUntilTime==0}function im(e){return e.filter(function(t){return rh(t)})}function Rc(e,t,n,r){var i=e,a=e.filter(function(p){return p.primary});a.length&&(i=a);var u=i.length?i[0].language:"";if(i=i.filter(function(p){return p.language==u}),t){var l=nm(Jt(t),e.map(function(p){return p.language}));l&&(i=e.filter(function(p){return Jt(p.language)==l}))}if(i=i.filter(function(p){return p.forced==r}),n){if(e=F5(i,n),e.length)return e}else if(e=i.filter(function(p){return p.roles.length==0}),e.length)return e;return e=i.map(function(p){return p.roles}).reduce(H7,[]),e.length?F5(i,e[0]):i}function F5(e,t){return e.filter(function(n){return n.roles.includes(t)})}function j5(e,t){t.length&&(t=t.filter(function(n){return yr(e.codecs)==yr(n.codecs)}).sort(function(n,r){return n.bandwidth&&r.bandwidth&&n.bandwidth!=r.bandwidth?n.bandwidth-r.bandwidth:(n.width||0)-(r.width||0)}),e.trickModeVideo=t[0],1<t.length&&(t=t.find(function(n){return e.width==n.width&&e.height==n.height})))&&(e.trickModeVideo=t)}function B5(e){return e.type=="audio"?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:e.type=="video"?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function V5(e,t,n){if(n.autoShowText==0)return!1;if(n.autoShowText==1)return!0;var r=Jt(n.preferredTextLanguage);return t=Jt(t.language),n.autoShowText==2?Lc(t,r):n.autoShowText==3?e?(e=Jt(e.language),Lc(t,r)&&!Lc(e,t)):!1:(Be("Invalid autoShowText setting!"),!1)}Ee("shaka.util.StreamUtils",_5),_5.meetsRestrictions=rm;var am=new Map,tR=0,om=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),nR=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function xn(){var e=this;this.G=null,this.o=!1,this.m=new ct,this.j=new Ce,navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(e.o&&e.g.useNetworkInformation){e.m=new ct,e.g&&e.m.configure(e.g.advanced);var t=e.chooseVariant();t&&navigator.onLine&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.F=[],this.H=1,this.I=!1,this.h=this.l=this.g=this.u=null,this.A=new Tt(function(){if(e.o&&(e.g.restrictToElementSize||e.g.restrictToScreenSize)){var t=e.chooseVariant();t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.B=d,"documentPictureInPicture"in d&&this.j.D(d.documentPictureInPicture,"enter",function(){e.B=d.documentPictureInPicture.window,e.A&&e.A.sb(),e.j.ma(e.B,"pagehide",function(){e.B=d,e.A&&e.A.sb()})}),this.C=this.i=null}f=xn.prototype,f.stop=function(){this.G=null,this.o=!1,this.F=[],this.H=1,this.l=this.u=null,this.h&&(this.h.disconnect(),this.h=null),this.A.stop(),this.C=this.i=null},f.release=function(){this.j.release(),this.A=null},f.init=function(e){this.G=e},f.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;e=this.B.screen.height*n,t=this.B.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;var r=this.l.clientHeight,i=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(r=this.i.height,i=this.i.width),e=Math.min(e,r*n),t=Math.min(t,i*n)}if(n=this.F.filter(function(g){return g&&!(g.audio&&g.audio.fastSwitching||g.video&&g.video.fastSwitching)}),n.length||(n=this.F),r=n,n.length!=this.F.length&&(r=this.F.filter(function(g){return g&&!!(g.audio&&g.audio.fastSwitching||g.video&&g.video.fastSwitching)})),n=yb(this,this.g.restrictions,r,1/0,1/0),e!=1/0||t!=1/0){for(n=rR(n),n=w(n),i=n.next();!i.done;i=n.next())if(i=i.value,i.height>=e&&i.width>=t){e=i.height,t=i.width;break}n=yb(this,this.g.restrictions,r,e,t)}for(e=this.getBandwidthEstimate(),r.length&&!n.length&&(n=yb(this,null,r,1/0,1/0),n=[n[0]]),t=n[0]||null,r=0;r<n.length;r++){i=n[r];for(var a=isNaN(this.H)?1:Math.abs(this.H),u=a*i.bandwidth/this.g.bandwidthDowngradeTarget,l={bandwidth:1/0},p=r+1;p<n.length;p++)if(i.bandwidth!=n[p].bandwidth){l=n[p];break}a=a*l.bandwidth/this.g.bandwidthUpgradeTarget,e>=u&&e<=a&&(t.bandwidth!=i.bandwidth||t.bandwidth==i.bandwidth&&t.video&&i.video&&(t.video.width<i.video.width||t.video.height<i.video.height))&&(t=i)}return this.u=Date.now(),t},f.enable=function(){this.o=!0},f.disable=function(){this.o=!1},f.segmentDownloaded=function(e,t,n){e<this.g.cacheLoadThreshold||(this.m.sample(e,t),n&&this.u!=null&&this.o&&$5(this))},f.trySuggestStreams=function(){this.u!=null&&this.o&&$5(this)},f.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.m.getBandwidthEstimate(e),this.C?this.C.getBandwidthEstimate(e):e)},f.setVariants=function(e){this.F=e},f.playbackRateChanged=function(e){this.H=e},f.setMediaElement=function(e){function t(){n.A.da(iR)}var n=this;this.l=e,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in d&&(this.h=new ResizeObserver(t),this.h.observe(this.l)),this.j.D(e,"enterpictureinpicture",function(r){r.pictureInPictureWindow&&(n.i=r.pictureInPictureWindow,n.j.D(n.i,"resize",t))}),this.j.D(e,"leavepictureinpicture",function(){n.i&&n.j.Ja(n.i,"resize",t),n.i=null})},f.setCmsdManager=function(e){this.C=e},f.configure=function(e){this.g=e,this.m&&this.g&&this.m.configure(this.g.advanced)};function $5(e){if(!e.I){var t=e.m;if(!(t.g>=t.i))return;e.I=!0,e.u-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.u<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function yb(e,t,n,r,i){if(e.C){var a=e.C.Ug();a&&(n=n.filter(function(u){return u.bandwidth&&a?u.bandwidth<=a:!0}))}return t&&(n=n.filter(function(u){return rm(u,t,{width:i,height:r})})),n.sort(function(u,l){return u.bandwidth-l.bandwidth})}function rR(e){var t=[];e=w(e);for(var n=e.next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(r,i){return r.width-i.width})}Ee("shaka.abr.SimpleAbrManager",xn),xn.prototype.configure=xn.prototype.configure,xn.prototype.setCmsdManager=xn.prototype.setCmsdManager,xn.prototype.setMediaElement=xn.prototype.setMediaElement,xn.prototype.playbackRateChanged=xn.prototype.playbackRateChanged,xn.prototype.setVariants=xn.prototype.setVariants,xn.prototype.getBandwidthEstimate=xn.prototype.getBandwidthEstimate,xn.prototype.trySuggestStreams=xn.prototype.trySuggestStreams,xn.prototype.segmentDownloaded=xn.prototype.segmentDownloaded,xn.prototype.disable=xn.prototype.disable,xn.prototype.enable=xn.prototype.enable,xn.prototype.chooseVariant=xn.prototype.chooseVariant,xn.prototype.init=xn.prototype.init,xn.prototype.release=xn.prototype.release,xn.prototype.stop=xn.prototype.stop;var iR=1;Ee("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function z5(e,t){var n=ja();this.l=e.maxAttempts==null?n.maxAttempts:e.maxAttempts,this.j=e.baseDelay==null?n.baseDelay:e.baseDelay,this.o=e.fuzzFactor==null?n.fuzzFactor:e.fuzzFactor,this.m=e.backoffFactor==null?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=t===void 0?!1:t)&&(this.g=1)}function H5(e){var t,n;return P(function(r){if(r.g==1){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new $(2,7,1010);return t=e.g,e.g++,t==0?r.return():(n=e.h*(1+(2*Math.random()-1)*e.o),T(r,new Promise(function(i){new Tt(i).da(n/1e3)}),2))}e.h*=e.m,oe(r)})}function ja(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function Wt(){var e,t,n=new Promise(function(r,i){e=r,t=i});return n.resolve=e,n.reject=t,n}Wt.prototype.resolve=function(){},Wt.prototype.reject=function(){};function Pn(e,t){this.promise=e,this.i=t,this.g=null}function Yu(e){return new Pn(Promise.reject(e),function(){return Promise.resolve()})}function bb(){var e=Promise.reject(new $(2,7,7001));return e.catch(function(){}),new Pn(e,function(){return Promise.resolve()})}function Nc(e){return new Pn(Promise.resolve(e),function(){return Promise.resolve()})}function q5(e){return new Pn(e,function(){return e.catch(function(){})})}Pn.prototype.abort=function(){return this.g||(this.g=this.i()),this.g};function G5(e){return new Pn(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}Pn.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},Pn.prototype.Ha=function(e,t){function n(l){return function(p){if(i.g&&l)a.reject(u);else{var g=l?e:t;g?r=aR(g,p,a):(l?a.resolve:a.reject)(p)}}}function r(){return a.reject(u),i.abort()}var i=this,a=new Wt;a.catch(function(){});var u=new $(2,7,7001);return this.promise.then(n(!0),n(!1)),new Pn(a,function(){return r()})};function aR(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then(function(){},function(){})})}catch(i){return n.reject(i),function(){return Promise.resolve()}}}N.Object.defineProperties(Pn.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}}),Ee("shaka.util.AbortableOperation",Pn),Pn.prototype.chain=Pn.prototype.Ha,Pn.prototype.finally=Pn.prototype.finally,Pn.all=G5,Pn.prototype.abort=Pn.prototype.abort,Pn.notAbortable=q5,Pn.completed=Nc,Pn.aborted=bb,Pn.failed=Yu;function Ae(e,t){if(t)if(t instanceof Map)for(var n=w(t.keys()),r=n.next();!r.done;r=n.next())r=r.value,Object.defineProperty(this,r,{value:t.get(r),writable:!0,enumerable:!0});else for(n in t)Object.defineProperty(this,n,{value:t[n],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=d.performance&&d.performance.now?d.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function K5(e){var t=new Ae(e.type),n;for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}Ae.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},Ae.prototype.stopImmediatePropagation=function(){this.g=!0},Ae.prototype.stopPropagation=function(){},Ee("shaka.util.FakeEvent",Ae);var sm={Oj:"abrstatuschanged",Pj:"adaptation",Qj:"audiotrackchanged",Rj:"audiotrackschanged",Sj:"boundarycrossed",Tj:"buffering",Uj:"complete",Vj:"downloadcompleted",Wj:"downloadfailed",Xj:"downloadheadersreceived",Yj:"drmsessionupdate",$j:"emsg",uk:"prft",Error:"error",ak:"expirationupdated",bk:"firstquartile",ck:"gapjumped",fk:"keystatuschanged",jk:"loaded",kk:"loading",mk:"manifestparsed",nk:"manifestupdated",pk:"mediaqualitychanged",qk:"mediasourcerecovered",Metadata:"metadata",rk:"midpoint",sk:"nospatialvideoinfo",tk:"onstatechange",vk:"ratechange",xk:"segmentappended",yk:"sessiondata",zk:"spatialvideoinfo",Ak:"stalldetected",Bk:"started",Ck:"statechanged",Dk:"streaming",Ek:"textchanged",Fk:"texttrackvisibility",Gk:"thirdquartile",Hk:"timelineregionadded",Ik:"timelineregionenter",Jk:"timelineregionexit",Kk:"trackschanged",Mk:"unloading",Ok:"variantchanged"};function Xt(){this.Ea=new Ne,this.Ge=this}Xt.prototype.addEventListener=function(e,t){this.Ea&&this.Ea.push(e,t)},Xt.prototype.removeEventListener=function(e,t){this.Ea&&this.Ea.remove(e,t)},Xt.prototype.dispatchEvent=function(e){if(!this.Ea)return!0;var t=this.Ea.get(e.type)||[],n=this.Ea.get("All");for(n&&(t=t.concat(n)),t=w(t),n=t.next();!n.done;n=t.next()){n=n.value,e.target=this.Ge,e.currentTarget=this.Ge;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},Xt.prototype.release=function(){this.Ea=null};function Oc(){this.g=[]}function Ju(e,t){e.g.push(t.finally(function(){da(e.g,t)}))}Oc.prototype.destroy=function(){for(var e=[],t=w(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)};function an(e,t,n,r,i,a,u){Xt.call(this),this.i=!1,this.u=new Oc,this.g=new Set,this.h=new Set,this.m=e||null,this.l=t||null,this.C=n||null,this.F=r||null,this.G=i||null,this.I=a||null,this.H=u||null,this.A=this.B=!1,this.o=16e3,this.j=new Map}Te(an,Xt),f=an.prototype,f.kg=function(e){this.B=e},f.lg=function(e){this.A=e};function jo(e,t,n,r){r=r===void 0?!1:r,n=n||Q5;var i=lm.get(e);(!i||n>=i.priority)&&lm.set(e,{priority:n,se:t,ij:r})}function W5(e,t){for(var n=w(e.g),r=n.next();!r.done;r=n.next())t.g.add(r.value);for(e=w(e.h),n=e.next();!n.done;n=e.next())t.h.add(n.value)}f.lj=function(e){this.g.add(e)},f.Hj=function(e){this.g.delete(e)},f.$h=function(){this.g.clear()},f.mj=function(e){this.h.add(e)},f.Ij=function(e){this.h.delete(e)},f.ai=function(){this.h.clear()},f.Hg=function(){this.j.clear()};function qn(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:n===void 0?null:n}}f.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),this.j.clear(),Xt.prototype.release.call(this),this.u.destroy()},f.request=function(e,t,n){var r=this,i=new J5;if(this.i){var a=Promise.reject(new $(2,7,7001));return a.catch(function(){}),new um(a,function(){return Promise.resolve()},i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Ua(t.retryParameters):ja(),t.uris=Ua(t.uris),a=oR(this,e,t,n);var u=a.Ha(function(){return X5(r,e,t,n,new z5(t.retryParameters,!1),0,null,i)}),l=u.Ha(function(x){return sR(r,e,x,n)}),p=Date.now(),g=0;a.promise.then(function(){g=Date.now()-p},function(){});var v=0;u.promise.then(function(){v=Date.now()},function(){});var y=l.Ha(function(x){var S=Date.now()-v,k=x.response;return k.timeMs+=g,k.timeMs+=S,x.Oi||!r.m||k.fromCache||t.method=="HEAD"||e!=fa||r.m(k.timeMs,k.data.byteLength,Y5(n)),r.H&&r.H(e,k,n),k},function(x){throw x&&(x.severity=2),x});return a=new um(y.promise,function(){return y.abort()},i),Ju(this.u,a),a};function oR(e,t,n,r){function i(l){a=a.Ha(function(){return n.body&&(n.body=li(n.body)),l(t,n,r)})}var a=Nc(void 0);e.G&&i(e.G),e=w(e.g);for(var u=e.next();!u.done;u=e.next())i(u.value);return a.Ha(void 0,function(l){throw l instanceof $&&l.code==7001?l:new $(2,1,1006,l)})}function X5(e,t,n,r,i,a,u,l){e.B&&(n.uris[a]=n.uris[a].replace("https://","http://")),e.A&&(n.uris[a]=n.uris[a].replace("http://","https://")),0<a&&e.I&&e.I(t,r,n.uris[a],n.uris[a-1]);var p=new ee(n.uris[a]),g=p.Kb,v=!1;g||(g=location.protocol,g=g.slice(0,-1),ye(p,g),n.uris[a]=p.toString()),g=g.toLowerCase();var y=(g=lm.get(g))?g.se:null;if(!y)return Yu(new $(2,1,1e3,p));var x=g.ij;(p=e.j.get(p.nb))&&(n.headers["common-access-token"]=p);var S=null,k=null,C=!1,E=!1,I;return q5(H5(i)).Ha(function(){if(e.i)return bb();I=Date.now();var _=0;n.requestStartTime=Date.now();var j=y(n.uris[a],n,t,function(O,R,H){S&&S.stop(),k&&k.da(q/1e3),e.m&&t==fa&&(_++,n.packetNumber=_,e.m(O,R,Y5(r),n),v=!0,l.g=H)},function(O){E=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.l&&e.l(O,n,t)},{minBytesForProgressEvents:e.o});if(!x)return j;var B=n.retryParameters.connectionTimeout;B&&(S=new Tt(function(){C=!0,j.abort()}),S.da(B/1e3));var q=n.retryParameters.stallTimeout;return q&&(k=new Tt(function(){C=!0,j.abort()})),j}).Ha(function(_){S&&S.stop(),k&&k.stop(),_.timeMs==null&&(_.timeMs=Date.now()-I);var j=_.headers["common-access-token"];if(j){var B=new ee(_.uri);e.j.set(B.nb,j)}return j={response:_,Oi:v},!E&&e.l&&e.l(_.headers,n,t),e.C&&e.C(n,_),j},function(_){if(S&&S.stop(),k&&k.stop(),e.F){var j=null,B=0;_ instanceof $&&(j=_,_.code==1001&&(B=_.data[1])),e.F(n,j,B,C)}if(e.i)return bb();if(C&&(_=new $(1,1,1003,n.uris[a],t)),_ instanceof $){if(_.code==7001)throw _;if(_.code==1010)throw u;if(_.severity==1){if(j=new Map().set("error",_),j=new Ae("retry",j),j.cancelable=!0,e.dispatchEvent(j),j.defaultPrevented)throw _;return a=(a+1)%n.uris.length,X5(e,t,n,r,i,a,_,l)}}throw _})}function sR(e,t,n,r){var i=Nc(void 0);e=w(e.h);for(var a=e.next(),u={};!a.done;u={ph:void 0},a=e.next())u.ph=a.value,i=i.Ha(function(l){return function(){var p=n.response;return p.data&&(p.data=li(p.data)),(0,l.ph)(t,p,r)}}(u));return i.Ha(function(){return n},function(l){var p=2;if(l instanceof $){if(l.code==7001)throw l;p=l.severity}throw new $(p,1,1007,l)})}function Y5(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.o)return!1}return!0}Ee("shaka.net.NetworkingEngine",an),an.prototype.request=an.prototype.request,an.prototype.destroy=an.prototype.destroy,an.makeRequest=qn,an.defaultRetryParameters=function(){return ja()},an.prototype.clearCommonAccessTokenMap=an.prototype.Hg,an.prototype.clearAllResponseFilters=an.prototype.ai,an.prototype.unregisterResponseFilter=an.prototype.Ij,an.prototype.registerResponseFilter=an.prototype.mj,an.prototype.clearAllRequestFilters=an.prototype.$h,an.prototype.unregisterRequestFilter=an.prototype.Hj,an.prototype.registerRequestFilter=an.prototype.lj,an.unregisterScheme=function(e){lm.delete(e)},an.registerScheme=jo,an.prototype.setForceHTTPS=an.prototype.lg,an.prototype.setForceHTTP=an.prototype.kg;function J5(){this.g=0}an.NumBytesRemainingClass=J5;function um(e,t,n){Pn.call(this,e,t),this.h=n}Te(um,Pn),an.PendingRequest=um;var fa=1;an.RequestType={MANIFEST:0,SEGMENT:fa,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},an.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var Q5=3;an.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Q5};var lm=new Map;function Uc(e){this.g=!1,this.h=new Wt,this.i=e}Uc.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))};function nn(e,t){if(e.g)throw t instanceof $&&t.code==7003?t:new $(2,7,7003,t)}function wb(e,t){var n=[];e=w(e);for(var r=e.next();!r.done;r=e.next())n.push(t(r.value));return n}function uR(e,t){e=w(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}function Qu(e){for(var t=new Map,n=w(Object.keys(e)),r=n.next();!r.done;r=n.next())r=r.value,t.set(r,e[r]);return t}function xb(e){var t={};return e.forEach(function(n,r){t[r]=n}),t}function ln(e,t){this.h=pn(e),this.i=t==Z5,this.g=0}f=ln.prototype,f.ta=function(){return this.g<this.h.byteLength},f.Ba=function(){return this.g},f.getLength=function(){return this.h.byteLength},f.X=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw Bo()}},f.na=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw Bo()}},f.S=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw Bo()}},f.$f=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw Bo()}},f.bd=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch{throw Bo()}if(2097151<t)throw new $(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},f.Cb=function(e){if(this.g+e>this.h.byteLength)throw Bo();var t=Ye(this.h,this.g,e);return this.g+=e,t},f.skip=function(e){if(this.g+e>this.h.byteLength)throw Bo();this.g+=e},f.qh=function(e){if(this.g<e)throw Bo();this.g-=e},f.seek=function(e){if(0>e||e>this.h.byteLength)throw Bo();this.g=e},f.Cc=function(){for(var e=this.g;this.ta()&&this.h.getUint8(this.g)!=0;)this.g+=1;return e=Ye(this.h,e,this.g-e),this.g+=1,yn(e)};function Bo(){return new $(2,3,3e3)}Ee("shaka.util.DataViewReader",ln),ln.prototype.readTerminatedString=ln.prototype.Cc,ln.prototype.seek=ln.prototype.seek,ln.prototype.rewind=ln.prototype.qh,ln.prototype.skip=ln.prototype.skip,ln.prototype.readBytes=ln.prototype.Cb,ln.prototype.readUint64=ln.prototype.bd,ln.prototype.readInt32=ln.prototype.$f,ln.prototype.readUint32=ln.prototype.S,ln.prototype.readUint16=ln.prototype.na,ln.prototype.readUint8=ln.prototype.X,ln.prototype.getLength=ln.prototype.getLength,ln.prototype.getPosition=ln.prototype.Ba,ln.prototype.hasMoreData=ln.prototype.ta;var Z5=1;ln.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Z5};function Qt(){this.i=new Map,this.h=new Map,this.g=!1}f=Qt.prototype,f.box=function(e,t){return e=e4(e),this.i.set(e,lR),this.h.set(e,t),this},f.R=function(e,t){return e=e4(e),this.i.set(e,t4),this.h.set(e,t),this},f.stop=function(){this.g=!0},f.parse=function(e,t,n){for(e=new ln(e,0),this.g=!1;e.ta()&&!this.g;)this.Yc(0,e,t,n)},f.Yc=function(e,t,n,r){var i=t.Ba();if(r&&i+8>t.getLength())this.g=!0;else{var a=t.S(),u=t.S(),l=cm(u),p=!1;switch(a){case 0:a=t.getLength()-i;break;case 1:if(r&&t.Ba()+8>t.getLength()){this.g=!0;return}a=t.bd(),p=!0}var g=this.h.get(u);if(g){var v=null,y=null;if(this.i.get(u)==t4){if(r&&t.Ba()+4>t.getLength()){this.g=!0;return}y=t.S(),v=y>>>24,y&=16777215}u=i+a,n&&u>t.getLength()&&(u=t.getLength()),r&&u>t.getLength()?this.g=!0:(r=u-t.Ba(),t=0<r?t.Cb(r):new Uint8Array(0),t=new ln(t,0),g({name:l,parser:this,partialOkay:n||!1,version:v,flags:y,reader:t,size:a,start:i+e,has64BitSize:p}))}else t.skip(Math.min(i+a-t.Ba(),t.getLength()-t.Ba()))}};function xt(e){for(var t=Us(e);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function Os(e){for(var t=Us(e),n=e.reader.S(),r=0;r<n&&(e.parser.Yc(e.start+t,e.reader,e.partialOkay),!e.parser.g);r++);}function hi(e){var t=Us(e);for(e.reader.skip(78);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function Sb(e){var t=Us(e);e.reader.skip(8);var n=e.reader.na();for(e.reader.skip(6),n==2?e.reader.skip(48):e.reader.skip(12),n==1&&e.reader.skip(16);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function Fc(e){return function(t){e(t.reader.Cb(t.reader.getLength()-t.reader.Ba()))}}function e4(e){var t=0;e=w(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function cm(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function Us(e){return 8+(e.has64BitSize?8:0)+(e.flags!=null?4:0)}Ee("shaka.util.Mp4Parser",Qt),Qt.headerSize=Us,Qt.typeToString=cm,Qt.allData=Fc,Qt.audioSampleEntry=Sb,Qt.visualSampleEntry=hi,Qt.sampleDescription=Os,Qt.children=xt,Qt.prototype.parseNext=Qt.prototype.Yc,Qt.prototype.parse=Qt.prototype.parse,Qt.prototype.stop=Qt.prototype.stop,Qt.prototype.fullBox=Qt.prototype.R,Qt.prototype.box=Qt.prototype.box;var lR=0,t4=1;function kb(e){var t=this;this.g=[],this.h=[],this.data=[],new Qt().box("moov",xt).box("moof",xt).R("pssh",function(n){if(!(1<n.version)){var r=Ye(n.reader.h,-12,n.size);if(t.data.push(r),t.g.push(Po(n.reader.Cb(16))),0<n.version){r=n.reader.S();for(var i=0;i<r;i++){var a=Po(n.reader.Cb(16));t.h.push(a)}}}}).parse(e)}function dm(e,t,n,r){var i=e.length,a=t.length+16+i;0<r&&(a+=4+16*n.size);var u=new Uint8Array(a),l=pn(u),p=0;if(l.setUint32(p,a),p+=4,l.setUint32(p,1886614376),p+=4,1>r?l.setUint32(p,0):l.setUint32(p,16777216),p+=4,u.set(t,p),p+=t.length,0<r)for(l.setUint32(p,n.size),p+=4,t=w(n),n=t.next();!n.done;n=t.next())n=ju(n.value),u.set(n,p),p+=n.length;return l.setUint32(p,i),u.set(e,p+4),u}function pm(e){var t=this;this.C=e,this.j=this.A=null,this.ka=this.ea=!1,this.H=0,this.h=null,this.o=new Ce,this.i=new Map,this.T=[],this.B=new Map,this.K=!1,this.m=new Wt,this.g=null,this.u=function(n){n.severity==2&&t.m.reject(n),e.onError(n)},this.Y=new Map,this.fa=new Map,this.L=new Tt(function(){return wR(t)}),this.O=!1,this.M=[],this.W=!1,this.I=new Tt(function(){SR(t)}),this.m.catch(function(){}),this.l=new Uc(function(){return cR(t)}),this.Z=!1,this.F=this.G=null,this.P=function(){return!1}}f=pm.prototype,f.destroy=function(){return this.l.destroy()};function cR(e){return P(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.m.reject(),e.I.stop(),e.I=null,e.L.stop(),e.L=null,T(t,ah(e),2);case 2:if(!e.j){t.s(3);break}return ve(t,4),T(t,e.j.setMediaKeys(null),6);case 6:V(t,5);break;case 4:W(t);case 5:e.j=null;case 3:e.h=null,e.A=null,e.B=new Map,e.g=null,e.u=function(){},e.C=null,e.Z=!1,e.G=null,oe(t)}})}f.configure=function(e,t){this.g=e,t&&(this.P=t),this.I&&this.I.ua(this.g.updateExpirationTime)};function dR(e,t,n){return e.ka=!0,e.B=new Map,e.O=n,r4(e,t,!1)}function n4(e,t,n,r){r=r===void 0?!0:r,e.B=new Map,n=w(n);for(var i=n.next();!i.done;i=n.next())e.B.set(i.value,{initData:null,initDataType:null});for(n=w(e.g.persistentSessionsMetadata),i=n.next();!i.done;i=n.next())i=i.value,e.B.set(i.sessionId,{initData:i.initData,initDataType:i.initDataType});return e.O=0<e.B.size,r4(e,t,r)}function pR(e,t,n,r,i,a){var u=new Map;return i={audioCapabilities:i,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t},i.drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],u.set(t,i),s4(e,u,[])}function r4(e,t,n){var r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q;return P(function(O){if(O.g==1){for(f4(e.g.clearKeys,t),r=t.some(function(R){return!!(R.video&&R.video.drmInfos.length||R.audio&&R.audio.drmInfos.length)}),!r&&n&&(i=Qu(e.g.servers),TR(t,i)),a=new Set,u=w(t),l=u.next();!l.done;l=u.next())for(p=l.value,g=p4(p),v=w(g),y=v.next();!y.done;y=v.next())x=y.value,a.add(x);for(S=w(a),k=S.next();!k.done;k=S.next())C=k.value,AR(C,Qu(e.g.servers),Qu(e.g.advanced||{}),e.g.keySystemsMapping);for(E=function(R,H){var z=[];R=w(R);for(var Y=R.next();!Y.done;Y=R.next()){Y=Y.value;var K=Y[H]||e.g.advanced&&e.g.advanced[Y.keySystem]&&e.g.advanced[Y.keySystem][H]||"",J;if((J=K=="")&&(J=(J=Y.keySystem)?!!J.match(/^com\.widevine\.alpha/):!1),J&&(H=="audioRobustness"?K=[e.g.defaultAudioRobustnessForWidevine]:H=="videoRobustness"&&(K=[e.g.defaultVideoRobustnessForWidevine])),typeof K=="string")z.push(Y);else if(Array.isArray(K))for(K.length===0&&(K=[""]),K=w(K),J=K.next();!J.done;J=K.next()){var ae={};z.push(Object.assign({},Y,(ae[H]=J.value,ae)))}}return z},I=w(t),_=I.next();!_.done;_=I.next())j=_.value,j.video&&(j.video.drmInfos=E(j.video.drmInfos,"videoRobustness"),j.video.drmInfos=E(j.video.drmInfos,"audioRobustness")),j.audio&&(j.audio.drmInfos=E(j.audio.drmInfos,"videoRobustness"),j.audio.drmInfos=E(j.audio.drmInfos,"audioRobustness"));return T(O,R5(t,e.O,e.Z,e.g.preferredKeySystems),2)}return nn(e.l),B=r||Object.keys(e.g.servers).length,B?(q=s4(e,void 0,t),O.return(r?q:q.catch(function(){}))):(e.ea=!0,O.return(Promise.resolve()))})}function i4(e){var t;return P(function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.G){n.s(2);break}return T(n,e.G,3);case 3:return nn(e.l),n.return();case 2:return ve(n,4),e.G=e.j.setMediaKeys(e.A),T(n,e.G,6);case 6:V(n,5);break;case 4:t=W(n),e.u(new $(2,6,6003,t.message));case 5:nn(e.l),oe(n)}})}function hR(e,t){return P(function(n){if(n.g==1)return T(n,i4(e),2);ih(e,t.initDataType,Ye(t.initData)),oe(n)})}f.Lb=function(e){var t=this;return P(function(n){if(n.g==1)return t.j===e?n.return():t.A?(t.j=e,t.o.ma(t.j,"play",function(){for(var r=w(t.M),i=r.next();!i.done;i=r.next())Ab(t,i.value);t.W=!0,t.M=[]}),t.j.remote?(t.o.D(t.j.remote,"connect",function(){return ah(t)}),t.o.D(t.j.remote,"connecting",function(){return ah(t)}),t.o.D(t.j.remote,"disconnect",function(){return ah(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.j&&t.o.D(t.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return ah(t)}),t.F=t.h&&t.h.initData.find(function(r){return 0<r.initData.length})||null,t.F||t.h.keySystem!=="com.apple.fps"||t.B.size?T(n,i4(t),2):n.s(2)):(t.o.ma(e,"encrypted",function(){t.u(new $(2,6,6010))}),n.return());a4(t).catch(function(){}),t.F||t.B.size||t.g.parseInbandPsshEnabled||t.o.D(t.j,"encrypted",function(r){return hR(t,r)}),oe(n)})};function fR(e){var t,n,r,i,a;return P(function(u){switch(u.g){case 1:if(!e.A||!e.h)return u.return();if(!e.h.serverCertificateUri||e.h.serverCertificate&&e.h.serverCertificate.length){u.s(2);break}return t=qn([e.h.serverCertificateUri],e.g.retryParameters),ve(u,3),n=e.C.Xb.request(5,t,{isPreload:e.P()}),T(u,n.promise,5);case 5:r=u.h,e.h.serverCertificate=Ye(r.data),V(u,4);break;case 3:throw i=W(u),new $(2,6,6017,i);case 4:if(e.l.g)return u.return();case 2:return!e.h.serverCertificate||!e.h.serverCertificate.length?u.return():(ve(u,6),T(u,e.A.setServerCertificate(e.h.serverCertificate),8));case 8:V(u,0);break;case 6:throw a=W(u),new $(2,6,6004,a.message)}})}function gR(e,t){var n,r,i;return P(function(a){if(a.g==1)return T(a,l4(e,t,{initData:null,initDataType:null}),2);if(a.g!=3)return n=a.h,n?(r=[],(i=e.i.get(n))&&(i.ub=new Wt,r.push(i.ub)),r.push(n.remove()),T(a,Promise.all(r),3)):a.return();e.i.delete(n),oe(a)})}function a4(e){var t,n,r,i,a;return P(function(u){if(u.g==1)return e.B.size?(e.B.forEach(function(l,p){l4(e,p,l)}),T(u,e.m,3)):u.s(2);if(u.g!=2){if(t=e.h&&e.h.keyIds||new Set([]),0<t.size&&kR(e))return u.return(e.m);e.K=!1,e.m=new Wt,e.m.catch(function(){})}for(n=(e.h?e.h.initData:[])||[],r=w(n),i=r.next();!i.done;i=r.next())a=i.value,ih(e,a.initDataType,a.initData);return oh(e)&&e.m.resolve(),u.return(e.m)})}function ih(e,t,n){if(n.length){if(e.g.ignoreDuplicateInitData){var r=e.i.values();r=w(r);for(var i=r.next();!i.done;i=r.next())if(ui(n,i.value.initData))return;var a=!1;if(e.B.forEach(function(u){!a&&ui(n,u.initData)&&(a=!0)}),a)return}e.K=!0,0<e.i.size&&oh(e)&&(e.m.resolve(),e.K=!1,e.m=new Wt,e.m.catch(function(){})),yR(e,t,n,e.h.sessionType)}}function o4(e){return e=e.i.keys(),e=wb(e,function(t){return t.sessionId}),Array.from(e)}f.Gf=function(){var e=this,t=this.i.keys();return t=wb(t,function(n){var r=e.i.get(n);return{sessionId:n.sessionId,sessionType:r.type,initData:r.initData,initDataType:r.initDataType}}),Array.from(t)},f.pd=function(){var e=1/0,t=this.i.keys();t=w(t);for(var n=t.next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},f.Yd=function(){return xb(this.fa)};function s4(e,t,n){var r,i,a,u,l,p,g,v;return P(function(y){switch(y.g){case 1:if(r=new Map,n.length){i=mR(e,n,r),y.s(2);break}return T(y,vR(e,t),3);case 3:i=y.h;case 2:if(a=i,!a)throw navigator.requestMediaKeySystemAccess?new $(2,6,6001):new $(2,6,6020);if(nn(e.l),ve(y,4),a.getConfiguration(),u=e.g.keySystemsMapping[a.keySystem]||a.keySystem,n.length){var x=u,S=r.get(u),k=[],C=[],E=[],I=[],_=[],j=new Set,B=new Set;h4(S,k,C,I,E,_,j,B);var q=e.O?"persistent-license":"temporary";for(x={keySystem:x,encryptionScheme:k[0],licenseServerUri:C[0],distinctiveIdentifierRequired:S[0].distinctiveIdentifierRequired,persistentStateRequired:S[0].persistentStateRequired,sessionType:S[0].sessionType||q,audioRobustness:S[0].audioRobustness||"",videoRobustness:S[0].videoRobustness||"",serverCertificate:I[0],serverCertificateUri:E[0],initData:_,keyIds:j},0<B.size&&(x.keySystemUris=B),S=w(S),B=S.next();!B.done;B=S.next())B=B.value,B.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(x.persistentStateRequired=B.persistentStateRequired);S=x}else S=u,B=t.get(u),x=[],k=[],C=[],E=[],I=[],_=new Set,h4(B.drmInfos,x,k,E,C,I,_),S={keySystem:S,encryptionScheme:x[0],licenseServerUri:k[0],distinctiveIdentifierRequired:B.distinctiveIdentifier=="required",persistentStateRequired:B.persistentState=="required",sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:C[0],initData:I,keyIds:_};if(e.h=S,!e.h.licenseServerUri)throw new $(2,6,6012,e.h.keySystem);return T(y,a.createMediaKeys(),6);case 6:if(l=y.h,nn(e.l),e.A=l,!(e.g.minHdcpVersion!=""&&"getStatusForPolicy"in e.A)){y.s(7);break}return ve(y,8),T(y,e.A.getStatusForPolicy({minHdcpVersion:e.g.minHdcpVersion}),10);case 10:if(p=y.h,p!="usable")throw new $(2,6,6018);nn(e.l),V(y,7,4);break;case 8:throw g=W(y,4),g instanceof $?g:new $(2,6,6019,g.message);case 7:return e.ea=!0,T(y,fR(e),11);case 11:nn(e.l),V(y,0);break;case 4:throw v=W(y),nn(e.l,v),e.h=null,v instanceof $?v:new $(2,6,6002,v.message)}})}function mR(e,t,n){for(var r=w(t),i=r.next();!i.done;i=r.next()){i=w(p4(i.value));for(var a=i.next();!a.done;a=i.next())a=a.value,n.has(a.keySystem)||n.set(a.keySystem,[]),n.get(a.keySystem).push(a)}if(n.size==1&&n.has(""))throw new $(2,6,6e3);r=e.g.preferredKeySystems,r.length||(i=Qu(e.g.servers),i.size==1&&(r=Array.from(i.keys()))),i=w(r);var u=i.next();for(a={};!u.done;a={nh:void 0},u=i.next()){a.nh=u.value,u=w(t);for(var l=u.next();!l.done;l=u.next())if(l=l.value.decodingInfos.find(function(y){return function(x){return x.supported&&x.keySystemAccess!=null&&x.keySystemAccess.keySystem==y.nh}}(a)))return l.keySystemAccess}for(i=w([!0,!1]),a=i.next();!a.done;a=i.next())for(a=a.value,u=w(t),l=u.next();!l.done;l=u.next()){l=w(l.value.decodingInfos);for(var p=l.next();!p.done;p=l.next())if(p=p.value,p.supported&&p.keySystemAccess){var g=p.keySystemAccess.keySystem;if(!r.includes(g)){var v=n.get(g);for(!v&&e.g.keySystemsMapping[g]&&(v=n.get(e.g.keySystemsMapping[g])),g=w(v),v=g.next();!v.done;v=g.next())if(!!v.value.licenseServerUri==a)return p.keySystemAccess}}}return null}function vR(e,t){var n,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I;return P(function(_){switch(_.g){case 1:if(t.size==1&&t.has(""))throw new $(2,6,6e3);for(r=w(t.values()),i=r.next();!i.done;i=r.next())a=i.value,a.audioCapabilities.length==0&&delete a.audioCapabilities,a.videoCapabilities.length==0&&delete a.videoCapabilities;u=w(e.g.preferredKeySystems),l=u.next();case 2:if(l.done){_.s(4);break}if(p=l.value,!t.has(p)){_.s(3);break}return g=t.get(p),ve(_,6),T(_,navigator.requestMediaKeySystemAccess(p,[g]),8);case 8:return n=_.h,_.return(n);case 6:W(_);case 7:nn(e.l);case 3:l=u.next(),_.s(2);break;case 4:v=w([!0,!1]),y=v.next();case 9:if(y.done){_.s(11);break}x=y.value,S=w(t.keys()),k=S.next();case 12:if(k.done){y=v.next(),_.s(9);break}if(C=k.value,E=t.get(C),I=E.drmInfos.some(function(j){return!!j.licenseServerUri}),I!=x){_.s(13);break}return ve(_,15),T(_,navigator.requestMediaKeySystemAccess(C,[E]),17);case 17:return n=_.h,_.return(n);case 15:W(_);case 16:nn(e.l);case 13:k=S.next(),_.s(12);break;case 11:return _.return(n)}})}function Tb(e){oh(e)&&e.m.resolve()}function u4(e,t){new Tt(function(){t.loaded=!0,Tb(e)}).da(CR)}function l4(e,t,n){var r,i,a,u,l,p,g;return P(function(v){switch(v.g){case 1:try{r=e.A.createSession("persistent-license")}catch(y){return i=new $(2,6,6005,y.message),e.u(i),v.return(Promise.reject(i))}return e.o.D(r,"message",function(y){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(y):Ab(e,y)}),e.o.D(r,"keystatuseschange",function(y){return c4(e,y)}),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,Vf:1/0,ub:null,type:"persistent-license"},e.i.set(r,a),ve(v,2),T(v,r.load(t),4);case 4:return u=v.h,nn(e.l),u||(e.i.delete(r),l=e.g.persistentSessionOnlinePlayback?1:2,e.u(new $(l,6,6013)),a.loaded=!0),u4(e,a),Tb(e),v.return(r);case 2:p=W(v),nn(e.l,p),e.i.delete(r),g=e.g.persistentSessionOnlinePlayback?1:2,e.u(new $(g,6,6005,p.message)),a.loaded=!0,Tb(e);case 3:return v.return(Promise.resolve())}})}function yR(e,t,n,r){try{var i=e.A.createSession(r)}catch(a){e.u(new $(2,6,6005,a.message));return}e.o.D(i,"message",function(a){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(a):Ab(e,a)}),e.o.D(i,"keystatuseschange",function(a){return c4(e,a)}),e.i.set(i,{initData:n,initDataType:t,loaded:!1,Vf:1/0,ub:null,type:r});try{n=e.g.initDataTransform(n,t,e.h)}catch(a){t=a,a instanceof $||(t=new $(2,6,6016,a)),e.u(t);return}e.g.logLicenseExchange&&Do(n),i.generateRequest(t,n).catch(function(a){if(!e.l.g){e.i.delete(i);var u=a.errorCode;if(u&&u.systemCode){var l=u.systemCode;0>l&&(l+=Math.pow(2,32)),l="0x"+l.toString(16)}e.u(new $(2,6,6006,a.message,a,l))}})}function bR(e){return P(function(t){return t.g==1?e.K?T(t,e.m,3):t.s(0):T(t,Promise.all(e.T.map(function(n){return n.promise})),0)})}function Ab(e,t){var n,r,i,a,u,l,p,g,v,y,x,S,k,C;P(function(E){switch(E.g){case 1:if(n=t.target,e.g.logLicenseExchange&&Do(t.message),r=e.i.get(n),i=e.h.licenseServerUri,a=e.g.advanced[e.h.keySystem],t.messageType=="individualization-request"&&a&&a.individualizationServer&&(i=a.individualizationServer),u=qn([i],e.g.retryParameters),u.body=t.message,u.method="POST",u.licenseRequestType=t.messageType,u.sessionId=n.sessionId,u.drmInfo=e.h,r&&(u.initData=r.initData,u.initDataType=r.initDataType),a&&a.headers)for(l in a.headers)u.headers[l]=a.headers[l];if(e.h.keySystem==="org.w3.clearkey"){var I=u,_=e.h;try{var j=eo(I.body);if(j){var B=JSON.parse(j);B.type||(B.type=_.sessionType,I.body=ca(JSON.stringify(B)))}}catch{}}if(U1(e.h.keySystem))if(I=Is(u.body,!0,!0),I.includes("PlayReadyKeyMessage")){for(I=qu(I,"PlayReadyKeyMessage"),_=Fa(I,"HttpHeader"),_=w(_),j=_.next();!j.done;j=_.next())B=j.value,j=Fa(B,"name")[0],B=Fa(B,"value")[0],u.headers[jn(j)]=jn(B);I=Fa(I,"Challenge")[0],u.body=Gi(jn(I))}else u.headers["Content-Type"]="text/xml; charset=utf-8";return p=Date.now(),ve(E,2),v=e.C.Xb.request(2,u,{isPreload:e.P()}),e.T.push(v),T(E,v.promise,4);case 4:g=E.h,da(e.T,v),V(E,3);break;case 2:return y=W(E),e.l.g||(x=new $(2,6,6007,y),e.i.size==1?(e.u(x),r&&r.ub&&r.ub.reject(x)):(r&&r.ub&&r.ub.reject(x),e.i.delete(n),oh(e)&&(e.m.resolve(),e.L.da(.1)))),E.return();case 3:return e.l.g?E.return():(e.H+=(Date.now()-p)/1e3,e.g.logLicenseExchange&&Do(g.data),ve(E,5),T(E,n.update(g.data),7));case 7:V(E,6);break;case 5:return S=W(E),k=new $(2,6,6008,S.message),e.u(k),r&&r.ub&&r.ub.reject(k),E.return();case 6:if(e.l.g)return E.return();C=new Ae("drmsessionupdate"),e.C.onEvent(C),r&&(r.ub&&r.ub.resolve(),u4(e,r)),oe(E)}})}function c4(e,t){t=t.target;var n=e.i.get(t),r=!1;t.keyStatuses.forEach(function(a,u){if(typeof u=="string"){var l=u;u=a,a=l}if(U1(e.h.keySystem)&&u.byteLength==16&&(Bp()||Oa())){l=pn(u);var p=l.getUint32(0,!0),g=l.getUint16(4,!0),v=l.getUint16(6,!0);l.setUint32(0,p,!1),l.setUint16(4,g,!1),l.setUint16(6,v,!1)}a!="status-pending"&&(n.loaded=!0),a=="expired"&&(r=!0),u=Po(u).slice(0,32),e.Y.set(u,a)});var i=t.expiration-Date.now();(0>i||r&&1e3>i)&&n&&!n.ub&&(e.i.delete(t),d4(t)),oh(e)&&(e.m.resolve(),e.L.da(IR))}function wR(e){var t=e.Y,n=e.fa;n.clear(),t.forEach(function(r,i){return n.set(i,r)}),t=Array.from(n.values()),t.length&&t.every(function(r){return r=="expired"})&&e.u(new $(2,6,6014)),e.C.pe(xb(n))}function xR(){var e,t,n,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne,ue,se,he;return P(function(xe){if(xe.g==1){if(e="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(d.MediaKeys&&d.navigator&&d.navigator.requestMediaKeySystemAccess&&d.MediaKeySystemAccess&&d.MediaKeySystemAccess.prototype.getConfiguration)){for(t={},n=w(e),r=n.next();!r.done;r=n.next())i=r.value,t[i]=null;return xe.return(t)}for(a="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),u=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],l=["150","2000","3000"],p={"com.widevine.alpha":u,"com.widevine.alpha.experiment":u,"com.microsoft.playready.recommendation":l},g=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],v=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],y={videoCapabilities:g,audioCapabilities:v,initDataTypes:["cenc","sinf","skd","keyids"]},x=[null,"cenc","cbcs","cbcs-1-9"],S=new Map,k=function(tt,Fe){var Vt,At,gt,vt,Rt,pt,Et,ot,ht,Zt,Wn,Sn,Tn;return P(function(Vn){switch(Vn.g){case 1:return ve(Vn,2),T(Vn,Fe.createMediaKeys(),5);case 5:Vt=Vn.h;case 4:V(Vn,3);break;case 2:return W(Vn),Vn.return();case 3:if(gt=(At=Fe.getConfiguration().sessionTypes)?At.includes("persistent-license"):!1,Mo()&&(gt=!1),vt=Fe.getConfiguration().videoCapabilities,Rt=Fe.getConfiguration().audioCapabilities,pt={persistentState:gt,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]},S.has(tt)&&S.get(tt)?pt=S.get(tt):S.set(tt,pt),(Et=vt[0].encryptionScheme)&&!pt.encryptionSchemes.includes(Et)&&pt.encryptionSchemes.push(Et),(ot=vt[0].robustness)&&!pt.videoRobustnessLevels.includes(ot)&&pt.videoRobustnessLevels.push(ot),(ht=Rt[0].robustness)&&!pt.audioRobustnessLevels.includes(ht)&&pt.audioRobustnessLevels.push(ht),"getStatusForPolicy"in Vt){for(Zt=[],Wn=w(a),Sn=Wn.next(),Tn={};!Sn.done;Tn={td:void 0},Sn=Wn.next())Tn.td=Sn.value,pt.minHdcpVersions.includes(Tn.td)||Zt.push(Vt.getStatusForPolicy({minHdcpVersion:Tn.td}).then(function(er){return function(fl){fl!="usable"||pt.minHdcpVersions.includes(er.td)||pt.minHdcpVersions.push(er.td)}}(Tn)));return T(Vn,Promise.all(Zt),0)}Vn.s(0)}})},C=function(tt,Fe,Vt,At){var gt,vt,Rt,pt,Et,ot,ht,Zt,Wn,Sn;return P(function(Tn){switch(Tn.g){case 1:for(ve(Tn,2),gt=Ua(y),vt=w(gt.videoCapabilities),Rt=vt.next();!Rt.done;Rt=vt.next())pt=Rt.value,pt.encryptionScheme=Fe,pt.robustness=Vt;for(Et=w(gt.audioCapabilities),ot=Et.next();!ot.done;ot=Et.next())ht=ot.value,ht.encryptionScheme=Fe,ht.robustness=At;return Zt=Ua(gt),Zt.persistentState="required",Zt.sessionTypes=["persistent-license"],Wn=[Zt,gt],Cs()?T(Tn,Zp(5,navigator.requestMediaKeySystemAccess(tt,Wn)),7):T(Tn,navigator.requestMediaKeySystemAccess(tt,Wn),6);case 6:Sn=Tn.h,Tn.s(5);break;case 7:Sn=Tn.h;case 5:return T(Tn,k(tt,Sn),8);case 8:V(Tn,0);break;case 2:W(Tn),oe(Tn)}})},E=function(tt,Fe,Vt,At){var gt,vt,Rt;return P(function(pt){switch(pt.g){case 1:return ve(pt,2),gt={type:"media-source",video:{contentType:g[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:v[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:tt,video:{encryptionScheme:Fe,robustness:Vt},audio:{encryptionScheme:Fe,robustness:At}}},Cs()?T(pt,Zp(5,navigator.mediaCapabilities.decodingInfo(gt)),7):T(pt,navigator.mediaCapabilities.decodingInfo(gt),6);case 6:vt=pt.h,pt.s(5);break;case 7:vt=pt.h;case 5:return Rt=vt.keySystemAccess,T(pt,k(tt,Rt),8);case 8:V(pt,0);break;case 2:W(pt),oe(pt)}})},I=w(e),_=I.next();!_.done;_=I.next())j=_.value,S.set(j,null);for(B=function(tt){return!(tt==="org.w3.clearkey"&&dr())},q=[],O=w(x),R=O.next();!R.done;R=O.next())for(H=R.value,z=w(e),Y=z.next();!Y.done;Y=z.next())K=Y.value,B(K)&&(q.push(C(K,H,"","")),q.push(E(K,H,"","")));for(J=w(e),ae=J.next();!ae.done;ae=J.next())for(ne=ae.value,ue=w(p[ne]||[]),se=ue.next();!se.done;se=ue.next())he=se.value,B(ne)&&(q.push(C(ne,null,he,"")),q.push(C(ne,null,"",he)),q.push(E(ne,null,he,"")),q.push(E(ne,null,"",he)));return T(xe,Promise.all(q),2)}return xe.return(xb(S))})}function d4(e){return P(function(t){if(t.g==1)return ve(t,2),T(t,Zp(ER,Promise.all([e.close().catch(function(){}),e.closed])),4);if(t.g!=2)return V(t,0);W(t),oe(t)})}function ah(e){var t;return P(function(n){return t=Array.from(e.i.entries()),e.i.clear(),T(n,Promise.all(t.map(function(r){r=w(r);var i=r.next().value,a=r.next().value;return P(function(u){if(u.g==1)return ve(u,2),e.ka||e.B.has(i.sessionId)||a.type!=="persistent-license"||e.g.persistentSessionOnlinePlayback?T(u,d4(i),5):T(u,i.remove(),5);if(u.g!=2)return V(u,0);W(u),oe(u)})})),0)})}function p4(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function SR(e){e.i.forEach(function(t,n){var r=t.Vf,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.C.onExpirationUpdated(n.sessionId,i),t.Vf=i)})}function oh(e){return e=e.i.values(),uR(e,function(t){return t.loaded})}function kR(e){for(var t=w(e.h&&e.h.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if(e.Y.get(n.value)!=="usable")return!1;return!0}function TR(e,t){var n=[];for(t.forEach(function(r,i){n.push({keySystem:i,licenseServerUri:r,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),e=w(e),t=e.next();!t.done;t=e.next())t=t.value,t.video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}function h4(e,t,n,r,i,a,u,l){var p=[];e=w(e);for(var g=e.next(),v={};!g.done;v={va:void 0},g=e.next()){if(v.va=g.value,t.includes(v.va.encryptionScheme)||t.push(v.va.encryptionScheme),v.va.keySystem=="org.w3.clearkey"&&v.va.licenseServerUri.startsWith("data:application/json;base64,")?p.includes(v.va.licenseServerUri)||p.push(v.va.licenseServerUri):n.includes(v.va.licenseServerUri)||n.push(v.va.licenseServerUri),i.includes(v.va.serverCertificateUri)||i.push(v.va.serverCertificateUri),v.va.serverCertificate&&(r.some(function(S){return function(k){return ui(k,S.va.serverCertificate)}}(v))||r.push(v.va.serverCertificate)),v.va.initData){g=w(v.va.initData);for(var y=g.next(),x={};!y.done;x={Mf:void 0},y=g.next())x.Mf=y.value,a.some(function(S){return function(k){var C=S.Mf;return k.keyId&&k.keyId==C.keyId?!0:k.initDataType==C.initDataType&&ui(k.initData,C.initData)}}(x))||a.push(x.Mf)}if(v.va.keyIds)for(g=w(v.va.keyIds),y=g.next();!y.done;y=g.next())u.add(y.value);if(v.va.keySystemUris&&l)for(v=w(v.va.keySystemUris),g=v.next();!g.done;g=v.next())l.add(g.value)}if(p.length==1)n.push(p[0]);else if(0<p.length){for(t=[],p=w(p),r=p.next();!r.done;r=p.next())r=d.atob(r.value.split("data:application/json;base64,").pop()),r=JSON.parse(r),t.push.apply(t,U(r.keys));p=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+d.btoa(p))}}function AR(e,t,n,r){var i=e.keySystem;i&&(i!="org.w3.clearkey"||!e.licenseServerUri)&&(t.size&&t.get(i)&&(t=t.get(i),e.licenseServerUri=t),e.keyIds||(e.keyIds=new Set),(n=n.get(i))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=n.persistentStateRequired),e.serverCertificate||(e.serverCertificate=n.serverCertificate),n.sessionType&&(e.sessionType=n.sessionType),e.serverCertificateUri||(e.serverCertificateUri=n.serverCertificateUri)),r[i]&&(e.keySystem=r[i]),d.cast&&d.cast.__platform__&&i=="com.microsoft.playready"&&(e.keySystem="com.chromecast.playready"))}function f4(e,t){if(e=Qu(e),e.size!=0){e=r5(e),t=w(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}var ER=1,CR=5,IR=.5;function hm(e,t,n){for(n=n===void 0?!0:n,this.h=e,this.g=new Set([e]),t=t||[],e=w(t),t=e.next();!t.done;t=e.next())this.add(t.value,n)}hm.prototype.add=function(e,t){var n=this.h;t=t===void 0?!0:t;var r;if(!(r=!!n.audio!=!!e.audio||!!n.video!=!!e.video||n.language!=e.language)&&(r=n.audio&&e.audio)){r=n.audio;var i=e.audio;r=!(!((!r.channelsCount||!i.channelsCount||2<r.channelsCount||2<i.channelsCount)&&r.channelsCount!=i.channelsCount||r.spatialAudio!==i.spatialAudio||t&&!g4(r,i))&&m4(r.roles,i.roles)&&r.groupId===i.groupId)}return!r&&(r=n.video&&e.video)&&(n=n.video,r=e.video,r=!((!t||g4(n,r))&&m4(n.roles,r.roles))),r?!1:(this.g.add(e),!0)},hm.prototype.values=function(){return this.g.values()};function g4(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(r){return Rs(r)}),t=t.codecs.split(",").map(function(r){return Rs(r)}),e.length!=t.length))return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function m4(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=w(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}Ee("shaka.media.AdaptationSet",hm),Ee("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Eb(){}Eb.prototype.create=function(){},Eb.prototype.configure=function(){},Ee("shaka.media.AdaptationSetCriteria",Eb);function MR(){this.g=sh,this.i=new Map().set(sh,2).set(jc,1),this.h=0}var jc=0,sh=1;/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/function Cb(e,t,n){this.g=e,this.i=t,this.h=n}function v4(e,t){return P(function(n){if(n.g==1)return T(n,W7(e.h,t,e.g.drm.preferredKeySystems,e.g.drm.keySystemsMapping),2);if(e.g.streaming.dontChooseCodecs||D5(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some(rh))throw new $(2,4,4032);return n.return(b4(e,t))})}function y4(e,t){var n=e.g.restrictions;e=e.i;var r=!1;t=w(t.variants);for(var i=t.next();!i.done;i=t.next()){i=i.value;var a=i.allowedByApplication;i.allowedByApplication=rm(i,n,e),a!=i.allowedByApplication&&(r=!0)}return r}function b4(e,t){var n=y4(e,t);if(t){var r=e.h?e.h.h:null;if(r&&e.h.A)for(var i=w(t.variants),a=i.next();!a.done;a=i.next())a=a.value,Ib(e,r.keySystem,a.video),Ib(e,r.keySystem,a.audio);w4(e,t)}return n}function Ib(e,t,n){if(n){n=w(n.drmInfos);for(var r=n.next();!r.done;r=n.next())if(r=r.value,r.keySystem==t){r=w(r.initData||[]);for(var i=r.next();!i.done;i=r.next())i=i.value,ih(e.h,i.initDataType,i.initData)}}}function w4(e,t){e=e.h?e.h.Yd():{};var n=Object.keys(e);n=n.length&&n[0]=="00";var r=!1,i=!1,a=new Set,u=new Set;t=w(t.variants);for(var l=t.next();!l.done;l=t.next()){l=l.value;var p=[];l.audio&&p.push(l.audio),l.video&&p.push(l.video),p=w(p);for(var g=p.next();!g.done;g=p.next())if(g=g.value,g.keyIds.size){g=w(g.keyIds);for(var v=g.next();!v.done;v=g.next()){v=v.value;var y=e[n?"00":v];y?Mb.includes(y)&&u.add(y):a.add(v)}}l.allowedByApplication?l.allowedByKeySystem&&(r=!0):i=!0}if(!r)throw e={hasAppRestrictions:i,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(u)},new $(2,4,4012,e)}var Mb=["output-restricted","internal-error"];function uh(){}function Zu(e,t){Bc.set(e,t)}function _R(){var e={};if(Za())for(var t=w(Bc.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(t=w(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]),n=t.next();!n.done;n=t.next())n=n.value,e[n]=Za()?Bc.has(n):jp(n);return e}function x4(e,t){if(t){var n=Bc.get(t.toLowerCase());if(n)return n}throw new $(2,4,4e3,e,t)}Ee("shaka.media.ManifestParser",uh),uh.unregisterParserByMime=function(e){Bc.delete(e)},uh.registerParserByMime=Zu,uh.registerParserByExtension=function(){ut("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},uh.AccessibilityPurpose={Nk:"visually impaired",dk:"hard of hearing"};var Bc=new Map;function fm(e,t){var n=null,r=null,i=null,a=null,u=e.S();return t&1&&(i=e.bd()),t&2&&(a=e.S()),t&8&&(n=e.S()),t&16&&(r=e.S()),{trackId:u,ld:n,md:r,Wh:i,rh:a}}function gm(e,t){return t==1?(t=e.S(),e=e.S(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.S()}}function mm(e,t){return t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.S(),e.skip(4),e=e.na(),{timescale:t,language:String.fromCharCode((e>>10)+96)+String.fromCharCode(((e&960)>>5)+96)+String.fromCharCode((e&31)+96)}}function vm(e,t,n){var r=e.S(),i=[],a=null;n&1&&(a=e.$f()),n&4&&e.skip(4);for(var u=0;u<r;u++){var l={gg:null,sampleSize:null,ye:null};n&256&&(l.gg=e.S()),n&512&&(l.sampleSize=e.S()),n&1024&&e.skip(4),n&2048&&(l.ye=t==0?e.S():e.$f()),i.push(l)}return{Sk:r,fg:i,nf:a}}function S4(e){e.skip(6),e.skip(2),e.skip(8);var t=e.na();return e.skip(2),e.skip(2),e.skip(2),e=e.na()+e.na()/65536,{channelCount:t,sampleRate:e}}function k4(e){return e=e.S(),{codec:cm(e)}}function DR(e){var t=null,n=null,r=e.Cb(4),i=String.fromCharCode(r[0]);if(i+=String.fromCharCode(r[1]),i+=String.fromCharCode(r[2]),i+=String.fromCharCode(r[3]),i==="nclx"){switch(e.na()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(r=e.na(),e.na(),r){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,Nd:n}}function lh(e,t){return t=t===void 0?!1:t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function fi(e){return(10>e?"0":"")+e}function el(e){if(!I4){I4=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);ym=_t("ftyp",t,r,t,n),t=_t("dref",$R),_b=_t("dinf",t)}this.g=e}function Vc(e){for(var t=[],n=w(e.g),r=n.next();!r.done;r=n.next()){var i=t,a=i.push,u=r.value;r=_t;var l=u.id+1,p=u.stream.width||0,g=u.stream.height||0;u.type=="audio"&&(g=p=0);var v=u.duration*u.timescale,y=Math.floor(v/(Fs+1));switch(v=Math.floor(v%(Fs+1)),l=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(U(bn(l,4)),[0,0,0,0],U(bn(y,4)),U(bn(v,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],U(bn(p,2)),[0,0],U(bn(g,2)),[0,0])),l=_t("tkhd",l),p=_t,y=u.duration*u.timescale,g=Math.floor(y/(Fs+1)),y=Math.floor(y%(Fs+1)),v=u.stream.language,v=v.charCodeAt(0)-96<<10|v.charCodeAt(1)-96<<5|v.charCodeAt(2)-96,g=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(U(bn(u.timescale,4)),U(bn(g,4)),U(bn(y,4)),U(bn(v,2)),[0,0])),g=_t("mdhd",g),y=u,v=new Uint8Array([]),y.type){case"video":v=LR;break;case"audio":v=RR}y=_t("hdlr",v);e:{switch(u.type){case"video":u=_t("minf",_t("vmhd",jR),_b,T4(u));break e;case"audio":u=_t("minf",_t("smhd",BR),_b,T4(u));break e}u=new Uint8Array([])}u=p("mdia",g,y,u),r=r("trak",l,u),a.call(i,r)}for(t=En.apply(vr,U(t)),a=e.g[0],n=_t,r=a.duration*a.timescale,i=Math.floor(r/(Fs+1)),r=Math.floor(r%(Fs+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(U(bn(a.timescale,4)),U(bn(i,4)),U(bn(r,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255])),i=_t("mvhd",i),r=[],e=w(e.g),p=e.next();!p.done;p=e.next())u=r,l=u.push,p=new Uint8Array([0,0,0,0].concat(U(bn(p.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),p=_t("trex",p),l.call(u,p);if(e=En.apply(vr,U(r)),e=_t("mvex",e),r=[],a.encrypted){for(a=w(a.stream.drmInfos),u=a.next();!u.done;u=a.next())if(u=u.value,u.initData)for(u=w(u.initData),l=u.next();!l.done;l=u.next())r.push(l.value.initData);a=En.apply(vr,U(r))}else a=new Uint8Array([]);return e=n("moov",i,t,e,a),t=new Uint8Array(ym.byteLength+e.byteLength),t.set(ym),t.set(e,ym.byteLength),t}function T4(e){var t=_t,n="aac";e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=Mo()?"ec-3":"ac-3":e.codecs.includes("ec-3")?n="ec-3":e.codecs.includes("opus")&&(n="opus");var r=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(n=e.stream.width||0,r=e.stream.height||0,0<e.Ca.byteLength)var i=_t("avcC",e.Ca);else{i=_t;for(var a=7,u=[],l=[],p=0,g=0,v=0,y=0;y<e.lb.length;y++){var x=E4(e.lb[y]);switch(x[0]&31){case 7:u.push(x),a+=x.length+2;break;case 8:l.push(x),a+=x.length+2}}for(0<u.length&&(p=u[0][1],v=u[0][2],g=u[0][3]),a=new Uint8Array(a),y=0,a[y++]=1,a[y++]=p,a[y++]=v,a[y++]=g,a[y++]=255,a[y++]=224|u.length,p=0;p<u.length;p++)a[y++]=(u[p].length&65280)>>8,a[y++]=u[p].length&255,a.set(u[p],y),y+=u[p].length;for(a[y++]=l.length,u=0;u<l.length;u++)a[y++]=(l[u].length&65280)>>8,a[y++]=l[u].length&255,a.set(l[u],y),y+=l[u].length;i=i("avcC",a)}n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(U(bn(n,2)),U(bn(r,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),r="avc1",l=A4(e),u=new Uint8Array([]),e.encrypted&&(u=tl(0,e.stream,e.codecs),r="encv"),r=_t(r,n,i,l,u)}else e.codecs.includes("hvc1")&&(r=e.stream.width||0,i=e.stream.height||0,n=new Uint8Array([]),0<e.Ca.byteLength&&(n=_t("hvcC",e.Ca)),r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(U(bn(r,2)),U(bn(i,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),i="hvc1",l=A4(e),u=new Uint8Array([]),e.encrypted&&(u=tl(0,e.stream,e.codecs),i="encv"),r=_t(i,r,n,l,u));break;case"audio":n=="mp3"?e=_t(".mp3",ch(e)):n=="ac-3"?(n=_t("dac3",e.ra),r="ac-3",i=new Uint8Array([]),e.encrypted&&(i=tl(0,e.stream,e.codecs),r="enca"),e=_t(r,ch(e),n,i)):n=="ec-3"?(n=_t("dec3",e.ra),r="ec-3",i=new Uint8Array([]),e.encrypted&&(i=tl(0,e.stream,e.codecs),r="enca"),e=_t(r,ch(e),n,i)):n=="opus"?(n=_t("dOps",e.ra),r="Opus",i=new Uint8Array([]),e.encrypted&&(i=tl(0,e.stream,e.codecs),r="enca"),e=_t(r,ch(e),n,i)):(0<e.ra.byteLength?n=_t("esds",e.ra):(n=_t,r=e.id+1,i=e.stream.channelsCount||2,u=e.stream.audioSamplingRate||44100,p=kc("audio",e.codecs.split(",")),g={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},l=g[u],(p==="mp4a.40.5"||p==="mp4a.40.29")&&(l=g[2*u]),u=parseInt(p.split(".").pop(),10),r=new Uint8Array([0,0,0,0,3,25].concat(U(bn(r,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,u<<3|l>>>1,l<<7|i<<3,6,1,2])),n=n("esds",r)),r="mp4a",i=new Uint8Array([]),e.encrypted&&(i=tl(0,e.stream,e.codecs),r="enca"),e=_t(r,ch(e),n,i)),r=e}return e=_t("stsd",VR,r),t("stbl",e,_t("stts",NR),_t("stsc",OR),_t("stsz",FR),_t("stco",UR))}function A4(e){if(!e.Ia&&!e.Ka)return new Uint8Array([]);var t=e.Ka;return e=new Uint8Array([].concat(U(bn(e.Ia,4)),U(bn(t,4)))),_t("pasp",e)}function ch(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(U(bn(e.stream.audioSamplingRate||44100,2)),[0,0]))}function tl(e,t,n){e=_t,n=new Uint8Array([].concat(U(bn(C4(n.split(".")[0]),4)))),n=_t("frma",n);var r="cenc",i=t.drmInfos[0];i&&i.encryptionScheme&&(r=i.encryptionScheme),r=new Uint8Array([0,0,0,0].concat(U(bn(C4(r),4)),[0,1,0,0])),r=_t("schm",r),i=_t;var a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t=w(t.drmInfos);for(var u=t.next();!u.done;u=t.next())if((u=u.value)&&u.keyIds&&u.keyIds.size){u=w(u.keyIds);for(var l=u.next();!l.done;l=u.next())a=E4(l.value)}return t=new Uint8Array([0,0,0,0,0,0,1,8]),t=_t("tenc",t,a),e("sinf",n,r,i("schi",t))}function dh(e){var t=[];e=w(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=t.push,i=r.apply,a=_t,u=new Uint8Array([0,0,0,0].concat(U(bn(n.data?n.data.Db:0,4))));u=_t("mfhd",u);var l,p=n.data?n.data.jb:[],g=new Uint8Array(4+p.length);for(l=0;l<p.length;l++){var v=p[l].flags;g[l+4]=v.Ya<<4|v.$a<<2|v.Za}p=_t("sdtp",g);var y=p.length+92;g=_t,l=new Uint8Array([0,0,0,58].concat(U(bn(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),l=_t("tfhd",l),v=n.data?n.data.baseMediaDecodeTime:0;var x=Math.floor(v%(Fs+1));v=new Uint8Array([1,0,0,0].concat(U(bn(Math.floor(v/(Fs+1)),4)),U(bn(x,4)))),v=_t("tfdt",v);var S=y;y=n.data?n.data.jb:[],x=y.length;var k=12+16*x,C=new Uint8Array(k);for(S+=8+k,C.set([n.type==="video"?1:0,0,15,1].concat(U(bn(x,4)),U(bn(S,4))),0),S=0;S<x;S++){var E=y[S];k=bn(E.duration,4);var I=bn(E.size,4),_=E.flags;E=bn(E.eb,4),C.set([].concat(U(k),U(I),[_.hb<<2|_.Ya,_.$a<<6|_.Za<<4|_.ib,_.Xa&61440,_.Xa&15],U(E)),12+16*S)}y=_t("trun",C),p=g("traf",l,v,y,p),a=a("moof",u,p),i.call(r,t,[a,PR(n)])}return En.apply(vr,U(t))}function PR(e){return e=(e.data?e.data.jb:[]).map(function(t){return t.data}),e=En.apply(vr,U(e)),_t("mdat",e)}function bn(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function E4(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function C4(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function _t(e){var t=Re.apply(1,arguments),n=M4.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],M4.set(e,n));for(var r=8,i=t.length-1;0<=i;i--)r+=t[i].byteLength;for(i=new Uint8Array(r),i[0]=r>>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=r&255,i.set(n,4),n=0,r=8;n<t.length;n++)i.set(t[n],r),r+=t[n].byteLength;return i}var I4=!1,Fs=Math.pow(2,32)-1,M4=new Map,LR=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),RR=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),NR=new Uint8Array([0,0,0,0,0,0,0,0]),OR=new Uint8Array([0,0,0,0,0,0,0,0]),UR=new Uint8Array([0,0,0,0,0,0,0,0]),FR=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),jR=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),BR=new Uint8Array([0,0,0,0,0,0,0,0]),VR=new Uint8Array([0,0,0,0,0,0,0,1]),ym=new Uint8Array([]),$R=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),_b=new Uint8Array([]);function zR(e,t,n){function r(S){y.push({box:S,hh:1701733217})}function i(S){y.push({box:S,hh:1701733238})}function a(S){p=!0,S.parser.stop()}function u(S){v.push(S),xt(S)}var l=t=Ye(t),p=!1,g,v=[],y=[];if(new Qt().box("moov",u).box("trak",u).box("mdia",u).box("minf",u).box("stbl",u).R("stsd",function(S){g=S,v.push(S),Os(S)}).R("encv",a).R("enca",a).R("dvav",i).R("dva1",i).R("dvh1",i).R("dvhe",i).R("dvc1",i).R("dvi1",i).R("hev1",i).R("hvc1",i).R("avc1",i).R("avc3",i).R("ac-3",r).R("ec-3",r).R("ac-4",r).R("Opus",r).R("fLaC",r).R("mp4a",r).parse(t),p)return t;if(y.length==0||!g)throw Po(t),new $(2,3,3019,n);y.reverse(),n=w(y);for(var x=n.next();!x.done;x=n.next())x=x.value,l=GR(e,l,g,x.box,v,x.hh);return Bp()&&F1()&&!Ra()?(e=new Uint8Array(t.byteLength+l.byteLength),e.set(l),e.set(t,l.byteLength),e):l}function HR(e){e=Ye(e);var t=[];new Qt().box("mdat",function(u){t.push(u)}).parse(e);for(var n=[],r=0;r<t.length;r++){var i=t[r-1],a=t[r];n.push(qR(e.subarray(i?i.start+i.size:0,a.start+a.size)))}return En.apply(vr,U(n))}function qR(e){function t(y){u.push(y),xt(y)}var n,r,i,a,u=[];if(new Qt().box("moof",t).box("traf",t).R("tfhd",function(y){n=y,i=fm(y.reader,y.flags)}).R("trun",function(y){r=y,a=vm(y.reader,y.version,y.flags)}).parse(e),i&&i.rh!==2){var l=n.start+Us(n)+4+(i.Wh!==null?8:0),p=pn(e);if(i.rh!==null)p.setUint32(l,2);else{bm(e,n.start,n.size+4);var g=p.getUint32(n.start+8);p.setUint32(n.start+8,g|2),a&&a.nf!==null&&p.setInt32(r.start+Us(r)+4,a.nf+4),g=e.subarray(0,l),p=e.subarray(l),e=new Uint8Array(e.byteLength+4),e.set(g),g=[];for(var v=3;0<=v;v--)g.push(2>>8*v&255);for(e.set(new Uint8Array(g),l),e.set(p,l+4),l=w(u),p=l.next();!p.done;p=l.next())p=p.value,bm(e,p.start,p.size+4)}}return e}function GR(e,t,n,r,i,a){var u=tl(new el([]),e,r.name),l=t.subarray(r.start,r.start+r.size);for(e=new Uint8Array(r.size+u.byteLength),e.set(l,0),pn(e).setUint32(4,a),e.set(u,r.size),bm(e,0,e.byteLength),a=new Uint8Array(t.byteLength+e.byteLength),r=dr()||Ra()||Bp()?r.start:r.start+r.size,u=t.subarray(r),a.set(t.subarray(0,r)),a.set(e,r),a.set(u,r+e.byteLength),t=w(i),i=t.next();!i.done;i=t.next())i=i.value,bm(a,i.start,i.size+e.byteLength);return e=pn(a,n.start),n=Us(n),t=e.getUint32(n),e.setUint32(n,t+1),a}function bm(e,t,n){e=pn(e,t),t=e.getUint32(0),t!=0&&(t==1?(e.setUint32(8,n>>32),e.setUint32(12,n&4294967295)):e.setUint32(0,n))}function KR(e){function t(i){r.push({start:i.start,size:i.size}),xt(i)}var n=Ye(e),r=[];return new Qt().box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(i){r.push({start:i.start,size:i.size});for(var a=pn(n,i.start),u=0;u<i.size-3;u++){var l=a.getUint32(u);l==1633889587?a.setUint32(u,1700998451):l==1684103987&&a.setUint32(u,1684366131)}}).parse(n),n}function Yr(e,t,n,r,i,a,u,l){this.N=e,this.Sa=t,this.wa=n,this.Wc=r===void 0?null:r,this.timescale=i===void 0?null:i,this.h=a===void 0?null:a,this.aesKey=u===void 0?null:u,this.g=this.mimeType=this.codecs=null,this.encrypted=l===void 0?!1:l}Yr.prototype.uc=function(){return this.Sa},Yr.prototype.tc=function(){return this.wa},Yr.prototype.Kd=function(e){this.h=e},Yr.prototype.Ib=function(){return this.h};function wm(e,t){return e===t?!0:e&&t?e.uc()==t.uc()&&e.tc()==t.tc()&&Ac(e.N().sort(),t.N().sort())&&ui(e.Ib(),t.Ib()):e==t}Ee("shaka.media.InitSegmentReference",Yr),Yr.prototype.getEndByte=Yr.prototype.tc,Yr.prototype.getStartByte=Yr.prototype.uc;function Ge(e,t,n,r,i,a,u,l,p,g,v,y,x,S,k,C){for(g=g===void 0?[]:g,S=S===void 0?Vo:S,this.startTime=e,this.j=this.endTime=t,this.C=n,this.Sa=r,this.wa=i,this.$=a,this.timestampOffset=u,this.appendWindowStart=l,this.appendWindowEnd=p,this.g=g,this.tilesLayout=v===void 0?"":v,this.B=y===void 0?null:y,this.h=x===void 0?null:x,this.status=S,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=k===void 0?null:k,this.thumbnailSprite=null,this.i=-1,this.A=C===void 0?!1:C,this.F=this.o=!1,e=w(this.g),t=e.next();!t.done;t=e.next())t.value.fh();this.A&&this.g.length&&this.g[this.g.length-1].eh(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.G=!1}f=Ge.prototype,f.N=function(){return this.C()},f.getStartTime=function(){return this.startTime},f.mi=function(){return this.endTime},f.uc=function(){return this.Sa},f.tc=function(){return this.wa},f.Ji=function(){return this.tilesLayout},f.Ii=function(){return this.B},f.dc=function(){return this.status},f.aj=function(){this.status=D4},f.Sf=function(){this.preload=!0},f.isPreload=function(){return this.preload},f.Vc=function(){this.l=!1},f.Ti=function(){return this.l},f.fh=function(){this.o=!0},f.Vi=function(){return this.o},f.eh=function(){this.F=!0},f.Ui=function(){return this.F},f.dh=function(){this.m=!0},f.Pi=function(){return this.m},f.De=function(e){this.thumbnailSprite=e},f.Gi=function(){return this.thumbnailSprite},f.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=w(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},f.qg=function(e){this.h==null?at("Sync attempted without sync time!"):(e=this.h-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},f.Kd=function(e,t){this.u=e,this.G=t===void 0?!1:t},f.Ib=function(e){var t=this.u;return(e===void 0||e)&&this.G&&(this.u=null),t};function _4(e,t){e.$=t,e=w(e.g);for(var n=e.next();!n.done;n=e.next())_4(n.value,t)}Ee("shaka.media.SegmentReference",Ge),Ge.prototype.getSegmentData=Ge.prototype.Ib,Ge.prototype.setSegmentData=Ge.prototype.Kd,Ge.prototype.syncAgainst=Ge.prototype.qg,Ge.prototype.offset=Ge.prototype.offset,Ge.prototype.getThumbnailSprite=Ge.prototype.Gi,Ge.prototype.setThumbnailSprite=Ge.prototype.De,Ge.prototype.hasByterangeOptimization=Ge.prototype.Pi,Ge.prototype.markAsByterangeOptimization=Ge.prototype.dh,Ge.prototype.isLastPartial=Ge.prototype.Ui,Ge.prototype.markAsLastPartial=Ge.prototype.eh,Ge.prototype.isPartial=Ge.prototype.Vi,Ge.prototype.markAsPartial=Ge.prototype.fh,Ge.prototype.isIndependent=Ge.prototype.Ti,Ge.prototype.markAsNonIndependent=Ge.prototype.Vc,Ge.prototype.isPreload=Ge.prototype.isPreload,Ge.prototype.markAsPreload=Ge.prototype.Sf,Ge.prototype.markAsUnavailable=Ge.prototype.aj,Ge.prototype.getStatus=Ge.prototype.dc,Ge.prototype.getTileDuration=Ge.prototype.Ii,Ge.prototype.getTilesLayout=Ge.prototype.Ji,Ge.prototype.getEndByte=Ge.prototype.tc,Ge.prototype.getStartByte=Ge.prototype.uc,Ge.prototype.getEndTime=Ge.prototype.mi,Ge.prototype.getStartTime=Ge.prototype.getStartTime,Ge.prototype.getUris=Ge.prototype.N;var Vo=0,D4=1;Ge.Status={Nj:Vo,Lk:D4,lk:2};function ph(e){return e.length==1&&1e-4>e.end(0)-e.start(0)}function Db(e){return!e||ph(e)?null:e.length?e.end(e.length-1):null}function Pb(e,t){return!e||!e.length||ph(e)||t>e.end(e.length-1)?!1:t>=e.start(0)}function P4(e,t){if(!e||!e.length||ph(e))return 0;var n=0;e=w($o(e));for(var r=e.next();!r.done;r=e.next()){var i=r.value;r=i.start,i=i.end,i>t&&(n+=i-Math.max(r,t))}return n}function WR(e,t,n){return!e||!e.length||ph(e)?null:(e=$o(e).findIndex(function(r,i,a){return r.start>t&&(i==0||a[i-1].end-t<=n)}),0<=e?e:null)}function $o(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function L4(){}function R4(e,t){var n=document.createElement("source");return n.src=e,n.type=t===void 0?"":t,n}function js(e){for(;e.firstChild;)e.removeChild(e.firstChild)}Ee("shaka.util.Dom",L4),L4.removeAllChildren=js;/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/function Lb(){}function N4(e,t){return t+10<=e.length&&e[t]===73&&e[t+1]===68&&e[t+2]===51&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function O4(e,t){return t+10<=e.length&&e[t]===51&&e[t+1]===68&&e[t+2]===73&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function Rb(e,t){var n=(e[t]&127)<<21;return n|=(e[t+1]&127)<<14,n|=(e[t+2]&127)<<7,n|=e[t+3]&127}function XR(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.type==="APIC"){if(2>e.size||e.data[0]!==3)return null;var n=e.data.subarray(1).indexOf(0);if(n===-1)return null;var r=yn(Ye(e.data,1,n)),i=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(a===-1)return null;var u=yn(Ye(e.data,3+n,a)),l;return r==="-->"?l=yn(Ye(e.data,4+n+a)):l=li(e.data.subarray(4+n+a)),t.mimeType=r,t.pictureType=i,t.description=u,t.data=l,t}return e.type==="TXXX"?2>e.size||e.data[0]!==3||(r=e.data.subarray(1).indexOf(0),r===-1)?null:(n=yn(Ye(e.data,1,r)),e=yn(Ye(e.data,2+r)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="WXXX"?2>e.size||e.data[0]!==3||(r=e.data.subarray(1).indexOf(0),r===-1)?null:(n=yn(Ye(e.data,1,r)),e=yn(Ye(e.data,2+r)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="PRIV"?2>e.size||(n=e.data.indexOf(0),n===-1)?null:(n=yn(Ye(e.data,0,n)),t.description=n,n=="com.apple.streaming.transportStreamTimestamp"?(n=e.data.subarray(n.length+1),e=n[3]&1,n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=4772185884e-2),t.data=n):(e=li(e.data.subarray(n.length+1)),t.data=e),t):e.type[0]==="T"?2>e.size||e.data[0]!==3?null:(e=yn(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):e.type[0]==="W"?(e=yn(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=li(e.data),t):null}function nl(e){for(var t=0,n=[];N4(e,t);){var r=Rb(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,r=t+r;t+10<r;){var i=e.subarray(t),a=Rb(i,4);i={type:String.fromCharCode(i[0],i[1],i[2],i[3]),size:a,data:i.subarray(10,10+a)},(a=XR(i))&&n.push(a),t+=i.size+10}O4(e,t)&&(t+=10)}return n}function $c(e,t){for(var n=t=t===void 0?0:t,r=0;N4(e,t);)e[t+5]>>6&1&&(r+=10),r+=10,r+=Rb(e,t+6),O4(e,t+10)&&(r+=10),t+=r;return 0<r?e.subarray(n,n+r):new Uint8Array([])}Ee("shaka.util.Id3Utils",Lb),Lb.getID3Data=$c,Lb.getID3Frames=nl;function zo(e,t){if(this.j=e,t!==void 0&&t){t=new Uint8Array(e.byteLength);for(var n=0,r=0;r<e.byteLength;r++)2<=r&&e[r]==3&&e[r-1]==0&&e[r-2]==0||(t[n]=e[r],n++);this.j=Ye(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function Nb(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),r=Math.min(4,e.i);r!==0&&(n.set(e.j.subarray(t,t+r)),e.h=new ln(n,0).S(),e.g=8*r,e.i-=r)}function gi(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,Nb(e)}e.h<<=t,e.g-=t}function It(e,t){var n=Math.min(e.g,t),r=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&Nb(e),n=t-n,0<n?r<<n|It(e,n):r}function Ob(e){var t;for(t=0;t<e.g;++t)if(e.h&2147483648>>>t)return e.h<<=t,e.g-=t,t;return Nb(e),t+Ob(e)}function Jr(e){gi(e,1+Ob(e))}function Le(e){var t=Ob(e);return It(e,t+1)-1}function zc(e){return e=Le(e),1&e?1+e>>>1:-1*(e>>>1)}function ze(e){return It(e,1)===1}function Ht(e){return It(e,8)}function xm(e,t){for(var n=8,r=8,i=0;i<t;i++)r!==0&&(r=zc(e),r=(n+r+256)%256),n=r===0?n:r}function YR(e){return Ht(e),Le(e),Le(e)}Ee("shaka.util.ExpGolomb",zo);function hn(){this.G=null,this.H=!1,this.m=this.I=null,this.j=[],this.g=[],this.A=this.B=null,this.i=[],this.h=[],this.C=null,this.l=[],this.F=this.o=this.u=null}f=hn.prototype,f.clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},f.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,Fb(e)),n=e.length-(e.length+t)%188,r=!1,i=t;i<n;i+=188)if(e[i]==71){var a=!!(e[i+1]&64),u=((e[i+1]&31)<<8)+e[i+2];if(1<(e[i+3]&48)>>4){var l=i+5+e[i+4];if(l==i+188)continue}else l=i+4;switch(u){case 0:a&&(l+=e[l]+1),this.G=(e[l+10]&31)<<8|e[l+11];break;case 17:case 8191:break;case this.G:a&&(l+=e[l]+1),a=e,u={audio:-1,video:-1,ce:-1,audioCodec:"",videoCodec:""};var p=l+3+((a[l+1]&15)<<8|a[l+2])-4;for(l+=12+((a[l+10]&15)<<8|a[l+11]);l<p;){var g=(a[l+1]&31)<<8|a[l+2],v=(a[l+3]&15)<<8|a[l+4];switch(a[l]){case 6:if(0<v)for(var y=l+5,x=v;2<x;){var S=a[y+1]+2;switch(a[y]){case 5:var k=z1(a.subarray(y+2,y+S));u.audio==-1&&k==="Opus"?(u.audio=g,u.audioCodec="opus"):u.video==-1&&k==="AV01"&&(u.video=g,u.videoCodec="av1");break;case 106:u.audio==-1&&(u.audio=g,u.audioCodec="ac3");break;case 122:u.audio==-1&&(u.audio=g,u.audioCodec="ec3");break;case 124:u.audio==-1&&(u.audio=g,u.audioCodec="aac");break;case 127:u.audioCodec=="opus"&&(k=null,a[y+2]===128&&(k=a[y+3]),k!=null&&(this.F={channelCount:k&15?k&15:2,Zh:k,sampleRate:48e3}))}y+=S,x-=S}break;case 15:u.audio==-1&&(u.audio=g,u.audioCodec="aac");break;case 17:u.audio==-1&&(u.audio=g,u.audioCodec="aac-loas");break;case 21:u.ce==-1&&(u.ce=g);break;case 27:u.video==-1&&(u.video=g,u.videoCodec="avc");break;case 3:case 4:u.audio==-1&&(u.audio=g,u.audioCodec="mp3");break;case 36:u.video==-1&&(u.video=g,u.videoCodec="hvc");break;case 129:u.audio==-1&&(u.audio=g,u.audioCodec="ac3");break;case 132:case 135:u.audio==-1&&(u.audio=g,u.audioCodec="ec3")}l+=v+5}a=u,a.video!=-1&&(this.I=a.video,this.m=a.videoCodec),a.audio!=-1&&(this.B=a.audio,this.A=a.audioCodec),a.ce!=-1&&(this.C=a.ce),r&&!this.H&&(r=!1,i=t-188),this.H=!0;break;case this.I:l=e.subarray(l,i+188),a?this.j.push([l]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(l);break;case this.B:l=e.subarray(l,i+188),a?this.i.push([l]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(l);break;case this.C:l=e.subarray(l,i+188),a?this.l.push([l]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(l);break;default:r=!0}}return this};function Ub(e,t){if((t[0]<<16|t[1]<<8|t[2])!==1)return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var r=t[7];if(r&192){var i=536870912*(t[9]&14)+4194304*(t[10]&255)+16384*(t[11]&254)+128*(t[12]&255)+(t[13]&254)/2;e.u==null&&(e.u=i),n.pts=F4(i,e.u),e.u=n.pts,n.dts=n.pts,r&64&&(r=536870912*(t[14]&14)+4194304*(t[15]&255)+16384*(t[16]&254)+128*(t[17]&255)+(t[18]&254)/2,e.o==null&&(e.o=r),n.dts=F4(r,e.o)),e.o=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}f.hj=function(e){return ut("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Xf(e,{Dd:null,state:null})},f.Xf=function(e,t){var n=e.pts?e.pts/9e4:null;e=e.data;var r=e.byteLength,i=1;this.m=="hvc"&&(i=2);var a=t.state||0,u=a,l=0,p=[],g=-1,v=0;for(a==-1&&(g=0,v=this.m=="hvc"?e[0]>>1&63:e[0]&31,a=0,l=1);l<r;){var y=e[l++];a?a===1?a=y?0:2:y?y==1?(y=l-a-1,0<=g?p.push({data:e.subarray(g+i,y),fullData:e.subarray(g,y),type:v,time:n,state:null}):(a=p.length?p[p.length-1]:t.Dd)&&(u&&l<=4-u&&a.state&&(a.data=a.data.subarray(0,a.data.byteLength-u),a.fullData=a.fullData.subarray(0,a.fullData.byteLength-u)),0<y&&(y=e.subarray(0,y),a.data=En(a.data,y),a.fullData=En(a.fullData,y),a.state=0)),l<r?(v=this.m=="hvc"?e[l]>>1&63:e[l]&31,g=l,a=0):a=-1):a=0:a=3:a=y?0:1}return 0<=g&&0<=a&&p.push({data:e.subarray(g+i,r),fullData:e.subarray(g,r),type:v,time:n,state:a}),!p.length&&t.Dd&&(n=p.length?p[p.length-1]:t.Dd)&&(n.data=En(n.data,e),n.fullData=En(n.fullData,e)),t.state=a,p},f.getMetadata=function(){for(var e=[],t=w(this.l),n=t.next();!n.done;n=t.next())n=En.apply(vr,U(n.value)),(n=Ub(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:nl(n.data),dts:n.dts,pts:n.pts});return e},f.fb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=w(this.i),n=t.next();!n.done;n=t.next()){var r=En.apply(vr,U(n.value)),i=Ub(this,r);n=this.h.length?this.h[this.h.length-1]:null,i&&i.pts!=null&&i.dts!=null&&(!n||n.pts!=i.pts&&n.dts!=i.dts)?(this.h.length&&i.dts<(n.dts||0)&&(e=!0),this.h.push(i)):this.h.length&&(r=i?i.data:r)&&(n=this.h.pop(),n.data=En(n.data,r),this.h.push(n))}e&&(this.h=this.h.sort(function(a,u){var l=(a.pts||0)-(u.pts||0);return(a.dts||0)-(u.dts||0)||l}))}return this.h},f.wc=function(e){if(e=e===void 0?!0:e,this.j.length&&!this.g.length){for(var t=!1,n=w(this.j),r=n.next();!r.done;r=n.next()){var i=En.apply(vr,U(r.value)),a=Ub(this,i);r=this.g.length?this.g[this.g.length-1]:null,a&&a.pts!=null&&a.dts!=null&&(!r||r.pts!=a.pts&&r.dts!=a.dts)?(this.g.length&&a.dts<(r.dts||0)&&(t=!0),this.g.push(a)):this.g.length&&(i=a?a.data:i)&&(r=this.g.pop(),r.data=En(r.data,i),this.g.push(r))}if(e){for(n={Dd:null,state:null},r=[],i=w(this.g),a=i.next();!a.done;a=i.next())a=a.value,a.nalus=this.Xf(a,n),a.nalus.length&&(r.push(a),n.Dd=a.nalus[a.nalus.length-1]);this.g=r}t&&(this.g=this.g.sort(function(u,l){var p=(u.pts||0)-(l.pts||0);return(u.dts||0)-(l.dts||0)||p}))}return e?this.g:(e=this.g,this.g=[],e)},f.getStartTime=function(e){if(e=="audio"){e=null;var t=this.fb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return e=="video"?(e=null,t=this.wc(!1),t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},f.od=function(){return{audio:this.A,video:this.m}},f.be=function(){for(var e=[],t=w(this.wc()),n=t.next();!n.done;n=t.next())e.push.apply(e,U(n.value.nalus));return e},f.Mi=function(){ut("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Kf();return{height:e.height,width:e.width}},f.Kf=function(){return this.m=="hvc"?QR(this):JR(this)};function U4(e){var t=e.wc();return 1<t.length&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(1/(t-e)*9e4):null}function JR(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.be();if(!n.length||(n=n.find(function(S){return S.type==7}),!n))return t;n=new zo(n.data);var r=Ht(n),i=Ht(n),a=Ht(n);if(Jr(n),ZR.includes(r)){var u=Le(n);if(u===3&&gi(n,1),Jr(n),Jr(n),gi(n,1),ze(n)){u=u!==3?8:12;for(var l=0;l<u;l++)ze(n)&&(6>l?xm(n,16):xm(n,64))}}if(Jr(n),u=Le(n),u===0)Le(n);else if(u===1)for(gi(n,1),Jr(n),Jr(n),u=Le(n),l=0;l<u;l++)Jr(n);Jr(n),gi(n,1),u=Le(n),l=Le(n);var p=It(n,1);p===0&&gi(n,1),gi(n,1);var g=0,v=0,y=0,x=0;return ze(n)&&(g=Le(n),v=Le(n),y=Le(n),x=Le(n)),t.height=String((2-p)*(l+1)*16-2*y-2*x),t.width=String(16*(u+1)-2*g-2*v),t.codec="avc1."+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+a.toString(16).toUpperCase()).slice(-2),t.frameRate=U4(e),t}function QR(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.be();if(!n.length||(n=n.find(function(q){return q.type==33}),!n))return t;var r=new zo(n.fullData,!0);Ht(r),Ht(r),It(r,4);var i=It(r,3);ze(r);var a=It(r,2),u=It(r,1),l=It(r,5),p=It(r,32);n=Ht(r);for(var g=Ht(r),v=Ht(r),y=Ht(r),x=Ht(r),S=Ht(r),k=Ht(r),C=[],E=[],I=0;I<i;I++)C.push(ze(r)),E.push(ze(r));if(0<i)for(I=i;8>I;I++)It(r,2);for(I=0;I<i;I++)C[I]&&It(r,88),E[I]&&Ht(r);Le(r),i=Le(r),i==3&&It(r,1),C=Le(r),E=Le(r);var _=I=0,j=0,B=0;return ze(r)&&(I+=Le(r),_+=Le(r),j+=Le(r),B+=Le(r)),t.width=String(C-(I+_)*(i===1||i===2?2:1)),t.height=String(E-(j+B)*(i===1?2:1)),r=function(q){for(var O=0,R=0;32>R;R++)O|=(q>>R&1)<<31-R;return O>>>0}(p),u=u==1?"H":"L",a="hvc1"+("."+["","A","B","C"][a]+l),a+="."+r.toString(16).toUpperCase(),a+="."+u+k,S&&(a+="."+S.toString(16).toUpperCase()),x&&(a+="."+x.toString(16).toUpperCase()),y&&(a+="."+y.toString(16).toUpperCase()),v&&(a+="."+v.toString(16).toUpperCase()),g&&(a+="."+g.toString(16).toUpperCase()),n&&(a+="."+n.toString(16).toUpperCase()),t.codec=a,t.frameRate=U4(e),t}function F4(e,t){var n=1;for(e>t&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function Hc(e){return!(0>Fb(e))}function Fb(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(e[n]==71&&e[n+188]==71&&e[n+376]==71)return n;n++}return-1}Ee("shaka.util.TsParser",hn),hn.syncOffset=Fb,hn.probe=Hc,hn.prototype.getVideoInfo=hn.prototype.Kf,hn.prototype.getVideoResolution=hn.prototype.Mi,hn.prototype.getVideoNalus=hn.prototype.be,hn.prototype.getCodecs=hn.prototype.od,hn.prototype.getStartTime=hn.prototype.getStartTime,hn.prototype.getVideoData=hn.prototype.wc,hn.prototype.getAudioData=hn.prototype.fb,hn.prototype.getMetadata=hn.prototype.getMetadata,hn.prototype.parseNalus=hn.prototype.Xf,hn.prototype.parseAvcNalus=hn.prototype.hj,hn.prototype.parse=hn.prototype.parse,hn.prototype.clearData=hn.prototype.clearData,hn.Timescale=9e4;var ZR=[100,110,122,244,44,83,86,118,128,138,139,134];function j4(e,t,n,r){var i=this;this.g=e,this.K=n,this.A=null,this.ea=t,this.l=new Map,this.B=new Map,this.Aa=new Map,this.h=null,this.Ea=!1,this.I=r||null,this.u=new Map,this.o=new Ce,this.j=new Map,this.L=null,this.G=new Wt,this.Ga="",this.Na=!1,this.sa=!0,this.Z=!1,this.C=this.M=null,this.i=jb(this,this.G),this.ya=this.H=!1,this.O=new Uc(function(){return rN(i)}),this.F=!1,this.P="UNKNOWN",this.La=this.Ma=!1,this.Fa=new Wt,this.m=!1,this.pa=null,this.Y=new Map,this.ka=this.T=this.oa=this.W=null,this.fa=new Wt,this.g.remote&&(this.Z=this.g.remote.state!="disconnected",this.o.D(this.g.remote,"connect",function(){i.Z=i.g.remote.state!="disconnected"}),this.o.D(this.g.remote,"connecting",function(){i.Z=i.g.remote.state!="disconnected"}),this.o.D(this.g.remote,"disconnect",function(){i.Z=i.g.remote.state!="disconnected"}))}function jb(e,t){if(e.sa=!0,d.ManagedMediaSource){e.C||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.o.D(n,"startstreaming",function(){e.sa=!0}),e.o.D(n,"endstreaming",function(){e.sa=!1})}else n=new MediaSource;return e.o.ma(n,"sourceopen",function(){URL.revokeObjectURL(e.Ga),t.resolve()}),e.o.ma(e.g,"playing",function(){e.Na=!0}),e.Ga=zb(n),e.g.removeAttribute("src"),e.M&&e.g.removeChild(e.M),e.C&&e.g.removeChild(e.C),e.M=R4(e.Ga),e.g.appendChild(e.M),e.C&&e.g.appendChild(e.C),e.g.load(),n}function eN(e,t,n){e.g&&d.ManagedMediaSource&&e.i&&(e.C&&e.g.removeChild(e.C),e.C=R4(t,n),e.g.appendChild(e.C),e.g.disableRemotePlayback=!1)}function tN(e,t){var n,r,i,a,u,l,p,g,v,y,x;return P(function(S){if(S.g==1)return e.createSegmentIndex?T(S,e.createSegmentIndex(),2):S.s(2);if(!e.segmentIndex)return S.return(!1);if(e.segmentIndex.getNumReferences()==0)return S.return(!0);for(n=zn,r=new Set,i=w(e.segmentIndex),a=i.next();!a.done;a=i.next())if(u=a.value,l=u.mimeType||e.mimeType||"",p=u.codecs||e.codecs||"",(l!=e.mimeType||p!=e.codecs)&&(g=l+":"+p,!r.has(g))){if(r.add(g),t==n.za){if(v=Dn(l,p),!Pc(v))return S.return(!1)}else if(t==n.la?p=fb(p):t==n.V&&(p=th(p,l)),y=j7(e,l,p),x=Dc(l,p),!ir(y)&&!Ps(x))return S.return(!1)}return S.return(!0)})}function nN(){var e='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.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(U(Uo)),t={};e=w(e);for(var n=e.next();!n.done;n=e.next()){n=n.value,Pc(n)?t[n]=!0:t[n]=Za()?ir(n)||!!Ps(n):jp(n);var r=n.split(";")[0];t[r]=t[r]||t[n]}return t}f=j4.prototype,f.destroy=function(){return this.O.destroy()};function rN(e){var t,n,r,i,a,u,l,p,g,v,y,x,S,k,C;return P(function(E){if(E.g==1){for(t=[],n=w(e.u),r=n.next();!r.done;r=n.next())for(i=r.value,a=w(i),u=a.next().value,l=a.next().value,p=l[0],g=u,e.u.set(g,l.slice(0,1)),p&&t.push(p.p.catch(q7)),v=w(l.slice(1)),y=v.next();!y.done;y=v.next())x=y.value,x.p.reject(new $(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),T(E,Promise.all(t),2)}for(S=w(e.j.values()),k=S.next();!k.done;k=S.next())C=k.value,C.destroy();e.o&&(e.o.release(),e.o=null),e.g&&e.C&&e.g.removeChild(e.C),e.g&&e.M&&(e.g.removeChild(e.M),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.M=null,e.C=null,e.A=null,e.i=null,e.h=null,e.ea=null,e.l.clear(),e.Aa.clear(),e.j.clear(),e.L=null,e.u.clear(),e.I=null,e.Y.clear(),e.K=null,oe(E)})}f.init=function(e,t,n,r){t=t===void 0?!1:t,n=n===void 0?"UNKNOWN":n,r=r===void 0?!1:r;var i=this,a,u,l,p,g,v;return P(function(y){switch(y.g){case 1:return a=zn,T(y,i.G,2);case 2:if(!rl(i)&&!qc(i)){y.s(3);break}return at("Expected MediaSource to be open during init(); reopening the media source."),i.G=new Wt,i.i=jb(i,i.G),T(y,i.G,3);case 3:i.F=t,i.P=n,i.Ma=r,i.La=!i.F&&i.P=="HLS"&&!i.Ma,i.Y.clear(),i.W=null,i.oa=null,i.T=null,i.ka=null,i.fa=new Wt,u=w(e.keys()),l=u.next();case 5:if(l.done){y.s(7);break}return p=l.value,g=e.get(p),T(y,Sm(i,p,g,g.codecs),8);case 8:i.m?(i.u.set(a.V,[]),i.u.set(a.la,[])):i.u.set(p,[]),l=u.next(),y.s(5);break;case 7:(v=e.get(a.V))&&v.isAudioMuxedInVideo&&(i.m=!0),oe(y)}})};function Sm(e,t,n,r){var i,a,u,l,p,g,v,y,x,S,k,C;return P(function(E){switch(E.g){case 1:return i=zn,a=In,u=rr,T(E,tN(n,t),2);case 2:if(u.call(a,E.h,"Type negotiation should happen before MediaSourceEngine.init!"),t==i.V&&r&&(r=th(r,n.mimeType)),l=Dn(n.mimeType,r),t==i.za){km(e,l,e.F,n.external),E.s(0);break}if(p=e.A.forceTransmux,(!ir(l)||!e.F&&Uo.includes(l))&&(p=!0),g=Dc(n.mimeType,r),!p){E.s(4);break}if(v=Xr(i.V,(r||"").split(",")),y=Xr(i.la,(r||"").split(",")),!v||!y){E.s(5);break}return e.m=!0,T(E,Sm(e,i.V,n,v),6);case 6:return T(E,Sm(e,i.la,n,y),7);case 7:return E.return();case 5:(x=Ps(g))&&(S=x(),e.j.set(t,S),l=S.convertCodecs(t,g));case 4:k=l+e.A.addExtraFeaturesToSourceBuffer(l),nn(e.O);try{C=e.i.addSourceBuffer(k)}catch(I){throw new $(2,3,3015,I,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.F&&(C.mode=mN),e.o.D(C,"error",function(){var I=e.u.get(t)[0];I.p.reject(new $(2,3,3014,e.g.error?e.g.error.code:0,I.uri))}),e.o.D(C,"updateend",function(){return Ho(e,t)}),e.l.set(t,C),e.B.set(t,l),e.Aa.set(t,!!n.drmInfos.length),oe(E)}})}f.configure=function(e){this.A=e,this.h&&(this.h.A=e.modifyCueCallback)};function B4(e){return e.sa&&!e.Z&&!e.H}function km(e,t,n,r){e.h||(e.h=new Fo(e.ea),e.h&&(e.h.A=e.A.modifyCueCallback));var i=e.h;r=r||e.Ea,e=e.P,t=="application/cea-608"||t=="application/cea-708"?i.i=null:(i.i=Qp.get(t)(),i.i.setSequenceMode?i.i.setSequenceMode(n):ut("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),i.i.setManifestType?i.i.setManifestType(e):ut("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),i.B=r)}function rl(e){return e.H?!1:e.i?e.i.readyState=="ended":!0}function qc(e){return e.H?!1:e.i?e.i.readyState=="closed":!0}function Bb(e,t){return e.l.size?t==wt?e=e.h.g:(e=Gc(e,t),e=!e||ph(e)?null:e.length==1&&0>e.start(0)?0:e.length?e.start(0):null):e=null,e}function il(e,t){return e.l.size?t==wt?e.h.h:Db(Gc(e,t)):null}function iN(e,t,n){return t==wt?(e=e.h,e.h==null||e.h<n?0:e.h-Math.max(n,e.g)):(e=Gc(e,t),P4(e,n))}f.Fb=function(){var e={total:this.H?[]:$o(this.g.buffered),audio:$o(Gc(this,"audio")),video:$o(Gc(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;t!=null&&n!=null&&e.text.push({start:t,end:n})}return e};function Gc(e,t){if(e.H||e.Z)return null;try{return e.l.get(t).buffered}catch{return e.l.has(t),null}}function aN(e,t,n,r,i,a){var u=null,l=[],p=Ye(n);if(Uo.includes(a))t=nl(p),t.length&&r&&((n=t.find(function(S){return S.description==="com.apple.streaming.transportStreamTimestamp"}))&&(u=Math.round(n.data)/1e3),e.K.onMetadata([{cueTime:r.startTime,data:p,frames:t,dts:r.startTime,pts:r.startTime}],0,r.endTime));else if(a.includes("/mp4")&&r&&r.$&&r.$.timescale){var g=r.$.timescale;if(!isNaN(g)){var v=i.emsgSchemeIdUris!=null&&0<i.emsgSchemeIdUris.length||e.A.dispatchAllEmsgBoxes,y=0,x=!1;p=new Qt,v&&p.R("emsg",function(S){var k=i.emsgSchemeIdUris;if(S.version===0)var C=S.reader.Cc(),E=S.reader.Cc(),I=S.reader.S(),_=S.reader.S(),j=S.reader.S(),B=S.reader.S(),q=r.startTime+_/I;else I=S.reader.S(),q=S.reader.bd()/I+r.timestampOffset,_=q-r.startTime,j=S.reader.S(),B=S.reader.S(),C=S.reader.Cc(),E=S.reader.Cc();S=S.reader.Cb(S.reader.getLength()-S.reader.Ba()),(k&&k.includes(C)||e.A.dispatchAllEmsgBoxes)&&(C=="urn:mpeg:dash:event:2012"?e.K.gj():(k=q+j/I,I={startTime:q,endTime:k,schemeIdUri:C,value:E,timescale:I,presentationTimeDelta:_,eventDuration:j,id:B,messageData:S},B=new Map().set("detail",I),new Ae("emsg",B).cancelable=!0,e.K.ej(I),(C=="https://aomedia.org/emsg/ID3"||C=="https://developer.apple.com/streaming/emsg-id3")&&(C=nl(S),C.length&&e.K.onMetadata([{cueTime:q,data:S,frames:C,dts:q,pts:q}],0,k))))}),p.R("prft",function(S){var k=S.reader,C=S.version;k.S(),S=k.S();var E=k.S();S=1e3*S+E/Math.pow(2,32)*1e3,C===0?k=k.S():(C=k.S(),k=k.S(),k=C*Math.pow(2,32)+k),S=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+S).getTime(),k=new Map().set("detail",{wallClockTime:S,programStartDate:new Date(S-k/g*1e3)}),k=new Ae("prft",k),e.K.onEvent(k)}).box("moof",xt).box("traf",xt).R("tfdt",function(S){x||(y=gm(S.reader,S.version).baseMediaDecodeTime/g,x=!0,v||S.parser.stop())}).parse(n,!0),x&&r.timestampOffset==0&&(u=y)}}else a.includes("/mp4")||a.includes("/webm")||!Hc(p)||(e.Y.has(t)?e.Y.get(t).clearData():e.Y.set(t,new hn),l=e.Y.get(t).parse(p),p=l.getStartTime(t),p!=null&&(u=p),l=l.getMetadata());return{timestamp:u,metadata:l}}function Tm(e,t,n,r,i,a,u,l,p,g){u=u===void 0?!1:u,l=l===void 0?!1:l,p=p===void 0?!1:p,g=g===void 0?!1:g;var v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y;return P(function(K){switch(K.g){case 1:if(v=zn,t!=v.za){K.s(2);break}if(e.P!="HLS"){K.s(3);break}return T(K,e.Fa,4);case 4:y=K.h,e.h.u=y;case 3:return T(K,V7(e.h,n,r?r.startTime:null,r?r.endTime:null,r?r.N()[0]:null),5);case 5:return K.return();case 2:if(g||!e.m){K.s(6);break}return T(K,Tm(e,v.V,n,r,i,a,u,l,p,!0),7);case 7:return T(K,Tm(e,v.la,n,r,i,a,u,l,p,!0),8);case 8:return K.return();case 6:if(!e.l.has(t))return K.return();if(x=e.l.get(t).timestampOffset,S=e.B.get(t),e.j.has(t)&&(S=e.j.get(t).getOriginalMimeType()),r&&(k=aN(e,t,n,r,i,S),C=k.timestamp,E=k.metadata,C!=null&&(e.W==null&&t==v.la&&(e.W=C,e.oa=r.startTime,e.T!=null&&(I=0,e.oa==e.ka&&(I=e.W-e.T),e.fa.resolve(I))),e.T==null&&t==v.V&&(e.T=C,e.ka=r.startTime,e.W!=null&&(_=0,e.oa==e.ka&&(_=e.W-e.T),e.fa.resolve(_))),j=C,B=Uo,!e.F&&B.includes(e.B.get(t))&&(j=0),q=r.startTime-j,O=Math.abs(x-q),(.001<=O||u||l)&&(!p||0<q||!x)&&(x=q,e.La&&(Zn(e,t,function(){return Kc(e,t)},null),Zn(e,t,function(){return Wc(e,t,x)},null))),(t==v.la||!e.l.has(v.la))&&e.Fa.resolve(x)),E.length)&&e.K.onMetadata(E,x,r?r.endTime:null),a&&t==v.la&&(e.h||km(e,"application/cea-608",e.F,!1),e.L||(R=S.split(";",1)[0],e.L=new Ci(R)),r?(H=e.L.i(n),H.length&&z7(e.h,H,r.startTime,r.endTime,x)):e.L.init(n,l)),!e.j.has(t)){K.s(9);break}return T(K,e.j.get(t).transmux(n,i,r,e.i.duration,t),10);case 10:n=K.h;case 9:if(n=dN(e,i,n,r,t),!r||!e.F||t==v.za){K.s(11);break}if(!u&&!l){K.s(11);break}if(z=r.startTime,e.P!="HLS"||e.m||t!=v.V||!e.l.has(v.la)){K.s(13);break}return T(K,e.fa,14);case 14:Y=K.h,.15<Math.abs(Y)&&(z-=Y);case 13:Zn(e,t,function(){return Kc(e,t)},null),Zn(e,t,function(){return Wc(e,t,z)},null);case 11:return T(K,Zn(e,t,function(){var J=n;e.I&&q1(e.I,J,x,i),e.l.get(t).appendBuffer(J)},r?r.N()[0]:null),15);case 15:oe(K)}})}function oN(e,t){var n=il(e,"video")||0;C5(e.h,t,n)}function sN(e){e.h&&C5(e.h,"",0)}f.remove=function(e,t,n){var r=this,i;return P(function(a){return a.g==1?(i=zn,e==i.za?T(a,r.h.remove(t,n),0):n>t?T(a,Zn(r,e,function(){return Am(r,e,t,n)},null),5):a.s(0)):r.m?T(a,Zn(r,i.V,function(){return Am(r,i.V,t,n)},null),0):a.s(0)})};function V4(e,t){var n;return P(function(r){return r.g==1?(n=zn,t==n.za?e.h?T(r,e.h.remove(0,1/0),0):r.return():T(r,Zn(e,t,function(){return Am(e,t,0,e.i.duration)},null),4)):e.m?T(r,Zn(e,n.V,function(){return Am(e,n.V,0,e.i.duration)},null),0):r.s(0)})}f.flush=function(e){var t=this,n;return P(function(r){return r.g==1?(n=zn,e==n.za?r.return():T(r,Zn(t,e,function(){t.g.currentTime-=.001,Ho(t,e)},null),2)):t.m?T(r,Zn(t,n.V,function(){var i=n.V;t.g.currentTime-=.001,Ho(t,i)},null),0):r.s(0)})};function uN(e,t,n,r,i,a,u,l,p){var g,v,y;return P(function(x){return x.g==1?(g=zn,t==g.za?(a||(e.h.u=n),$7(e.h,r,i),x.return()):(v=[],T(x,fN(e,t,u,l,p),2))):(y=x.h,y||(v.push(Zn(e,t,function(){return Kc(e,t)},null)),e.m&&v.push(Zn(e,g.V,function(){return Kc(e,g.V)},null))),a||(v.push(Zn(e,t,function(){return Wc(e,t,n)},null)),e.m&&v.push(Zn(e,g.V,function(){return Wc(e,g.V,n)},null))),(r!=0||i!=1/0)&&(v.push(Zn(e,t,function(){var S=e.l.get(t);S.appendWindowStart=0,S.appendWindowEnd=i,S.appendWindowStart=r,Ho(e,t)},null)),e.m&&v.push(Zn(e,g.V,function(){var S=g.V,k=e.l.get(S);k.appendWindowStart=0,k.appendWindowEnd=i,k.appendWindowStart=r,Ho(e,S)},null))),v.length?T(x,Promise.all(v),0):x.s(0))})}function lN(e,t,n){var r,i;return P(function(a){return a.g==1?(r=zn,t==r.za||(t==r.la&&(e.Fa=new Wt),!e.F||(i=il(e,t))&&.1>Math.abs(i-n))?a.return():(Zn(e,t,function(){return Kc(e,t)},null),e.m&&Zn(e,r.V,function(){return Kc(e,r.V)},null),T(a,Zn(e,t,function(){return Wc(e,t,n)},null),2))):e.m?T(a,Zn(e,r.V,function(){return Wc(e,r.V,n)},null),0):a.s(0)})}f.endOfStream=function(e){var t=this;return P(function(n){return T(n,hh(t,function(){rl(t)||qc(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},f.bb=function(e){var t=this;return P(function(n){return T(n,hh(t,function(){if(e<t.i.duration)for(var r=w(t.l.keys()),i=r.next();!i.done;i=r.next()){i=i.value;var a={start:function(){},p:new Wt,uri:null};t.u.get(i).unshift(a)}t.i.duration=e,t.pa=e}),0)})},f.getDuration=function(){return this.i.duration};function cN(e,t,n){P(function(r){return rl(e)||qc(e)?r.return():T(r,hh(e,function(){rl(e)||qc(e)||e.i.setLiveSeekableRange(t,n)}),0)})}function Vb(e){P(function(t){return rl(e)||qc(e)?t.return():T(t,hh(e,function(){rl(e)||qc(e)||e.i.clearLiveSeekableRange()}),0)})}function Am(e,t,n,r){r<=n?Ho(e,t):e.l.get(t).remove(n,r)}function Kc(e,t){var n=e.l.get(t),r=n.appendWindowStart,i=n.appendWindowEnd;n.abort(),n.appendWindowStart=r,n.appendWindowEnd=i,Ho(e,t)}function Wc(e,t,n){0>n&&(n+=.001);var r=!0;e.P=="HLS"&&(r=il(e,t),r=!r||.15<Math.abs(r-n)),r&&(e.l.get(t).timestampOffset=n),Ho(e,t)}function Ho(e,t){if(!e.H){var n=e.u.get(t)[0];n&&(n.p.resolve(),$b(e,t))}}function Zn(e,t,n,r){return nn(e.O),n={start:n,p:new Wt,uri:r},e.u.get(t).push(n),e.u.get(t).length==1&&$4(e,t),n.p}function hh(e,t){var n,r,i,a,u,l,p,g,v,y,x,S,k;return P(function(C){switch(C.g){case 1:for(nn(e.O),n=[],r=Array.from(e.l.keys()),i=w(r),a=i.next(),u={};!a.done;u={ready:void 0},a=i.next())l=a.value,u.ready=new Wt,p={start:function(E){return function(){return E.ready.resolve()}}(u),p:u.ready,uri:null},g=e.u.get(l),g.push(p),n.push(u.ready),g.length==1&&p.start();return ve(C,2),T(C,Promise.all(n),4);case 4:V(C,3);break;case 2:throw v=W(C),v;case 3:return ve(C,5,6),T(C,t(),6);case 6:for(Se(C),y=w(r),x=y.next();!x.done;x=y.next())S=x.value,$b(e,S);te(C,0);break;case 5:throw k=W(C),new $(2,3,3015,k,e.g.error||"No error in the media element",null)}})}function $b(e,t){e.u.get(t).shift(),$4(e,t)}function $4(e,t){var n=e.u.get(t)[0];if(n)try{n.start()}catch(r){r.name=="QuotaExceededError"?n.p.reject(new $(2,3,3017,t)):B4(e)?n.p.reject(new $(2,3,3015,r,e.g.error||"No error in the media element",n.uri)):n.p.reject(new $(2,3,3024,t)),$b(e,t)}}function dN(e,t,n,r,i){if(em(e.B.get(i))!="mp4")return n;var a=r===null,u=e.Aa.get(i),l=e.K.si(),p=!1;return r&&r.$&&(p=r.$.encrypted),r=r?r.N()[0]:null,(e=e.A.insertFakeEncryptionInInit&&u)&&(l=U1(l),e=dr()&&i==="audio"||Na()||Ra()||Rn("SOPOpenBrowser")||Bp()&&F1()&&l),e&&(a?n=zR(t,n,r):((t=!p)&&(t=dr()&&i==="audio"),t&&(n=HR(n)))),a&&Mo()&&(n=KR(n)),n}function pN(e,t,n,r){return Zn(e,t,function(){if(t!==wt){if(e.B.get(t),Bu()){e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),r&&e.j.set(t,r);var i=n+e.A.addExtraFeaturesToSourceBuffer(n);e.l.get(t).changeType(i),e.B.set(t,n)}Ho(e,t)}},null)}function hN(e,t){var n,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q;return P(function(O){switch(O.g){case 1:if(e.H)return O.return();for(n=zn,e.H=!0,e.m=!1,r=e.g.currentTime,i=e.g.autoplay,e.g.paused||(e.ya=!0),e.Na&&(e.g.autoplay=!1),be(O,2),e.o.Qa(),a=w(e.j.values()),u=a.next();!u.done;u=a.next())l=u.value,l.destroy();for(p=w(e.l.values()),g=p.next();!g.done;g=p.next()){v=g.value;try{e.i.removeSourceBuffer(v)}catch{}}return e.j.clear(),e.l.clear(),y=e.i.duration,e.G=new Wt,e.i=jb(e,e.G),T(O,e.G,4);case 4:!isNaN(y)&&y?e.i.duration=y:!isNaN(e.pa)&&e.pa&&(e.i.duration=e.pa),x=new Wt,S=e.i.sourceBuffers,k=t.size,C=0,E=function(){C++,C===k&&(x.resolve(),e.o.Ja(S,"addsourcebuffer",E))},e.o.D(S,"addsourcebuffer",E),I=w(t.keys()),_=I.next();case 5:return _.done?((q=t.get(n.V))&&q.isAudioMuxedInVideo&&(e.m=!0),e.m&&!e.u.has(n.V)&&e.u.set(n.V,[]),e.g.currentTime=r,T(O,x,2)):(j=_.value,B=t.get(j),T(O,Sm(e,j,B,B.codecs),6));case 6:_=I.next(),O.s(5);break;case 2:Se(O),e.H=!1,nn(e.O),e.o.ma(e.g,"canplaythrough",function(){e.O.g||(e.g.autoplay=i,e.ya&&(e.ya=!1,e.g.play()))}),te(O,0)}})}function z4(e,t){return hh(e,function(){return hN(e,t)})}function H4(e,t,n,r){var i=!1,a=Xr("audio",(r||"").split(",")),u=Xr("video",(r||"").split(",")),l=u;t=="audio"&&(l=a),l||(l=r),r=Dn(n,l);var p=e.A.forceTransmux;if((!ir(r)||!e.F&&Uo.includes(r))&&(p=!0),p&&(e=Dc(n,l),n=Ps(e))){var g=n();a&&u&&(i=!0),r=g.convertCodecs(t,e)}return t=yr(pi(r)),{ug:g,Fj:i,Eg:di(r),codec:t,mimeType:r}}function fN(e,t,n,r,i){var a,u,l,p,g,v,y,x,S,k,C,E,I,_;return P(function(j){return j.g==1?(a=zn,t==a.za?j.return(!1):(u=yr(pi(e.B.get(t))),l=di(e.B.get(t)),p=H4(e,t,n,r),g=p.ug,v=p.Fj,y=p.Eg,x=p.codec,S=p.mimeType,k=!0,v&&e.B.has(a.V)&&(C=H4(e,a.V,n,r),E=yr(pi(e.B.get(a.V))),I=di(e.B.get(a.V)),k=E==C.codec&&I==C.Eg,C.ug&&C.ug.destroy()),u===x&&l===y&&k?(e.j.has(t)&&!g?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&g?e.j.set(t,g):g&&(e.j.has(t)&&e.j.get(t).transmux!=g.transmux?(e.j.get(t).destroy(),e.j.delete(t),e.j.set(t,g)):g.destroy()),j.return(!1)):(_=!0,(e.m||v&&g&&!e.j.has(t))&&(_=!1),_&&e.A.codecSwitchingStrategy==="smooth"&&Bu()?T(j,pN(e,t,S,g),3):(g&&g.destroy(),T(j,z4(e,i),3))))):j.return(!0)})}function gN(e,t,n,r){if(t==wt)var i=!1;else{i=yr(pi(e.B.get(t)));var a=di(e.B.get(t)),u=Dn(n,r),l=e.A.forceTransmux;(!ir(u)||!e.F&&Uo.includes(u))&&(l=!0),n=Dc(n,r),l&&(l=Ps(n))&&(l=l(),u=l.convertCodecs(t,n),l.destroy()),t=yr(pi(u)),u=di(u),i=i!==t||a!==u}return i?e.A.codecSwitchingStrategy!=="smooth"||!Bu()||e.m:!1}var zb=d.URL.createObjectURL,mN="sequence";function Ke(e,t,n){this.i=e,this.C=t,this.o=this.l=1/0,this.h=1,this.g=this.j=null,this.A=0,this.B=!0,this.I=!1,this.H=0,this.F=n===void 0?!0:n,this.G=0,this.u=!1,this.m=e}f=Ke.prototype,f.getDuration=function(){return this.l},f.vi=function(){return this.h},f.yh=function(e){this.i=e},f.bb=function(e){this.l=e},f.Bi=function(){return this.i},f.wh=function(e){this.A=e},f.Gc=function(e){e&&!this.B&&(this.I=!0),this.B=e},f.Ce=function(e){this.o=e},f.ae=function(){return this.o},f.jg=function(e){this.C=e},f.li=function(){return this.C},f.kh=function(e,t){if(e.length!=0){var n=(Date.now()+this.A)/1e3;if(e=e.filter(function(i){return i.start+t<n}),e.length!=0){var r=e[e.length-1].end+t;this.ne(e[0].start+t),this.h=e.reduce(function(i,a){return Math.max(i,a.end-a.start)},this.h),this.g=Math.max(this.g,r),this.i!=null&&this.F&&!this.u&&(this.i=n-this.g-this.h)}}},f.Ed=function(e){if(e.length!=0){var t=e[0].startTime,n=e[0].endTime,r=(Date.now()+this.A)/1e3;e=w(e);for(var i=e.next();!i.done;i=e.next())i=i.value,r<i.startTime||(t=Math.min(t,i.startTime),n=Math.max(n,i.endTime),this.h=Math.max(this.h,i.endTime-i.startTime));this.ne(t),this.g=Math.max(this.g,n),this.i!=null&&this.F&&!this.u&&(this.i=r-this.g-this.h)}},f.jh=function(e,t){this.ne(e),t==1/0||this.U()||(this.g=Math.max(this.g,t))},f.wi=function(){return this.g},f.ie=function(){this.u=!0},f.Wi=function(){return this.u},f.xh=function(e){this.m=e},f.ri=function(){return this.m},f.ne=function(e){this.j==null?this.j=e:this.I||(this.j=Math.min(this.j,e))},f.Tf=function(e){this.h=Math.max(this.h,e)},f.offset=function(e){this.j!=null&&(this.j+=e),this.g!=null&&(this.g+=e)},f.U=function(){return this.l==1/0&&!this.B},f.yc=function(){return this.l!=1/0&&!this.B},f.pb=function(){return Math.max(this.H,this.cc()-this.o)},f.Bh=function(e){this.H=e},f.cc=function(){return this.U()||this.yc()?Math.min(Math.max(0,(Date.now()+this.A)/1e3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l},f.qd=function(e){var t=Math.max(this.j,this.H);return this.o==1/0?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.cc()-this.o+e,this.ob()))},f.Hb=function(){return this.qd(0)},f.ob=function(){return Math.max(0,this.cc()-(this.U()||this.yc()?this.C:0))},f.Kh=function(){return!(this.i==null||this.g!=null&&this.F)},f.vh=function(e){this.G=e},f.ii=function(){return this.G},Ee("shaka.media.PresentationTimeline",Ke),Ke.prototype.getAvailabilityTimeOffset=Ke.prototype.ii,Ke.prototype.setAvailabilityTimeOffset=Ke.prototype.vh,Ke.prototype.usingPresentationStartTime=Ke.prototype.Kh,Ke.prototype.getSeekRangeEnd=Ke.prototype.ob,Ke.prototype.getSeekRangeStart=Ke.prototype.Hb,Ke.prototype.getSafeSeekRangeStart=Ke.prototype.qd,Ke.prototype.getSegmentAvailabilityEnd=Ke.prototype.cc,Ke.prototype.setUserSeekStart=Ke.prototype.Bh,Ke.prototype.getSegmentAvailabilityStart=Ke.prototype.pb,Ke.prototype.isInProgress=Ke.prototype.yc,Ke.prototype.isLive=Ke.prototype.U,Ke.prototype.offset=Ke.prototype.offset,Ke.prototype.notifyMaxSegmentDuration=Ke.prototype.Tf,Ke.prototype.notifyMinSegmentStartTime=Ke.prototype.ne,Ke.prototype.getInitialProgramDateTime=Ke.prototype.ri,Ke.prototype.setInitialProgramDateTime=Ke.prototype.xh,Ke.prototype.isStartTimeLocked=Ke.prototype.Wi,Ke.prototype.lockStartTime=Ke.prototype.ie,Ke.prototype.getMaxSegmentEndTime=Ke.prototype.wi,Ke.prototype.notifyPeriodDuration=Ke.prototype.jh,Ke.prototype.notifySegments=Ke.prototype.Ed,Ke.prototype.notifyTimeRange=Ke.prototype.kh,Ke.prototype.getDelay=Ke.prototype.li,Ke.prototype.setDelay=Ke.prototype.jg,Ke.prototype.getSegmentAvailabilityDuration=Ke.prototype.ae,Ke.prototype.setSegmentAvailabilityDuration=Ke.prototype.Ce,Ke.prototype.setStatic=Ke.prototype.Gc,Ke.prototype.setClockOffset=Ke.prototype.wh,Ke.prototype.getPresentationStartTime=Ke.prototype.Bi,Ke.prototype.setDuration=Ke.prototype.bb,Ke.prototype.setPresentationStartTime=Ke.prototype.yh,Ke.prototype.getMaxSegmentDuration=Ke.prototype.vi,Ke.prototype.getDuration=Ke.prototype.getDuration;function Hb(e,t,n,r){var i=this;this.u=r,this.g=e,this.B=t,this.h=n,this.o=new Ce,this.l=!1,this.F=e.readyState,this.G=this.C=this.j=0,this.m=vN(this),this.A=!1,this.o.D(e,"waiting",function(){return fh(i)}),this.i=new Tt(function(){fh(i)}).ua(this.h.gapJumpTimerTime)}Hb.prototype.release=function(){this.o&&(this.o.release(),this.o=null),this.i!=null&&(this.i.stop(),this.i=null),this.m&&(this.m.release(),this.m=null),this.g=this.B=this.u=null},Hb.prototype.qe=function(){this.A=!0,this.i&&this.i.ua(this.h.gapJumpTimerTime),fh(this)};function fh(e){if(e.g.readyState!=0){if(e.g.seeking){if(!e.l)return}else e.l=!1;if(!e.g.paused||e.g.currentTime==e.j&&(e.g.autoplay||e.g.currentTime!=e.j)){e.g.readyState!=e.F&&(e.F=e.g.readyState);var t;if(!(t=!e.m)){t=e.m;var n=t.j,r=G4(n),i=n.g.currentTime,a=Date.now()/1e3;(t.g!=i||t.m!=r)&&(t.l=a,t.g=i,t.m=r,t.h=!1),i=a-t.l,(r=i>=t.o&&r&&!t.h)&&(t.i&&t.i(t.g,i),t.h=!0,t.g=n.g.currentTime),t=!r}t&&(t=e.g.currentTime,n=e.g.buffered,r=WR(n,t,e.h.gapDetectionThreshold),r==null||r==0&&!e.A||(i=n.start(r),(a=e.h.gapPadding)&&(i=Math.ceil(100*(i+a))/100),i>=e.B.ob()||.001>i-t||(r!=0&&n.end(r-1),e.g.currentTime=i,t==e.j&&(e.j=i),e.C++,e.u(new Ae("gapjumped")))))}}}function vN(e){if(!e.h.stallEnabled)return null;var t=e.h.stallSkip;return new q4(new yN(e.g),e.h.stallThreshold,function(){var n;return P(function(r){if(r.g==1)return n=$o(e.g.buffered),n.length?t?(e.g.currentTime+=t,r.s(2)):T(r,e.g.play(),3):r.return();if(r.g!=2){if(!e.g)return r.return();e.g.pause(),e.g.play()}e.G++,e.u(new Ae("stalldetected")),oe(r)})})}function q4(e,t,n){this.j=e,this.m=G4(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.o=t,this.i=n}q4.prototype.release=function(){this.i=this.j=null};function yN(e){this.g=e}function G4(e){if(e.g.paused||e.g.playbackRate==0||e.g.buffered.length==0)var t=!1;else e:{t=e.g.currentTime,e=w($o(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(n=n.value,!(t<n.start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function Xc(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=bN.value().get(t),n.ma(e,t,r))}var bN=new Up(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function K4(e,t,n,r){var i=this;this.g=e,this.m=t,this.u=n,this.l=null,this.j=function(){return i.l==null&&(i.l=r()),i.l},this.o=!1,this.h=new Ce,this.i=new J4(e),Xc(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){X4(i,i.j())})}K4.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i!=null&&(this.i.release(),this.i=null),this.m=function(){},this.g=null};function qb(e){return e.o?e.g.currentTime:e.j()}function W4(e,t){0<e.g.readyState?Q4(e.i,t):Xc(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){X4(e,e.j())})}function X4(e,t){.001>Math.abs(e.g.currentTime-t)?Y4(e):(e.h.ma(e.g,"seeking",function(){Y4(e)}),Q4(e.i,e.g.currentTime&&e.g.currentTime!=0?e.g.currentTime:t))}function Y4(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function J4(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new Tt(function(){0>=t.i||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}J4.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null};function Q4(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.ua(.1)}function Z4(e){this.h=e,this.j=!1,this.g=null,this.i=new Ce}f=Z4.prototype,f.ready=function(){function e(){if(t.g==null||t.g==0&&t.h.duration!=1/0)t.j=!0;else{var n=t.h.currentTime,r=t.g;0>t.g&&(r=Math.max(0,n+t.g)),n!=r?(t.i.ma(t.h,"seeking",function(){t.j=!0}),t.h.currentTime=r):t.j=!0}}var t=this;Xc(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){e()})},f.release=function(){this.i&&(this.i.release(),this.i=null),this.h=null},f.af=function(e){this.g=this.j?this.g:e},f.Od=function(){return(this.j?this.h.currentTime:this.g)||0},f.Ag=function(){return 0},f.zg=function(){return 0},f.ih=function(){};function eA(e,t,n,r,i,a){var u=this;this.i=e,this.g=t.presentationTimeline,this.l=n,this.u=i,this.o=null,this.j=new Hb(e,t.presentationTimeline,n,a),this.h=new K4(e,function(){e:{var l=u.j;l.l=!0,l.A=!1,l.i&&l.i.ua(l.h.gapJumpTimerTime),fh(l);var p=qb(u.h);if(l=nA(u,p),!s5()&&.001<Math.abs(l-p)){if(p=!1,!la()||la()&&Cs())p=!0;else{var g=Date.now()/1e3,v=la()&&j1()?3:1;(!u.o||u.o<g-v)&&(u.o=g,p=!0)}if(p){W4(u.h,l),l=void 0;break e}}u.u(),l=void 0}return l},function(l){var p=u.j;p.g.seeking&&!p.l&&(p.l=!0,p.j=l),p.i&&p.i.ua(p.h.gapJumpTimerTime),fh(p)},function(){var l=r;return l==null?l=1/0>u.g.getDuration()?u.g.Hb():u.g.ob():0>l&&(l=u.g.ob()+l),tA(u,rA(u,l))}),this.m=new Tt(function(){if(u.i.readyState!=0&&!u.i.paused){var l=qb(u.h),p=u.g.Hb(),g=u.g.ob();3>g-p&&(p=g-3),l<p&&(l=nA(u,l),u.i.currentTime=l)}})}f=eA.prototype,f.ready=function(){this.m.ua(.25)},f.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(){}},f.af=function(e){W4(this.h,e)},f.Od=function(){var e=qb(this.h);return 0<this.i.readyState&&!this.i.paused?rA(this,e):e},f.Ag=function(){return this.j.G},f.zg=function(){return this.j.C},f.ih=function(){this.j.qe()};function tA(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function nA(e,t){var n=e.l.rebufferingGoal,r=e.l.safeSeekOffset,i=e.g.Hb(),a=e.g.ob(),u=e.g.getDuration();3>a-i&&(i=a-3);var l=e.g.qd(n),p=e.g.qd(r);return n=e.g.qd(n+r),t>=u?tA(e,t):t>a?a-e.l.safeSeekEndOffset:t<i?Pb(e.i.buffered,p)?p:n:t>=l||Pb(e.i.buffered,t)?t:n}function rA(e,t){var n=e.g.Hb();return t<n?n:(e=e.g.ob(),t>e?e:t)}function jt(e){this.g=e,this.m=null,this.i=0,this.o=!1}f=jt.prototype,f.getNumReferences=function(){return this.g.length},f.getNumEvicted=function(){return this.i},f.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},f.bj=function(){this.o=!0},f.Eb=function(e){for(var t=w(this.g),n=t.next();!n.done;n=t.next())e(n.value)};function Ba(e){return e.g[0]||null}f.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var r=this.g[n],i=n<t?this.g[n+1].startTime:r.endTime;if(e>=r.startTime&&e<i)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},f.get=function(e){return this.g.length==0?null:(e-=this.i,0>e||e>=this.g.length?null:this.g[e])},f.offset=function(e){if(!this.o)for(var t=w(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},f.ke=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter(function(n){return Math.round(1e3*n.startTime)/1e3<t}),this.g.push.apply(this.g,U(e))}},f.Bd=function(e,t){var n=this;e=e.filter(function(r){return r.endTime>t&&(n.g.length==0||r.endTime>n.g[0].startTime)}),this.ke(e),this.Oa(t)},f.Oa=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter(function(n){return n.endTime>e}),this.i+=t-this.g.length}},f.Oc=function(e,t,n){if(n=n===void 0?!1:n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;this.g.length!=0&&(e=this.g[this.g.length-1],t=new Ge(e.startTime,t,e.C,e.Sa,e.wa,e.$,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.B,e.h,e.status,e.aesKey),t.mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},f.Ie=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new Tt(function(){var r=t();r?n.g.push.apply(n.g,U(r)):(n.m.stop(),n.m=null)}),this.m.ua(e))},jt.prototype[Symbol.iterator]=function(){return this.Gb(0)},jt.prototype.Gb=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?!1:n;var r=this.find(e);if(r==null)return null;var i=this.get(r);n?r++:r--;var a=-1;if(i&&0<i.g.length)for(var u=i.g.length-1;0<=u;--u){var l=i.g[u];if(e>=l.startTime&&e<l.endTime){if(!t){for(;u&&!l.l;)u--,l=i.g[u];if(!l.l)return at("No independent partial segment found!"),null}n?r--:r++,a=u-1;break}}return new Ki(this,r,a,n)};function Em(e,t,n){return e=new Ge(e,e+t,function(){return n},0,null,null,e,e,e+t),new jt([e])}Ee("shaka.media.SegmentIndex",jt),jt.forSingleSegment=Em,jt.prototype.getIteratorForTime=jt.prototype.Gb,jt.prototype.updateEvery=jt.prototype.Ie,jt.prototype.fit=jt.prototype.Oc,jt.prototype.evict=jt.prototype.Oa,jt.prototype.mergeAndEvict=jt.prototype.Bd,jt.prototype.offset=jt.prototype.offset,jt.prototype.get=jt.prototype.get,jt.prototype.find=jt.prototype.find,jt.prototype.markImmutable=jt.prototype.bj,jt.prototype.release=jt.prototype.release,jt.prototype.getNumEvicted=jt.prototype.getNumEvicted,jt.prototype.getNumReferences=jt.prototype.getNumReferences;function Ki(e,t,n,r){this.i=e,this.h=t,this.g=n,this.reverse=r}f=Ki.prototype,f.ed=function(e){this.reverse=e},f.di=function(){return this.h},f.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.A&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.g.length?e.g[this.g]:e},f.next=function(){var e=this.i.get(this.h);return this.reverse?e&&0<e.g.length?(this.g--,0>this.g&&(this.h--,this.g=(e=this.i.get(this.h))&&0<e.g.length?e.g.length-1:0)):(this.h--,this.g=0):e&&0<e.g.length?(this.g++,e.A&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),e=this.current(),{value:e,done:!e}},f.dg=function(){var e=this.current();if(e.o&&!e.l&&(e=this.i.get(this.h))&&0<e.g.length)for(var t=e.g[this.g];t.l&&!(0>=this.g);)this.g--,t=e.g[this.g]},Ee("shaka.media.SegmentIterator",Ki),Ki.prototype.resetToLastIndependent=Ki.prototype.dg,Ki.prototype.next=Ki.prototype.next,Ki.prototype.current=Ki.prototype.current,Ki.prototype.currentPosition=Ki.prototype.di,Ki.prototype.setReverse=Ki.prototype.ed;function kn(){jt.call(this,[]),this.h=[]}Te(kn,jt),f=kn.prototype,f.clone=function(){var e=new kn;return e.h=this.h.slice(),e.i=this.i,e},f.release=function(){for(var e=w(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},f.Eb=function(e){for(var t=w(this.h),n=t.next();!n.done;n=t.next())n.value.Eb(e)},f.find=function(e){for(var t=this.i,n=w(this.h),r=n.next();!r.done;r=n.next()){r=r.value;var i=r.find(e);if(i!=null)return i+t;t+=r.getNumEvicted()+r.getNumReferences()}return null},f.get=function(e){for(var t=this.i,n=w(this.h),r=n.next();!r.done;r=n.next()){r=r.value;var i=r.get(e-t);if(i)return i;i=r.getNumReferences(),t+=r.getNumEvicted()+i}return null},f.offset=function(){},f.ke=function(){},f.Oa=function(e){for(var t=w(this.h),n=t.next();!n.done;n=t.next())n.value.Oa(e);for(;1<this.h.length&&this.h[0].getNumReferences()==0;)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},f.Bd=function(){},f.Oc=function(){},f.Ie=function(){},Ee("shaka.media.MetaSegmentIndex",kn),kn.prototype.updateEvery=kn.prototype.Ie,kn.prototype.fit=kn.prototype.Oc,kn.prototype.mergeAndEvict=kn.prototype.Bd,kn.prototype.evict=kn.prototype.Oa,kn.prototype.merge=kn.prototype.ke,kn.prototype.offset=kn.prototype.offset,kn.prototype.get=kn.prototype.get,kn.prototype.find=kn.prototype.find,kn.prototype.forEachTopLevelReference=kn.prototype.Eb,kn.prototype.release=kn.prototype.release;function gh(e){var t=this;this.g=e,this.j=!1,this.i=this.g.$d(),this.h=new Tt(function(){t.g.gh(.25*t.i)})}gh.prototype.release=function(){this.set(this.sc()),this.h&&(this.h.stop(),this.h=null),this.g=null},gh.prototype.set=function(e){this.i=e,Gb(this)},gh.prototype.sc=function(){return this.g.sc()};function Gb(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.$d()!=t&&e.g.mg(t);return}catch{}e.h.ua(.25),e.g.$d()!=0&&e.g.mg(0)}function Kb(e){var t=this;this.j=e,this.h=new Ce,this.g=new Set,this.i=new Tt(function(){iA(t,!1)}).sb(),e.paused||this.i.ua(.25),this.h.D(e,"playing",function(){t.i.sb().ua(.25)}),this.h.D(e,"pause",function(){t.i.stop()})}Kb.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=w(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()};function iA(e,t){var n=e.j.currentTime;e=w(e.g);for(var r=e.next();!r.done;r=e.next())r.value.j(n,t)}function Cm(e){Xt.call(this),this.g=new Map,this.h=e}Te(Cm,Xt),Cm.prototype.release=function(){this.g.clear(),Xt.prototype.release.call(this)};function wN(e,t){var n=e.g.get(t);return n||(n={Jd:[],mf:null,contentType:t},e.g.set(t,n)),n}function xN(e,t,n){var r=wN(e,t.contentType);SN(e,r),e={Wc:t,position:n},r=r.Jd,t=r.findIndex(function(i){return i.position>=n}),0<=t?r.splice(t,r[t].position==n?1:0,e):r.push(e)}Cm.prototype.j=function(e){for(var t=w(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;var r=n.mf;e:{for(var i=n.Jd,a=i.length-1;0<=a;a--){var u=i[a];if(u.position<=e){i=u.Wc;break e}}i=null}a=i&&!(r===i||r&&i&&r.bandwidth==i.bandwidth&&r.audioSamplingRate==i.audioSamplingRate&&r.codecs==i.codecs&&r.contentType==i.contentType&&r.frameRate==i.frameRate&&r.height==i.height&&r.mimeType==i.mimeType&&r.channelsCount==i.channelsCount&&r.pixelAspectRatio==i.pixelAspectRatio&&r.width==i.width),u=i&&r&&i.label&&r.label&&r.label!==i.label;var l=i&&r&&i.language&&r.language&&r.language!==i.language;r=i&&r&&i.roles&&r.roles&&!Ac(r.roles,i.roles),(u||l||r)&&aA(this,e,i.contentType)&&(n.mf=i,r=new Ae("audiotrackchange",new Map([["quality",i],["position",e]])),this.dispatchEvent(r)),a&&aA(this,e,i.contentType)&&(n.mf=i,JSON.stringify(i),n=new Ae("qualitychange",new Map([["quality",i],["position",e]])),this.dispatchEvent(n))}};function aA(e,t,n){return!!((e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function SN(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,r=e[e.length-1].end,i=t.Jd;t.Jd=i.filter(function(a,u){return!(a.position<=n&&u+1<i.length&&i[u+1].position<=n||a.position>=r)})}else t.Jd=[]}function Im(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return e.type=="video"&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),e.type=="audio"&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function mh(e){Xt.call(this),this.h=new Map,this.i=e,this.g=null}Te(mh,Xt),mh.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),Xt.prototype.release.call(this)};function Wb(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+(t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1));e.h.has(n)||(e.h.set(n,t),t=new Ae("regionadd",new Map([["region",t]])),e.dispatchEvent(t),kN(e))}function kN(e){e.g||(e.g=new Tt(function(){for(var t=e.i(),n=w(e.h),r=n.next();!r.done;r=n.next()){var i=w(r.value);r=i.next().value,i=i.next().value,i.endTime<t.start&&(e.h.delete(r),r=new Ae("regionremove",new Map([["region",i]])),e.dispatchEvent(r))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).ua(2))}function Mm(e,t,n,r){this.m=e,this.i=t,this.l=n,this.h=new Map,this.j=new Map,this.g=null,this.o=r}function TN(e,t){e.l=t,e=w(e.h.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}function vh(e,t,n){if(n=n===void 0?!1:n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Gb(t,!0,e.o)),!e.g))return Promise.resolve();for(n&&e.g.next(),t=[];e.h.size<e.m&&(n=e.g.next().value,!!n);){var r=!0;n.isPreload()&&n.wa!=null&&(r=!1),n.dc()==2&&(r=!1),n.Ib(!1)&&(r=!1),r&&n.$&&t.push(oA(e,n.$)),r&&!e.h.has(n)&&(r=new Yb(e.l),t.push(lA(r,n,e.i)),e.h.set(n,r))}return Xb(e),Promise.all(t)}function oA(e,t){if(!e.i.segmentIndex||t.Ib()||Array.from(e.j.keys()).some(function(i){return wm(i,t)}))return Promise.resolve();var n=new Yb(e.l),r=lA(n,t,e.i);return e.j.set(t,n),r}function sA(e,t){t=w(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&yh(e,n)}function Va(e){sA(e,e.h),sA(e,e.j),e.g=null}Mm.prototype.Oa=function(e,t){t=t===void 0?!1:t;for(var n=w(this.h.keys()),r=n.next();!r.done;r=n.next())r=r.value,e>r.endTime&&yh(this,r);t&&Xb(this)},Mm.prototype.ed=function(e){this.o=e,this.g&&this.g.ed(e)};function Xb(e){for(var t=Array.from(e.h.keys()),n=w(e.j.keys()),r=n.next(),i={};!r.done;i={Nf:void 0},r=n.next())i.Nf=r.value,t.some(function(a){return function(u){return wm(u.$,a.Nf)}}(i))||yh(e,i.Nf)}function uA(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var r=n.pop();r&&yh(e,r)}Xb(e)}function AN(e,t){t&&t!==e.i&&(Va(e),e.i=t)}function yh(e,t){var n=e.h;t instanceof Yr&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function Yb(e){this.g=e,this.Gd=this.pg=null}function lA(e,t,n){var r=new Uint8Array(0);return e.Gd=e.g(t,n,function(i){return P(function(a){if(a.g==1)return 0<r.byteLength?r=En(r,i):r=i,e.pg?T(a,e.pg(r),3):a.s(0);r=new Uint8Array(0),oe(a)})}),e.Gd.promise.catch(function(i){return i instanceof $&&i.code==7001?Promise.resolve():Promise.reject(i)})}Yb.prototype.abort=function(){this.Gd&&this.Gd.abort()};function _m(e){var t=di(e),n=t.split("/")[0];return e=pi(e),{type:n,mimeType:t,codecs:e,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Nd:null,colorGamut:null,frameRate:null}}function EN(e,t,n){function r(R){I=R.name;var H=R.reader;H.skip(24);var z=H.na(),Y=H.na();H.skip(50),x=String(z),y=String(Y),R.reader.ta()&&xt(R)}function i(R){var H=S4(R.reader);S=H.channelCount,k=H.sampleRate,a(R.name)}function a(R){switch(R=R.toLowerCase(),R){case"avc1":case"avc3":l.push(R+".42E01E"),g=!0;break;case"hev1":case"hvc1":l.push(R+".1.6.L93.90"),g=!0;break;case"dvh1":case"dvhe":l.push(R+".05.04"),g=!0;break;case"vp09":l.push(R+".00.10.08"),g=!0;break;case"av01":l.push(R+".0.01M.08"),g=!0;break;case"mp4a":u.push("mp4a.40.2"),p=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":u.push(R),p=!0}}var u=[],l=[],p=!1,g=!1,v=null,y=null,x=null,S=null,k=null,C=null,E=null,I;if(new Qt().box("moov",xt).box("trak",xt).box("mdia",xt).R("mdhd",function(R){v=mm(R.reader,R.version).language}).box("minf",xt).box("stbl",xt).R("stsd",Os).box("mp4a",function(R){var H=S4(R.reader);S=H.channelCount,k=H.sampleRate,R.reader.ta()?xt(R):a(R.name)}).box("esds",function(R){R=R.reader;for(var H="mp4a",z,Y;R.ta();){z=R.X();for(var K=R.X();K&128;)K=R.X();if(z==3)R.na(),K=R.X(),K&128&&R.na(),K&64&&R.skip(R.X()),K&32&&R.na();else if(z==4)Y=R.X(),R.skip(12);else if(z==5)break}Y&&(H+="."+lh(Y),z==5&&R.ta()&&(z=R.X(),Y=(z&248)>>3,Y===31&&R.ta()&&(Y=32+((z&7)<<3)+((R.X()&224)>>5)),H+="."+Y)),u.push(H),p=!0}).box("ac-3",i).box("ec-3",i).box("ac-4",i).box("Opus",i).box("fLaC",i).box("avc1",r).box("avc3",r).box("hev1",r).box("hvc1",r).box("dva1",r).box("dvav",r).box("dvh1",r).box("dvhe",r).box("vp09",r).box("av01",r).box("avcC",function(R){var H=I||"";switch(I){case"dvav":H="avc3";break;case"dva1":H="avc1"}R=R.reader,R.skip(1),R=H+"."+lh(R.X())+lh(R.X())+lh(R.X()),l.push(R),g=!0}).box("hvcC",function(R){var H=I||"";switch(I){case"dvh1":H="hvc1";break;case"dvhe":H="hev1"}var z=R.reader;z.skip(1),R=z.X();var Y=["","A","B","C"][R>>6],K=R&31,J=z.S(),ae=(R&32)>>5?"H":"L";R=[z.X(),z.X(),z.X(),z.X(),z.X(),z.X()],z=z.X();for(var ne=0,ue=0;32>ue&&(ne|=J&1,ue!=31);ue++)ne<<=1,J>>=1;for(H=H+("."+Y+K)+("."+lh(ne,!0)),H+="."+ae+z,Y="",K=R.length;K--;)((ae=R[K])||Y)&&(Y="."+ae.toString(16).toUpperCase()+Y);H+=Y,l.push(H),g=!0}).box("dvcC",function(R){var H=I||"";switch(I){case"hvc1":H="dvh1";break;case"hev1":H="dvhe";break;case"avc1":H="dva1";break;case"avc3":H="dvav";break;case"av01":H="dav1"}var z=R.reader;z.skip(2),R=z.X(),z=z.X(),l.push(H+"."+fi(R>>1&127)+"."+fi(R<<5&32|z>>3&31)),g=!0}).box("dvvC",function(R){var H=I||"";switch(I){case"hvc1":H="dvh1";break;case"hev1":H="dvhe";break;case"avc1":H="dva1";break;case"avc3":H="dvav";break;case"av01":H="dav1"}var z=R.reader;z.skip(2),R=z.X(),z=z.X(),l.push(H+"."+fi(R>>1&127)+"."+fi(R<<5&32|z>>3&31)),g=!0}).R("vpcC",function(R){var H=I||"",z=R.reader;R=z.X();var Y=z.X();z=z.X()>>4&15,l.push(H+"."+fi(R)+"."+fi(Y)+"."+fi(z)),g=!0}).box("av1C",function(R){var H=I||"";switch(I){case"dav1":H="av01"}var z=R.reader;z.skip(1),R=z.X(),z=z.X();var Y=R>>>5,K=(z&64)>>6;l.push(H+"."+Y+"."+fi(R&31)+(z>>>7?"H":"M")+"."+fi(Y===2&&K?(z&32)>>5?12:10:K?10:8)+"."+((z&16)>>4)+"."+((z&8)>>3)+((z&4)>>2)+(z&3)+"."+fi(1)+"."+fi(1)+"."+fi(1)+".0"),g=!0}).box("enca",Sb).box("encv",hi).box("sinf",xt).box("frma",function(R){R=k4(R.reader).codec,a(R)}).box("colr",function(R){l=l.map(function(Y){if(Y.startsWith("av01.")){var K=R.reader,J=K.Ba(),ae=K.Cb(4),ne=String.fromCharCode(ae[0]);if(ne+=String.fromCharCode(ae[1]),ne+=String.fromCharCode(ae[2]),ne+=String.fromCharCode(ae[3]),ne==="nclx"){ae=K.na(),ne=K.na();var ue=K.na(),se=K.X()>>7,he=Y.split(".");he.length==10&&(he[6]=fi(ae),he[7]=fi(ne),he[8]=fi(ue),he[9]=String(se),Y=he.join("."))}K.seek(J)}return Y});var H=DR(R.reader),z=H.colorGamut;C=H.Nd,E=z}).parse(e||t,!0),!u.length&&!l.length)return null;var _=p&&!g,j=new Map;if(g&&!n){n=new Ci("video/mp4"),e&&n.init(e);try{n.i(t);for(var B=w(n.j()),q=B.next();!q.done;q=B.next()){var O=q.value;j.set(O,O)}}catch{}n.g()}return{type:_?"audio":"video",mimeType:_?"audio/mp4":"video/mp4",codecs:Jb(u.concat(l)).join(", "),language:v,height:y,width:x,channelCount:S,sampleRate:k,closedCaptions:j,Nd:C,colorGamut:E,frameRate:null}}function Jb(e){var t=new Set,n=[];e=w(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;var i=Rs(r);t.has(i)||(n.push(r),t.add(i))}return t=H1("audio",n),r=H1("video",n),e=H1(wt,n),r=CN(r),t=t.concat(r).concat(e),n.length&&!t.length?n:t}function CN(e){if(1>=e.length)return e;var t=e.find(function(n){return n.startsWith("dvav.")||n.startsWith("dva1.")||n.startsWith("dvh1.")||n.startsWith("dvhe.")||n.startsWith("dav1.")||n.startsWith("dvc1.")||n.startsWith("dvi1.")});return t?ir('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}function IN(e){var t=null;return new Qt().box("moov",xt).box("trak",xt).box("mdia",xt).box("minf",xt).box("stbl",xt).R("stsd",Os).box("encv",hi).box("enca",Sb).box("sinf",xt).box("schi",xt).R("tenc",function(n){n=n.reader,n.X(),n.X(),n.X(),n.X(),t=Po(n.Cb(16))}).parse(e,!0),t}function Qb(e,t,n){var r,i,a,u,l;return P(function(p){if(p.g==1)return r=t,r.cryptoKey?p.s(2):T(p,r.fetchKey(),3);if(i=r.iv,!i)for(i=Ye(new ArrayBuffer(16)),a=r.firstMediaSequenceNumber+n,u=i.byteLength-1;0<=u;u--)i[u]=a&255,a>>=8;return t.blockCipherMode=="CBC"?l={name:"AES-CBC",iv:i}:l={name:"AES-CTR",counter:i,length:64},p.return(d.crypto.subtle.decrypt(l,r.cryptoKey,e))})}function bh(e,t,n,r,i){return e=qn(e,r,i),(t!=0||n!=null)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function cA(e,t){var n=this;this.g=t,this.j=e,this.h=null,this.K=new Map,this.C=1,this.u=this.l=null,this.O=0,this.i=new Map,this.I=!1,this.P=null,this.B=!1,this.m=new Uc(function(){return MN(n)}),this.L=Date.now()/1e3,this.o=new Map,this.M={projection:null,hfov:null},this.W=0,this.T=1/0,this.F=null,this.A=new Tt(function(){if(n.j&&n.g)if(n.j.presentationTimeline.U()){var r=n.j.presentationTimeline.Hb(),i=n.j.presentationTimeline.ob();1<i-r?cN(n.g.aa,r,i):Vb(n.g.aa)}else Vb(n.g.aa),n.A&&n.A.stop()}),this.G=null,this.H=new Tt(function(){var r=n.g.video;!r.ended&&n.G&&(r.currentTime=n.G,n.G=null)})}f=cA.prototype,f.destroy=function(){return this.m.destroy()};function MN(e){var t,n,r,i,a,u,l;return P(function(p){if(p.g==1){for(t=[],n=w(e.i.values()),r=n.next();!r.done;r=n.next())i=r.value,Jc(i),t.push(xh(i)),i.ba&&(Va(i.ba),i.ba=null);for(a=w(e.o.values()),u=a.next();!u.done;u=a.next())l=u.value,Va(l);return T(p,Promise.all(t),2)}e.i.clear(),e.o.clear(),e.g=null,e.j=null,e.h=null,e.A&&e.A.stop(),e.A=null,e.H&&e.H.stop(),e.H=null,e.G=null,oe(p)})}f.configure=function(e){if(this.h=e,this.P=new z5({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0),e.disableAudioPrefetch){var t=this.i.get("audio");t&&t.ba&&(Va(t.ba),t.ba=null),t=w(this.o.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,Va(this.o.get(n)),this.o.delete(n)}for(e.disableTextPrefetch&&(t=this.i.get(wt))&&t.ba&&(Va(t.ba),t.ba=null),e.disableVideoPrefetch&&(t=this.i.get("video"))&&t.ba&&(Va(t.ba),t.ba=null),t=w(this.i.keys()),n=t.next();!n.done;n=t.next())n=this.i.get(n.value),n.ba?(uA(n.ba,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(Va(n.ba),n.ba=null)):0<e.segmentPrefetchLimit&&(n.ba=e2(this,n.stream));e.disableAudioPrefetch||ON(this)};function _N(e,t,n){e.j.presentationTimeline.U()||(e.W=t,e.T=n)}f.start=function(e){var t=this;return P(function(n){if(n.g==1)return T(n,NN(t,e||new Map),2);nn(t.m),t.I=!0,oe(n)})};function DN(e,t){var n,r,i,a,u,l;P(function(p){switch(p.g){case 1:return n=zn,e.O++,r=e.O,ve(p,2),T(p,V4(e.g.aa,n.za),4);case 4:V(p,3);break;case 2:i=W(p),e.g&&e.g.onError(i);case 3:a=Dn(t.mimeType,t.codecs),km(e.g.aa,a,e.j.sequenceMode,t.external),u=e.g.aa.ea,(u.isTextVisible()||e.h.alwaysStreamText)&&e.O==r&&(l=Lm(e,t),e.i.set(n.za,l),jr(e,l,0)),oe(p)}})}function PN(e){var t=e.i.get(wt);t&&(Jc(t),xh(t).catch(function(){}),e.F=e.i.get(wt),e.i.delete(wt)),e.u=null}function Zb(e,t){for(var n=0>e.g.gb(),r=w(e.i.values()),i=r.next();!i.done;i=r.next())i=i.value,i.ja&&i.ja.ed(n),i.ba&&i.ba.ed(n);for(r=w(e.o.values()),i=r.next();!i.done;i=r.next())i.value.ed(n);(n=e.i.get("video"))&&(r=n.stream)&&(t?(t=r.trickModeVideo)&&!n.fc&&(Yc(e,t,!1,0,!1),n.fc=r):(t=n.fc)&&(n.fc=null,Yc(e,t,!0,0,!1)))}function dA(e,t,n,r,i,a){n=n===void 0?!1:n,r=r===void 0?0:r,i=i===void 0?!1:i,a=a===void 0?!1:a,e.l=t,e.I&&(t.video&&Yc(e,t.video,n,r,i,a),t.audio&&Yc(e,t.audio,n,r,i,a))}function Dm(e,t){P(function(n){if(n.g==1)return e.F=null,e.u=t,e.I?t.segmentIndex?n.s(2):T(n,t.createSegmentIndex(),2):n.return();Yc(e,t,!0,0,!1),oe(n)})}function LN(e,t){for(var n=w(e.K.entries()),r=n.next();!r.done;r=n.next()){var i=w(r.value);r=i.next().value,i=i.next().value,r.includes(t.type)&&(i(),e.K.delete(r))}}function Yc(e,t,n,r,i,a){var u=e.i.get(t.type);u||t.type!=wt?u&&(u.fc&&(t.trickModeVideo?(u.fc=t,t=t.trickModeVideo):u.fc=null),u.stream!=t||i)&&(e.o.has(t)?u.ba=e.o.get(t):u.ba&&AN(u.ba,t),t.type==wt&&(i=Dn(t.mimeType,t.codecs),km(e.g.aa,i,e.j.sequenceMode,t.external)),!e.o.has(u.stream)&&u.stream.closeSegmentIndex&&(u.Da?(i="("+u.type+":"+u.stream.id+")",e.K.has(i)||e.K.set(i,u.stream.closeSegmentIndex)):u.stream.closeSegmentIndex()),i=u.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,u.stream=t,u.ja=null,u.bf=!!a,t.dependencyStream?u.nd=Lm(e,t.dependencyStream):u.nd=null,i?Nm(e,!0,!1):(n?u.nc?u.Re=!0:u.Da?(u.lc=!0,u.Vd=r,u.Re=!0):(Jc(u),i2(e,u,!0,r).catch(function(l){e.g&&e.g.onError(l)})):u.Da||u.kb||jr(e,u,0),RN(e,u).catch(function(l){e.g&&e.g.onError(l)}))):DN(e,t)}function RN(e,t){var n,r;return P(function(i){if(i.g==1)return t.rb?(n=t.stream,r=t.rb,n.segmentIndex?i.s(2):T(i,n.createSegmentIndex(),2)):i.return();if(t.rb!=r||t.stream!=n)return i.return();var a=e.g.Rc(),u=il(e.g.aa,t.type),l=t.stream.segmentIndex.find(t.xa?t.xa.endTime:a),p=l==null?null:t.stream.segmentIndex.get(l);l=p&&p.wa?p.wa-p.Sa:null,p&&!l&&(l=(p.endTime-p.getStartTime())*(t.stream.bandwidth||0)/8),l?((p=p.$)&&(l+=(p.wa?p.wa-p.Sa:null)||0),p=e.g.getBandwidthEstimate(),a=8*l/p<(u||0)-a-e.h.rebufferingGoal||t.rb.h.g>l):a=!1,a&&t.rb.abort(),oe(i)})}f.Fc=function(){if(this.g){for(var e=this.g.Rc(),t=w(this.i.keys()),n=t.next();!n.done;n=t.next()){var r=n.value;n=this.i.get(r);var i=this.g.aa;if(r==wt?(i=i.h,i=i.g==null||i.h==null?!1:e>=i.g&&e<i.h):(i=Gc(i,r),i=Pb(i,e)),!i){if(this.L=0,n.ba&&(n.ba.g=null),n.type==="audio"){i=w(this.o.values());for(var a=i.next();!a.done;a=i.next())a.value.g=null}n.ja=null,(il(this.g.aa,r)!=null||n.Da)&&Pm(this,n),n.rb&&(n.rb.abort(),n.rb=null),r===wt&&(r=this.g.aa,r.L&&r.L.g()),n.Fc=!0}}this.h.crossBoundaryStrategy!=="keep"&&o2(this)}};function Pm(e,t){t.nc||t.lc||(t.Da?(t.lc=!0,t.Vd=0):Bb(e.g.aa,t.type)==null?t.kb==null&&jr(e,t,0):(Jc(t),i2(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function NN(e,t){var n,r,i,a,u,l,p,g,v,y;return P(function(x){if(x.g==1){if(n=zn,!e.l)throw new $(2,5,5006);return r=new Map,i=new Set,e.l.audio&&(r.set(n.V,e.l.audio),i.add(e.l.audio)),e.l.video&&(r.set(n.la,e.l.video),i.add(e.l.video)),e.u&&(r.set(n.za,e.u),i.add(e.u)),a=e.g.aa,T(x,a.init(r,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(nn(e.m),e.updateDuration(),u=w(r.keys()),l=u.next();!l.done;l=u.next())p=l.value,g=r.get(p),e.i.has(p)||(v=Lm(e,g),t.has(g.id)&&(y=t.get(g.id),TN(y,function(S,k,C){return Rm(S,k,C||null,e.h.retryParameters,e.g.Xb)}),v.ba=y),e.i.set(p,v),jr(e,v,0));oe(x)})}function Lm(e,t){var n={stream:t,type:t.type,ja:null,ba:e2(e,t),xa:null,yb:null,he:null,Ac:null,zc:null,fe:null,ge:null,fc:null,endOfStream:!1,Da:!1,kb:null,lc:!1,Vd:0,Re:!1,nc:!1,Fc:!0,bf:!1,bg:!1,sd:!1,rb:null,nd:null};return t.dependencyStream&&(n.nd=Lm(e,t.dependencyStream)),n}function e2(e,t){if(t.type==="video"&&e.h.disableVideoPrefetch||t.type==="audio"&&e.h.disableAudioPrefetch||t.type===wt&&(t.mimeType=="application/cea-608"||t.mimeType=="application/cea-708")||t.type===wt&&e.h.disableTextPrefetch)return null;if(e.o.has(t))return e.o.get(t);var n=e.i.get(t.type);return(n=n&&n.ba)&&t===n.i?n:0<e.h.segmentPrefetchLimit?new Mm(e.h.segmentPrefetchLimit,t,function(r,i,a){return Rm(r,i,a||null,e.h.retryParameters,e.g.Xb)},0>e.g.gb()):null}function ON(e){for(var t=e.h.segmentPrefetchLimit,n=e.h.prefetchAudioLanguages,r=w(e.j.variants),i=r.next(),a={};!i.done;a={wb:void 0},i=r.next())if(a.wb=i.value,a.wb.audio)if(e.o.has(a.wb.audio)){if(i=e.o.get(a.wb.audio),uA(i,t),!(0<t&&n.some(function(l){return function(p){return Lc(l.wb.audio.language,p)}}(a)))){var u=e.i.get(a.wb.audio.type);i!==(u&&u.ba)&&Va(i),e.o.delete(a.wb.audio)}}else 0>=t||!n.some(function(l){return function(p){return Lc(l.wb.audio.language,p)}}(a))||!(i=e2(e,a.wb.audio))||(a.wb.audio.segmentIndex||a.wb.audio.createSegmentIndex(),e.o.set(a.wb.audio,i))}f.updateDuration=function(){var e=s5(),t=this.j.presentationTimeline.getDuration();1/0>t?(e&&(this.A&&this.A.stop(),Vb(this.g.aa)),this.g.aa.bb(t)):e?(this.A&&this.A.ua(.5),this.g.aa.bb(1/0)):this.g.aa.bb(Math.pow(2,32))};function UN(e,t){var n,r,i,a,u,l;return P(function(p){switch(p.g){case 1:if(nn(e.m),t.Da||t.kb==null||t.nc)return p.return();if(t.kb=null,!t.lc){p.s(2);break}return T(p,i2(e,t,t.Re,t.Vd),3);case 3:return p.return();case 2:if(LN(e,t),t.stream.segmentIndex){p.s(4);break}return n=t.stream,ve(p,5),T(p,t.stream.createSegmentIndex(),7);case 7:V(p,6);break;case 5:return r=W(p),T(p,a2(e,t,r),8);case 8:return p.return();case 6:if(n!=t.stream)return n.closeSegmentIndex&&n.closeSegmentIndex(),t.Da||t.kb||jr(e,t,0),p.return();case 4:ve(p,9),i=FN(e,t),i!=null&&(jr(e,t,i),t.sd=!1),V(p,10);break;case 9:return a=W(p),T(p,a2(e,t,a),11);case 11:return p.return();case 10:if(u=Array.from(e.i.values()),!e.I||!u.every(function(g){return g.endOfStream})){p.s(0);break}return T(p,e.g.aa.endOfStream(),13);case 13:nn(e.m),l=e.g.aa.getDuration(),l!=0&&l<e.j.presentationTimeline.getDuration()&&e.j.presentationTimeline.bb(l),oe(p)}})}function FN(e,t){if(r2(t))return oN(e.g.aa,t.stream.originalId||""),null;if(t.type==wt&&sN(e.g.aa),t.stream.isAudioMuxedInVideo)return null;var n=e.h.updateIntervalSeconds/Math.max(1,Math.abs(e.g.gb()));if(!B4(e.g.aa)&&t.type!=wt)return n/2;var r=e.g.Rc();if(t.type==="audio")for(var i=w(e.o.keys()),a=i.next();!a.done;a=i.next())a=e.o.get(a.value),a.Oa(r,!0),vh(a,r);i=t.xa?t.xa.endTime:r;var u=iN(e.g.aa,t.type,r),l=Math.max(1,Math.max(e.h.rebufferingGoal,e.h.bufferingGoal)*e.C),p=e.j.presentationTimeline.getDuration()-i;if(a=il(e.g.aa,t.type),1e-6>p&&a)return t.endOfStream=!0,t.type=="video"&&(e=e.i.get(wt))&&r2(e)&&(e.endOfStream=!0),null;if(t.endOfStream=!1,u>=l)return n/2;if(l=!t.ja,a=jN(e,t,r,a),!a)return n;u=!1,l&&t.bf&&(u=!0,t.bf=!1),l=1/0,p=Array.from(e.i.values()),p=w(p);for(var g=p.next();!g.done;g=p.next())g=g.value,r2(g)||g.ja&&!g.ja.current()||(l=Math.min(l,g.xa?g.xa.endTime:r));return i>=l+e.j.presentationTimeline.h?n:(e.h.crossBoundaryStrategy!=="keep"&&GN(e,t,a)||(t.ba&&t.ja&&!e.o.has(t.stream)&&(t.ba.Oa(a.startTime),vh(t.ba,a.startTime).catch(function(){})),BN(e,t,r,a,u).catch(function(){}),t.nd&&VN(e,t.nd,r)),null)}function jN(e,t,n,r){if(t.ja)return(n=t.ja.current())&&t.xa&&.001>Math.abs(t.xa.startTime-n.startTime)&&(n=t.ja.next().value),n;if(t.xa||r)return n=t.xa?t.xa.endTime:r,e=0>e.g.gb(),t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(n,!1,e)),t.ja&&t.ja.next().value;r=e.j.sequenceMode?0:e.h.inaccurateManifestTolerance;var i=Math.max(n-r,0);e=0>e.g.gb();var a=null;return r&&(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(i,!1,e)),a=t.ja&&t.ja.next().value),a||(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(n,!1,e)),a=t.ja&&t.ja.next().value),a}function BN(e,t,n,r,i){var a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q;return P(function(O){switch(O.g){case 1:if(a=zn,u=t.stream,l=t.ja,t.Da=!0,ve(O,2),r.dc()==2)throw new $(1,1,1011);return T(O,HN(e,t,r,i),4);case 4:return nn(e.m),e.B?O.return():(p=u.mimeType=="video/mp4"||u.mimeType=="audio/mp4",g=d.ReadableStream,e.h.lowLatencyMode&&e.j.isLowLatency&&g&&p&&(e.j.type!="HLS"||r.m)?(x=new Uint8Array(0),k=S=!1,E=function(R){var H,z,Y;return P(function(K){switch(K.g){case 1:if(S||(k=!0,nn(e.m),e.B))return K.return();if(ve(K,2),x=$N(x,R),H=!1,z=0,new Qt().box("mdat",function(J){z=J.size+J.start,H=!0}).parse(x,!1,!0),!H){K.s(4);break}return Y=x.subarray(0,z),x=x.subarray(z),T(K,t2(e,t,n,u,r,Y,!0,i),5);case 5:t.ba&&t.ja&&vh(t.ba,r.startTime,!0);case 4:V(K,0);break;case 2:C=W(K),oe(K)}})},T(O,wh(e,t,r,E),9)):(v=wh(e,t,r),T(O,v,7)));case 7:return y=O.h,nn(e.m),e.B?O.return():(nn(e.m),t.lc?(t.Da=!1,jr(e,t,0),O.return()):T(O,t2(e,t,n,u,r,y,!1,i),6));case 9:if(I=O.h,C)throw C;if(k){O.s(10);break}return S=!0,nn(e.m),e.B?O.return():t.lc?(t.Da=!1,jr(e,t,0),O.return()):T(O,t2(e,t,n,u,r,I,!1,i),10);case 10:t.ba&&t.ja&&vh(t.ba,r.startTime,!0);case 6:if(nn(e.m),e.B)return O.return();t.xa=r,l.next(),t.Da=!1,t.bg=!1,_=e.g.aa.Fb(),j=_[t.type],JSON.stringify(j),t.lc||(B=null,t.type===a.la?B=e.i.get(a.V):t.type===a.V&&(B=e.i.get(a.la)),B&&B.type==a.V?e.g.qe(r,t.stream,B.stream.isAudioMuxedInVideo):e.g.qe(r,t.stream,t.stream.codecs.includes(","))),jr(e,t,0),V(O,0);break;case 2:if(q=W(O),nn(e.m,q),e.B)return O.return();if(t.Da=!1,q.code==7001)t.Da=!1,Jc(t),jr(e,t,0),O.s(0);else if(t.type==a.za&&e.h.ignoreTextStreamFailures)e.i.delete(a.za),O.s(0);else return q.code==3017?T(O,zN(e,t,q),0):(t.sd=!0,q.category==1&&t.ba&&yh(t.ba,r),q.severity=2,T(O,a2(e,t,q),0))}})}function VN(e,t,n){var r,i,a,u,l,p,g,v;P(function(y){switch(y.g){case 1:if(r=t.stream,a=(i=r.segmentIndex.Gb(n))&&i.next().value,!a){y.s(0);break}if(u=a.$,!u||wm(u,t.yb)){y.s(3);break}return t.yb=u,ve(y,4),T(y,wh(e,t,u),6);case 6:l=y.h;var x=e.g.aa;x.I&&q1(x.I,l,0,r),V(y,3);break;case 4:throw p=W(y),t.yb=null,p;case 3:if(t.xa&&t.xa==a){y.s(0);break}return t.xa=a,ve(y,8),T(y,wh(e,t,a),10);case 10:g=y.h,x=e.g.aa,x.I&&q1(x.I,g,0,r),V(y,0);break;case 8:throw v=W(y),t.xa=null,v}})}function $N(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function zN(e,t,n){var r,i,a,u;return P(function(l){if(l.g==1){if(r=Array.from(e.i.values()),r.some(function(p){return p!=t&&p.bg}))return l.s(2);if(i=e.h.maxDisabledTime===0&&n.code==1011?1:e.h.maxDisabledTime,e.g.disableStream(t.stream,i))return l.return();if(e.h.avoidEvictionOnQuotaExceededError)return jr(e,t,4),l.return();if(a=Math.round(100*e.C),20<a)e.C-=.2;else if(4<a)e.C-=.04;else return t.sd=!0,e.B=!0,e.g.onError(n),l.return();return t.bg=!0,u=e.g.Rc(),T(l,n2(e,t,u),2)}jr(e,t,4),oe(l)})}function HN(e,t,n,r){var i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j;return P(function(B){switch(B.g){case 1:if(i=zn,a=t.xa==null,u=[],l=Math.max(0,Math.max(n.appendWindowStart,e.W)-.1),p=Math.min(n.appendWindowEnd,e.T)+.01,g=n.codecs||t.stream.codecs,v=Rs(g),y=di(n.mimeType||t.stream.mimeType),x=n.timestampOffset,x==t.he&&l==t.Ac&&p==t.zc&&v==t.fe&&y==t.ge){B.s(2);break}if(S=t.fe&&t.ge&&gN(e.g.aa,t.type,y,g),!S){B.s(3);break}if(k=null,t.type===i.la?k=e.i.get(i.V):t.type===i.V&&(k=e.i.get(i.la)),!k){B.s(3);break}return T(B,xh(k).catch(function(){}),5);case 5:k.yb=null,k.Ac=null,k.zc=null,Pm(e,k);case 3:return T(B,pA(e,t,x,l,p,n,v,y),2);case 2:return wm(n.$,t.yb)||(t.yb=n.$,n.l&&n.$&&(C=wh(e,t,n.$),E=function(){var q,O,R,H,z,Y,K;return P(function(J){switch(J.g){case 1:return ve(J,2),T(J,C,4);case 4:return q=J.h,nn(e.m),O=null,R=new Map,H={projection:null,hfov:null},z=new Qt,z.box("moov",xt).box("trak",xt).box("mdia",xt).R("mdhd",function(ae){O=mm(ae.reader,ae.version).timescale}).box("hdlr",function(ae){switch(ae=ae.reader,ae.skip(8),ae.Cc()){case"soun":R.set(i.V,O);break;case"vide":R.set(i.la,O)}O=null}).box("minf",xt).box("stbl",xt).R("stsd",Os).box("encv",hi).box("avc1",hi).box("avc3",hi).box("hev1",hi).box("hvc1",hi).box("dvav",hi).box("dva1",hi).box("dvh1",hi).box("dvhe",hi).box("dvc1",hi).box("dvi1",hi).box("vexu",xt).box("proj",xt).R("prji",function(ae){ae=ae.reader.Cc(),H.projection=ae}).box("hfov",function(ae){ae=ae.reader.S()/1e3,H.hfov=ae}).parse(q),t.type===i.la&&qN(e,H),R.has(t.type)?n.$.timescale=R.get(t.type):O!=null&&(n.$.timescale=O),Y=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,T(J,e.g.Fg(t.type,q),5);case 5:return T(J,Tm(e.g.aa,t.type,q,null,t.stream,Y,t.Fc,r),6);case 6:V(J,0);break;case 2:throw K=W(J),t.yb=null,K}})},I=n.startTime,a&&(_=il(e.g.aa,t.type),_!=null&&(I=_)),e.g.fj(I,n.$),u.push(E()))),j=t.xa?t.xa.i:null,n.i!=j&&u.push(lN(e.g.aa,t.type,n.startTime)),T(B,Promise.all(u),0)}})}function pA(e,t,n,r,i,a,u,l){var p,g,v,y;return P(function(x){if(x.g==1)return p=zn,g=new Map,e.l.audio&&g.set(p.V,e.l.audio),e.l.video&&g.set(p.la,e.l.video),ve(x,2),t.Ac=r,t.zc=i,u&&(t.fe=u),l&&(t.ge=l),t.he=n,v=e.j.sequenceMode||e.j.type=="HLS",T(x,uN(e.g.aa,t.type,n,r,i,v,a.mimeType||t.stream.mimeType,a.codecs||t.stream.codecs,g),4);if(x.g!=2)return V(x,0);throw y=W(x),t.Ac=null,t.zc=null,t.fe=null,t.ge=null,t.he=null,y})}function t2(e,t,n,r,i,a,u,l){u=u===void 0?!1:u,l=l===void 0?!1:l;var p,g,v,y,x,S;return P(function(k){switch(k.g){case 1:return p=r.closedCaptions&&0<r.closedCaptions.size,e.h.shouldFixTimestampOffset&&(v=r.mimeType=="video/mp4"||r.mimeType=="audio/mp4",y=null,i.$&&(y=i.$.timescale),(x=v&&y&&r.type==="video"&&e.j.type=="DASH")&&(g=new Qt),x&&g.box("moof",xt).box("traf",xt).R("tfdt",function(C){var E,I,_,j,B,q;return P(function(O){return E=gm(C.reader,C.version),I=E.baseMediaDecodeTime,I?(_=-I/y,j=Number(t.he)||0,j<_?(B=t.Ac,q=t.zc,T(O,pA(e,t,_,B,q,i),0)):O.s(0)):O.return()})}),x&&g.parse(a,!1,u)),T(k,n2(e,t,n),2);case 2:return nn(e.m),S=t.Fc,t.Fc=!1,T(k,e.g.Fg(t.type,a),3);case 3:return T(k,Tm(e.g.aa,t.type,a,i,r,p,S,l,u),4);case 4:nn(e.m),oe(k)}})}function n2(e,t,n){var r,i,a,u,l,p,g,v;return P(function(y){if(y.g==1)return r=t.stream.segmentIndex,r instanceof kn&&r.Oa(e.j.presentationTimeline.pb()),i=Math.max(e.h.bufferBehind*e.C,e.j.presentationTimeline.h),a=Bb(e.g.aa,t.type),a==null?(e.F==t&&(e.F=null),y.return()):(u=n-a,l=e.h.evictionGoal,p=e.j.presentationTimeline.Hb(),g=e.j.presentationTimeline.ob(),v=u-i,g-p>l&&(v=Math.max(u-i,p-l-a)),v<=l?y.return():T(y,e.g.aa.remove(t.type,a,a+v),2));if(y.g!=4)return nn(e.m),e.F?T(y,n2(e,e.F,n),4):y.s(0);nn(e.m),oe(y)})}function r2(e){return e&&e.type==wt&&(e.stream.mimeType=="application/cea-608"||e.stream.mimeType=="application/cea-708")}function wh(e,t,n,r){var i,a,u,l,p;return P(function(g){switch(g.g){case 1:if(i=n.Ib())return g.return(i);if(a=null,t.ba){var v=t.ba,y=v.h;n instanceof Yr&&(y=v.j),y.has(n)?(v=y.get(n),r&&(v.pg=r),a=v.Gd):a=null}return a||(a=Rm(n,t.stream,r||null,e.h.retryParameters,e.g.Xb)),u=0,t.ja&&(u=t.ja.h),t.rb=a,T(g,a.promise,2);case 2:if(l=g.h,t.rb=null,p=l.data,!n.aesKey){g.s(3);break}return T(g,Qb(p,n.aesKey,u),4);case 4:p=g.h;case 3:return g.return(p)}})}function Rm(e,t,n,r,i,a){a=a===void 0?!1:a;var u=e instanceof Ge?e:void 0,l=u?1:0;return e=bh(e.N(),e.Sa,e.wa,r,n),e.contentType=t.type,i.request(fa,e,{type:l,stream:t,segment:u,isPreload:a})}function i2(e,t,n,r){var i,a;return P(function(u){if(u.g==1)return t.lc=!1,t.Re=!1,t.Vd=0,t.nc=!0,t.xa=null,t.ja=null,t.ba&&!e.o.has(t.stream)&&Va(t.ba),r?(i=e.g.Rc(),a=e.g.aa.getDuration(),T(u,e.g.aa.remove(t.type,i+r,a),3)):T(u,V4(e.g.aa,t.type),4);if(u.g!=3)return nn(e.m),n?T(u,e.g.aa.flush(t.type),3):u.s(3);nn(e.m),t.nc=!1,t.endOfStream=!1,t.Da||t.kb||jr(e,t,0),oe(u)})}function jr(e,t,n){var r=t.type;(r!=wt||e.i.has(r))&&(t.kb=new Fp(function(){var i;return P(function(a){if(a.g==1)return ve(a,2),T(a,UN(e,t),4);if(a.g!=2)return V(a,0);i=W(a),e.g&&e.g.onError(i),oe(a)})}).da(n))}function Jc(e){e.kb!=null&&(e.kb.stop(),e.kb=null)}function xh(e){return P(function(t){return e.rb?T(t,e.rb.abort(),0):t.s(0)})}function a2(e,t,n){var r;return P(function(i){if(i.g==1)return n.code==3024?(t.Da=!1,Jc(t),jr(e,t,0),i.return()):T(i,H5(e.P),2);if(nn(e.m),n.category===1&&n.code!=1003){if(t.fc)return Zb(e,!1),i.return();r=e.h.maxDisabledTime===0&&n.code==1011?1:e.h.maxDisabledTime,n.handled=e.g.disableStream(t.stream,r),n.handled&&(n.severity=1)}(!n.handled||n.code!=1011)&&e.g.onError(n),n.handled||e.h.failureCallback(n),oe(i)})}function Nm(e,t,n){t=t===void 0?!1:t,n=n===void 0?!0:n;var r,i,a,u,l,p;return P(function(g){if(g.g==1){if(r=Date.now()/1e3,i=e.h.minTimeBetweenRecoveries,!t){if(!e.h.allowMediaSourceRecoveries||r-e.L<i)return g.return(!1);e.L=r}return a=zn,(u=e.i.get(a.V))&&(u.yb=null,u.Ac=null,u.zc=null,n&&Pm(e,u),xh(u).catch(function(){}),u.ja&&u.ja.dg()),(l=e.i.get(a.la))&&(l.yb=null,l.Ac=null,l.zc=null,n&&Pm(e,l),xh(l).catch(function(){}),l.ja&&l.ja.dg()),p=new Map,e.l.audio&&p.set(a.V,e.l.audio),e.l.video&&p.set(a.la,e.l.video),T(g,z4(e.g.aa,p),2)}return!l||l.nc||l.Da||l.kb||jr(e,l,0),!u||u.nc||u.Da||u.kb||jr(e,u,0),g.return(!0)})}function qN(e,t){if(e.M.projection!=t.projection||e.M.hfov!=t.hfov){if(t.projection!=null||t.hfov!=null){var n=new Map().set("detail",t);n=new Ae("spatialvideoinfo",n)}else n=new Ae("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.M=t}}function o2(e){if(e.h.crossBoundaryStrategy!=="keep"){e.H.stop();var t=e.g.Rc(),n=e.i.get("video")||e.i.get("audio");n&&(n=n.yb)&&n.g!==null&&(t=n.g-t,0>t||1<t||(e.G=n.g+.01,e.H.da(t)))}}function GN(e,t,n){if(t.type===wt)return!1;var r=t.yb;if(!r)return!1;n=n.$;var i=r.g!==n.g;if(e.h.crossBoundaryStrategy==="reset_to_encrypted"&&(r.encrypted||n.encrypted||(i=!1),r.encrypted&&(e.h.crossBoundaryStrategy="keep")),e.h.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&r.encrypted==n.encrypted&&(i=!1),i&&t.Fc){var a=e.g.video,u=a.paused;Nm(e,!0).then(function(){e.g.onEvent(new Ae("boundarycrossed")),u||a.play()})}return i}function Om(){}function s2(e,t,n,r,i){var a=i in r,u=a?n.constructor==Object&&Object.keys(r).length==0:n.constructor==Object&&Object.keys(n).length==0,l=a||u,p=!0,g;for(g in t){var v=i+"."+g,y=a?r[i]:n[g];l||g in n?t[g]===void 0?y===void 0||l?delete e[g]:e[g]=Ua(y):u?e[g]=t[g]:y.constructor==Object&&t[g]&&t[g].constructor==Object?(e[g]||(e[g]=Ua(y)),v=s2(e[g],t[g],y,r,v),p=p&&v):typeof t[g]!=typeof y||t[g]==null||typeof t[g]!="function"&&t[g].constructor!=y.constructor?(at("Invalid config, wrong type for "+v),p=!1):(typeof n[g]=="function"&&n[g].length!=t[g].length&&Be("Unexpected number of arguments for "+v),e[g]=t[g]):(at("Invalid config, unrecognized key "+v),p=!1)}return p}function Um(e,t){for(var n={},r=n,i=0,a=0;i=e.indexOf(".",i),!(0>i);)(i==0||e[i-1]!="\\")&&(a=e.substring(a,i).replace(/\\\./g,"."),r[a]={},r=r[a],a=i+1),i+=1;return r[e.substring(a).replace(/\\\./g,".")]=t,n}function Qc(e,t){return e&&t}function hA(e,t){function n(a){for(var u=w(Object.keys(a)),l=u.next();!l.done;l=u.next())if(l=l.value,!(a[l]instanceof HTMLElement))if(i(a[l])&&Object.keys(a[l]).length===0)delete a[l];else{var p=a[l];Array.isArray(p)&&p.length===0||typeof a[l]=="function"?delete a[l]:i(a[l])&&(n(a[l]),Object.keys(a[l]).length===0&&delete a[l])}}function r(a,u){return Object.keys(a).reduce(function(l,p){var g=a[p];return u.hasOwnProperty(p)?g instanceof HTMLElement&&u[p]instanceof HTMLElement?g.isEqualNode(u[p])||(l[p]=g):i(g)&&i(u[p])?(g=r(g,u[p]),(0<Object.keys(g).length||!i(g))&&(l[p]=g)):Array.isArray(g)&&Array.isArray(u[p])?Y1(g,u[p])||(l[p]=g):Number.isNaN(g)&&Number.isNaN(u[p])||g!==u[p]&&(l[p]=g):l[p]=g,l},{})}function i(a){return a&&typeof a=="object"&&!Array.isArray(a)}return e=r(e,t),n(e),e}Ee("shaka.util.ConfigUtils",Om),Om.getDifferenceFromConfigObjects=hA,Om.convertToConfigObject=Um,Om.mergeConfigObjects=s2;function Qr(){}function fA(e){return e=eo(e),new ee(e).nb}function Sh(e,t,n){function r(l){pn(a).setUint32(u,l.byteLength,!0),u+=4,a.set(Ye(l),u),u+=l.byteLength}if(!n||!n.byteLength)throw new $(2,6,6015);var i;typeof t=="string"?i=$1(t,!0):i=t,e=eo(e),e=$1(e,!0);var a=new Uint8Array(12+e.byteLength+i.byteLength+n.byteLength),u=0;return r(e),r(i),r(n),a}function u2(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=eo(e).split("skd://").pop(),Sh(e,n,t))}function Fm(e,t){e===2&&(e=t.drmInfo)&&$g(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}Ee("shaka.drm.FairPlay",Qr),Qr.commonFairPlayResponse=function(e,t){if(e===2&&(e=t.originalRequest.drmInfo)&&$g(e.keySystem)){try{var n=yn(t.data)}catch{return}if(e=!1,n=n.trim(),n.substr(0,5)==="<ckc>"&&n.substr(-6)==="</ckc>"&&(n=n.slice(5,-6),e=!0),!e)try{var r=JSON.parse(n);r.ckc&&(n=r.ckc,e=!0),r.CkcMessage&&(n=r.CkcMessage,e=!0),r.License&&(n=r.License,e=!0)}catch{}e&&(t.data=li(Gi(n)))}},Qr.muxFairPlayRequest=function(e,t){Fm(e,t)},Qr.expressplayFairPlayRequest=function(e,t){if(e===2){var n=t.drmInfo;n&&$g(n.keySystem)&&Fm(e,t)}},Qr.conaxFairPlayRequest=function(e,t){Fm(e,t)},Qr.ezdrmFairPlayRequest=function(e,t){Fm(e,t)},Qr.verimatrixFairPlayRequest=function(e,t){e===2&&(e=t.drmInfo)&&$g(e.keySystem)&&(e=Ye(t.body),e=Do(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=ca("spc="+e))},Qr.muxInitDataTransform=function(e,t,n){return u2(e,t,n)},Qr.expressplayInitDataTransform=function(e,t,n){return u2(e,t,n)},Qr.conaxInitDataTransform=function(e,t,n){if(t!=="skd")return e;t=n.serverCertificate,n=eo(e).split("skd://").pop().split("?").shift(),n=d.atob(n);var r=new ArrayBuffer(2*n.length);r=bc(r);for(var i=0,a=n.length;i<a;i++)r[i]=n.charCodeAt(i);return Sh(e,r,t)},Qr.ezdrmInitDataTransform=function(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=eo(e).split(";").pop(),Sh(e,n,t))},Qr.verimatrixInitDataTransform=function(e,t,n){return u2(e,t,n)},Qr.initDataTransform=Sh,Qr.defaultGetContentId=fA,Qr.isFairPlaySupported=function(){var e;return P(function(t){return t.g==1?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ve(t,2),T(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):t.g!=2?t.return(!0):(W(t),t.return(!1))})};function l2(){this.g=null}l2.prototype.configure=function(e){this.g=e},l2.prototype.create=function(e){var t;if(this.g.language){var n=KN(e,this.g.language);n.length&&(t=n)}return t||(t=e.filter(function(r){return r.primary}),t=t.length?t:e),e=WN(t,this.g.role),e.length&&(t=e),this.g.videoLayout&&(e=ZN(t,this.g.videoLayout),e.length&&(t=e)),this.g.Sc&&(e=QN(t,this.g.Sc),e.length&&(t=e)),this.g.channelCount&&(e=JN(t,this.g.channelCount),e.length&&(t=e)),this.g.Kc&&(e=XN(t,this.g.Kc),e.length&&(t=e)),this.g.fd&&(e=YN(t,this.g.fd),e.length&&(t=e)),e=e9(t,this.g.spatialAudio),e.length&&(t=e),this.g.audioCodec&&(e=t9(t,this.g.audioCodec),e.length&&(t=e)),new hm(t[0],t,!(this.g.codecSwitchingStrategy=="smooth"&&Bu()))};function KN(e,t){t=Jt(t);var n=nm(t,e.map(function(r){return hb(r)}));return n?e.filter(function(r){return n==hb(r)}):[]}function WN(e,t){return e.filter(function(n){return n.audio?t?n.audio.roles.includes(t):n.audio.roles.length==0:!1})}function XN(e,t){return e.filter(function(n){return n.audio&&n.audio.label?n.audio.label.toLowerCase()==t.toLowerCase():!1})}function YN(e,t){return e.filter(function(n){return n.video&&n.video.label?n.video.label.toLowerCase()==t.toLowerCase():!1})}function JN(e,t){return e.filter(function(n){return!(n.audio&&n.audio.channelsCount&&n.audio.channelsCount>t)}).sort(function(n,r){return n.audio||r.audio?n.audio?r.audio?(r.audio.channelsCount||0)-(n.audio.channelsCount||0):1:-1:0})}function QN(e,t){return t=="AUTO"&&(t=d.matchMedia!==void 0&&d.matchMedia("(color-gamut: p3)").matches?e.some(function(n){return!!(n.video&&n.video.hdr&&n.video.hdr=="HLG")})?"HLG":"PQ":"SDR"),e.filter(function(n){return!(n.video&&n.video.hdr&&n.video.hdr!=t)})}function ZN(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}function e9(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}function t9(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function jm(){}function Zc(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var t={retryParameters:ja(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(v,y,x){return d.shakaMediaKeysPolyfill==="apple"&&y=="skd"&&(y=x.serverCertificate,x=fA(v),v=Sh(v,x,y)),v},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Ra(),minHdcpVersion:"",ignoreDuplicateInitData:!Rn("Tizen 2"),defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"};(Ra()||Oa())&&t.preferredKeySystems.push("com.microsoft.playready");var n="reload",r=!1;!Bu()||Na()||Oa()||xc()||_o()&&Q3()===79||la()&&!Cs()&&!j1()||F1()&&Bp()||(n="smooth",r=!0),r={retryParameters:ja(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Bm,manifestPreprocessorTXml:Vm,sequenceMode:!1,multiTypeVariantsAllowed:r,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:P7(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Bm,manifestPreprocessorTXml:Vm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var i={retryParameters:ja(),failureCallback:function(v){return Qc([v])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:Oa()||xc(),dontChooseCodecs:!1,shouldFixTimestampOffset:_o()||Na(),avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep"};(_o()||Na()||la()||qg())&&(i.stallSkip=0),(navigator.userAgent.match(/Edge\//)||Ra())&&(i.gapPadding=.01),Na()&&(i.gapPadding=2),Hg()&&(i.crossBoundaryStrategy="reset"),Mo()&&(i.crossBoundaryStrategy="reset_to_encrypted");var a={trackSelectionCallback:function(v){return P(function(y){return y.return(v)})},downloadSizeCallback:function(v){var y;return P(function(x){return x.g==1?navigator.storage&&navigator.storage.estimate?T(x,navigator.storage.estimate(),3):x.return(!0):(y=x.h,x.return(y.usage+v<.95*y.quota))})},progressCallback:function(v,y){return Qc([v,y])},usePersistentLicense:!0,numberOfParallelDownloads:5};e={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:dr()?.5:0,preferNetworkInformationBandwidth:!1},n={codecSwitchingStrategy:n,addExtraFeaturesToSourceBuffer:function(v){return Qc([v],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(v,y){return Qc([v,y])},dispatchAllEmsgBoxes:!1};var u=!1,l=!1,p=!0;B1()&&(l=u=!0,p=!1);var g={drm:t,manifest:r,streaming:i,mediaSource:n,offline:a,abrFactory:function(){return new xn},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(l2,[null].concat(U(Re.apply(0,arguments)))))},abr:e,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:u,skipPlayDetection:l,supportsMultipleMediaElements:p,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0},ignoreHardwareResolution:!1};return a.trackSelectionCallback=function(v){return P(function(y){return y.return(n9(v,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})},g}function gA(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function Bs(e,t,n){var r={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return s2(e,t,n||Zc(),r,"")}function n9(e,t,n){var r=n;r=="AUTO"&&(r=d.matchMedia("(color-gamut: p3)").matches?e.some(function(l){return!!(l.hdr&&l.hdr=="HLG")})?"HLG":"PQ":"SDR");var i=e.filter(function(l){return!(l.type!="variant"||l.hdr&&l.hdr!=r)});n=[];var a=nm(t,i.map(function(l){return l.language}));a&&(n=i.filter(function(l){return Jt(l.language)==a})),n.length==0&&(n=i.filter(function(l){return l.primary})),n.length==0&&(i.map(function(l){return l.language}),n=i);var u=n.filter(function(l){return l.height&&480>=l.height});for(u.length&&(u.sort(function(l,p){return p.height-l.height}),n=u.filter(function(l){return l.height==u[0].height})),t=[],n.length&&(i=Math.floor(n.length/2),n.sort(function(l,p){return l.bandwidth-p.bandwidth}),t.push(n[i])),e=w(e),n=e.next();!n.done;n=e.next())n=n.value,n.type!=wt&&n.type!="image"||t.push(n);return t}function Bm(e){return Qc([e],e)}function Vm(e){return Qc([e],e)}Ee("shaka.util.PlayerConfiguration",jm),jm.mergeConfigObjects=Bs,jm.createDefaultForLL=gA,jm.createDefault=Zc;function r9(){this.g=null,this.h=[]}function c2(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=w(e.h);for(var r=e.next();!r.done;r=e.next())r=r.value,n+=r.state==t?r.duration:0;return n}function i9(e){function t(a){return{timestamp:a.timestamp,state:a.state,duration:a.duration}}for(var n=[],r=w(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}function a9(){this.i=this.h=null,this.g=[]}function d2(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function $m(){this.mc=this.bh=this.u=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.P=this.T=this.L=this.M=this.O=this.l=this.m=NaN,this.K=0,this.F=this.G=NaN,this.g=new r9,this.h=new a9}function Wi(e,t,n,r){Xt.call(this),this.O=e,this.Y=t,this.Fa=r.networkingEngine,this.B=n,this.o=null,this.ya=0,this.Ma=r.Lc,this.F=r.Zi,this.Na=r.$i,this.g=r.config,this.l=this.G=this.h=null,this.pa=!1,this.H=r.kj,this.sa=!1,this.i=null,this.ka=!1,this.j=this.C=null,this.ea=!1,this.M=new Map,this.Aa=!1,this.Ga=r.jj,this.Z=new $m,this.oa=new Wt,this.m=new Wt,this.P=null,this.u=!1,this.fa=r.Uh,this.W=this.K=null,this.La=r.Th,this.T=!1,this.L=[],this.I=[],this.A=!0}Te(Wi,Xt);function kh(e,t,n){(e=t?e.I:e.L)?e.push(n):n()}function o9(e){if(e.I)for(var t=w(e.I),n=t.next();!n.done;n=t.next())n=n.value,n();e.I=null}function mA(e,t){if(e.P=t,e.T=!0,e.L){t=w(e.L);for(var n=t.next();!n.done;n=t.next())n=n.value,n()}e.L=null}f=Wi.prototype,f.getStartTime=function(){return this.B},f.Qc=function(){return this.O},f.Hf=function(){return this.h};function s9(e){return e.ea=!0,e.j}function u9(e){return e.sa=!0,e.H}f.getStats=function(){return this.Z};function l9(e){return e.ka=!0,e.i}f.Ai=function(){return this.K?Xu(this.K):null},f.zi=function(){return this.W?nh(this.W):null};function c9(e){return e.Aa=!0,e.M}f.start=function(){var e=this;(function(){var t;return P(function(n){switch(n.g){case 1:return T(n,Promise.resolve(),2);case 2:return ve(n,3),T(n,d9(e),5);case 5:if(al(e),d.shakaMediaKeysPolyfill==="webkit"){n.s(6);break}return T(n,vA(e),7);case 7:al(e);case 6:return T(n,p9(e),8);case 8:if(al(e),!e.fa||!e.i){n.s(9);break}return T(n,bR(e.i),10);case 10:al(e);case 9:e.m.resolve(),V(n,0);break;case 3:t=W(n),t instanceof $&&(t.code==7001||t.code==7003)||e.m.reject(t),oe(n)}})})()},f.dispatchEvent=function(e){return this.P?this.P.dispatchEvent(e):Xt.prototype.dispatchEvent.call(this,e)},f.onError=function(e){e.severity===2&&(this.m.reject(e),this.destroy());var t=new Map().set("detail",e);t=new Ae("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)};function al(e){if(e.u)throw new $(2,7,7003)}function p2(e,t){e.dispatchEvent(new Ae("onstatechange",new Map().set("state",t)))}function d9(e){var t,n,r,i,a,u,l,p,g;return P(function(v){switch(v.g){case 1:if(p2(e,"manifest-parser"),e.l||(e.G=x4(e.O,e.Y),e.l=e.G(),e.l.configure(e.g.manifest,function(){return e.A})),t=Date.now()/1e3,p2(e,"manifest"),e.h){v.s(2);break}return T(v,e.l.start(e.O,e.Na),3);case 3:if(e.h=v.h,e.h.variants.length!=1){v.s(2);break}for(n=[],r=e.h.variants[0],i=w([r.video,r.audio]),a=i.next();!a.done;a=i.next())(u=a.value)&&!u.segmentIndex&&n.push(u.createSegmentIndex());if(!(0<n.length)){v.s(2);break}return T(v,Promise.all(n),2);case 2:return e.oa.resolve(),l=new Ae("manifestparsed",void 0),T(v,Promise.resolve(),7);case 7:if(e.dispatchEvent(l),e.h.variants.length==0)throw new $(2,4,4036);h9(e.h),p=Date.now()/1e3,g=p-t,e.Z.H=g,oe(v)}})}function vA(e,t){var n,r,i,a,u,l;return P(function(p){switch(p.g){case 1:if(!e.h||e.i)return p.return();if(p2(e,"drm-engine"),e.ya=Date.now()/1e3,e.i=e.Ma(),e.F.h=e.i,e.i.configure(e.g.drm,function(){return e.A}),n=y4(e.F,e.h),!n){p.s(2);break}return r=new Ae("trackschanged",void 0),T(p,Promise.resolve(),3);case 3:al(e),e.dispatchEvent(r);case 2:return i=im(e.h.variants),a=!0,e.h&&e.h.presentationTimeline&&e.h.type!="HLS"&&(a=e.h.presentationTimeline.U()),T(p,n4(e.i,i,e.h.offlineSessionIds,a),4);case 4:if(al(e),!t){p.s(5);break}return T(p,e.i.Lb(t),6);case 6:al(e);case 5:return T(p,v4(e.F,e.h),7);case 7:if(u=p.h,!u){p.s(0);break}return l=new Ae("trackschanged",void 0),T(p,Promise.resolve(),9);case 9:e.dispatchEvent(l),oe(p)}})}f.configure=function(e,t){e=Um(e,t),Bs(this.g,e)},f.getConfiguration=function(){return Ua(this.g)};function p9(e){var t,n,r,i,a,u,l;return P(function(p){return e.o||(e.o=e.g.adaptationSetCriteriaFactory(),e.o.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredVariantRole,channelCount:e.g.preferredAudioChannelCount,Sc:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,Kc:e.g.preferredAudioLabel,fd:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:""})),e.La&&(t=e.g.abrFactory,e.C=t,e.j=t(),e.j.configure(e.g.abr)),!e.fa||(n=e.h.presentationTimeline.U(),r=im(e.h.variants),i=e.o.create(r),e.j.configure(e.g.abr),e.j.setVariants(Array.from(i.values())),a=e.j.chooseVariant(),!a)?p.s(0):(u=[],e.K=a,a.video&&u.push(h2(e,a.video,n)),a.audio&&u.push(h2(e,a.audio,n)),(l=Rc(e.h.textStreams,e.g.preferredTextLanguage,e.g.preferredTextRole,e.g.preferForcedSubs)[0]||null)&&V5(a.audio,l,e.g)&&(u.push(h2(e,l,n)),e.W=l),T(p,Promise.all(u),0))})}function h2(e,t,n){var r,i,a,u,l;return P(function(p){return p.g==1?(r=e.g.streaming.segmentPrefetchLimit||2,i=new Mm(r,t,function(g,v,y){return Rm(g,v,y||null,e.g.streaming.retryParameters,e.Fa,e.A)},!1),e.M.set(t.id,i),t.segmentIndex?p.s(2):T(p,t.createSegmentIndex(),2)):(a=e.B||0,(l=(u=t.segmentIndex.Gb(a))?u.current():null)||(l=Ba(t.segmentIndex)),l?n?l.$?T(p,oA(i,l.$),0):p.s(0):T(p,vh(i,l.startTime),0):p.s(0))})}f.Lj=function(){return this.m},f.destroy=function(){var e=this,t,n,r;return P(function(i){switch(i.g){case 1:if(e.u=!0,!e.l||e.pa){i.s(2);break}return T(i,e.l.stop(),2);case 2:if(!e.j||e.ea){i.s(4);break}return T(i,e.j.stop(),4);case 4:if(e.H&&!e.sa&&e.H.release(),!e.i||e.ka){i.s(6);break}return T(i,e.i.destroy(),6);case 6:if(0<e.M.size&&!e.Aa)for(t=w(e.M.values()),n=t.next();!n.done;n=t.next())r=n.value,Va(r);oe(i)}})};function h9(e){function t(n){return n.video&&n.audio||n.video&&n.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}Ee("shaka.media.PreloadManager",Wi),Wi.prototype.destroy=Wi.prototype.destroy,Wi.prototype.waitForFinish=Wi.prototype.Lj,Wi.prototype.getPrefetchedTextTrack=Wi.prototype.zi,Wi.prototype.getPrefetchedVariantTrack=Wi.prototype.Ai;function ol(e,t){Xt.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Jc:null,Ic:ed,xc:function(r,i){return qo(n,"enter",r,i)}},{Jc:Th,Ic:ed,xc:function(r,i){return qo(n,"enter",r,i)}},{Jc:Ah,Ic:ed,xc:function(r,i){return qo(n,"enter",r,i)}},{Jc:ed,Ic:Th,xc:function(r,i){return qo(n,"exit",r,i)}},{Jc:ed,Ic:Ah,xc:function(r,i){return qo(n,"exit",r,i)}},{Jc:Th,Ic:Ah,xc:function(r,i){i?qo(n,"skip",r,i):(qo(n,"enter",r,i),qo(n,"exit",r,i))}},{Jc:Ah,Ic:Th,xc:function(r,i){return qo(n,"skip",r,i)}}],this.h=new Ce,this.h.D(this.i,"regionremove",function(r){n.g.delete(r.region)})}Te(ol,Xt),ol.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,Xt.prototype.release.call(this)},ol.prototype.j=function(e,t){if(!this.l||e!=0){this.l=!1;for(var n=w(this.i.h.values()),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.g.get(r),a=e<r.startTime?Th:e>r.endTime?Ah:ed;this.g.set(r,a);for(var u=w(this.m),l=u.next();!l.done;l=u.next())l=l.value,l.Jc==i&&l.Ic==a&&l.xc(r,t)}}};function qo(e,t,n,r){t=new Ae(t,new Map([["region",n],["seeking",r]])),e.dispatchEvent(t)}var Th=1,ed=2,Ah=3;function sl(e,t,n){var r,i,a,u,l,p,g;return P(function(v){switch(v.g){case 1:var y=new ee(e).ab.split("/").pop().split(".");return r=y.length==1?"":y.pop().toLowerCase(),(i=f9.get(r))?v.return(i):(a=0,u=qn([e],n),ve(v,2),u.method="HEAD",T(v,t.request(a,u).promise,4));case 4:l=v.h,i=l.headers["content-type"],V(v,3);break;case 2:if(p=W(v),!p||p.code!=1002&&p.code!=1001){v.s(3);break}return u.method="GET",T(v,t.request(a,u).promise,6);case 6:g=v.h,i=g.headers["content-type"];case 3:return v.return(i?i.toLowerCase().split(";").shift():"")}})}var f9=new Map().set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv","text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function yA(e,t){if(e.lineBreak)return`
`;if(e.nestedCues.length)return e.nestedCues.map(function(u){return yA(u,e)}).join("");if(!e.payload)return e.payload;var n=[],r=e.fontWeight>=Mc,i=e.fontStyle==_c,a=e.textDecoration.includes(No);return r&&n.push(["b"]),i&&n.push(["i"]),a&&n.push(["u"]),i=e.color,i==""&&t&&(i=t.color),r="",(i=bA(i))&&(r+="."+i),i=e.backgroundColor,i==""&&t&&(i=t.backgroundColor),(t=bA(i))&&(r+=".bg_"+t),r&&n.push(["c",r]),n.reduceRight(function(u,l){var p=w(l);return l=p.next().value,p=p.next().value,"<"+l+(p===void 0?"":p)+">"+u+"</"+l+">"},e.payload)}function bA(e){e=e.toLowerCase();var t=e.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(parseInt(t[1],10)|256).toString(16).slice(1)+(parseInt(t[2],10)|256).toString(16).slice(1)+(parseInt(t[3],10)|256).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function f2(e,t){var n=[];e=w(wA(e));for(var r=e.next();!r.done;r=e.next())if(r=r.value,r.isContainer)n.push.apply(n,U(f2(r.nestedCues,r)));else{var i=r.clone();i.nestedCues=[],i.payload=yA(r,t),n.push(i)}return n}function wA(e){var t=[];e=w(e);for(var n=e.next(),r={};!n.done;r={jf:void 0},n=e.next())r.jf=n.value,t.some(function(i){return function(a){return Jg(i.jf,a)}}(r))||t.push(r.jf);return t}function g9(e){function t(r){for(var i=5381,a=r.length;a;)i=33*i^r.charCodeAt(--a);return(i>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch{}return e.textAlign=="center"&&n.align!="center"&&(n.align="middle"),e.writingMode=="vertical-lr"?n.vertical="lr":e.writingMode=="vertical-rl"&&(n.vertical="rl"),e.lineInterpretation==1&&(n.snapToLines=!1),e.line!=null&&(n.line=e.line),e.position!=null&&(n.position=e.position),n}function br(e,t){for(this.h=e,this.i=t,this.g=null,e=w(Array.from(this.h.textTracks)),t=e.next();!t.done;t=e.next())t=t.value,t.kind!=="metadata"&&t.kind!=="chapters"&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}f=br.prototype,f.configure=function(){},f.remove=function(e,t){return this.g?(SA(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0):!1},f.append=function(e){if(this.g){var t=f2(e),n=[];e=this.g.cues?Array.from(this.g.cues):[],t=w(t);for(var r=t.next(),i={};!r.done;i={Tc:void 0},r=t.next())i.Tc=r.value,!e.some(function(a){return function(u){return u.startTime==a.Tc.startTime&&u.endTime==a.Tc.endTime&&u.text==a.Tc.payload}}(i))&&i.Tc.payload&&(r=g9(i.Tc))&&n.push(r);for(e=n.slice().sort(function(a,u){return a.startTime!=u.startTime?a.startTime-u.startTime:a.endTime!=u.endTime?a.endTime-u.startTime:"line"in VTTCue.prototype?n.indexOf(u)-n.indexOf(a):n.indexOf(a)-n.indexOf(u)}),e=w(e),t=e.next();!t.done;t=e.next())this.g.addCue(t.value)}},f.destroy=function(){return this.g&&(SA(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},f.isTextVisible=function(){return this.g?this.g.mode=="showing":!1},f.setTextVisibility=function(e){e&&!this.g&&xA(this),this.g&&(this.g.mode=e?"showing":"hidden")},f.setTextLanguage=function(){},f.enableTextDisplayer=function(){xA(this)};function xA(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function SA(e,t){var n=e.mode;e.mode=n=="showing"?"showing":"hidden";for(var r=w(Array.from(e.cues)),i=r.next();!i.done;i=r.next())(i=i.value)&&t(i)&&e.removeCue(i);e.mode=n}Ee("shaka.text.SimpleTextDisplayer",br),br.prototype.enableTextDisplayer=br.prototype.enableTextDisplayer,br.prototype.setTextLanguage=br.prototype.setTextLanguage,br.prototype.setTextVisibility=br.prototype.setTextVisibility,br.prototype.isTextVisible=br.prototype.isTextVisible,br.prototype.destroy=br.prototype.destroy,br.prototype.append=br.prototype.append,br.prototype.remove=br.prototype.remove,br.prototype.configure=br.prototype.configure;function wr(){}f=wr.prototype,f.configure=function(){},f.remove=function(){},f.append=function(){},f.destroy=function(){},f.isTextVisible=function(){return!1},f.setTextVisibility=function(){},f.setTextLanguage=function(){},f.enableTextDisplayer=function(){},Ee("shaka.text.StubTextDisplayer",wr),wr.prototype.enableTextDisplayer=wr.prototype.enableTextDisplayer,wr.prototype.setTextLanguage=wr.prototype.setTextLanguage,wr.prototype.setTextVisibility=wr.prototype.setTextVisibility,wr.prototype.isTextVisible=wr.prototype.isTextVisible,wr.prototype.destroy=wr.prototype.destroy,wr.prototype.append=wr.prototype.append,wr.prototype.remove=wr.prototype.remove,wr.prototype.configure=wr.prototype.configure;function xr(e,t){var n=this;document.fullscreenEnabled||Be("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen"),this.A=!1,this.h=[],this.j=e,this.C=t,this.u=this.m=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.C.appendChild(this.g),this.o=new Tt(function(){n.j.paused||Vs(n)}),Eh(this),this.l=new Map,this.i=new Ce,this.i.D(document,"fullscreenchange",function(){Vs(n,!0)}),this.i.D(this.j,"seeking",function(){Vs(n,!0)}),this.i.D(this.j,"ratechange",function(){Eh(n)}),this.i.D(this.j,"resize",function(){var r=n.j,i=r.videoWidth;r=r.videoHeight,i&&r?n.m=i/r:n.m=null}),this.B=null,"ResizeObserver"in d&&(this.B=new ResizeObserver(function(){Vs(n,!0)}),this.B.observe(this.g)),this.F=new Map}f=xr.prototype,f.configure=function(e){this.u=e,Eh(this),Vs(this,!0)},f.append=function(e){var t=[].concat(U(this.h));e=w(wA(e));for(var n=e.next(),r={};!n.done;r={kf:void 0},n=e.next())r.kf=n.value,t.some(function(i){return function(a){return Jg(a,i.kf)}}(r))||this.h.push(r.kf);this.h.length&&Eh(this),Vs(this)},f.destroy=function(){return this.g&&(this.C.removeChild(this.g),this.g=null,this.A=!1,this.h=[],this.o&&(this.o.stop(),this.o=null),this.l.clear(),this.i&&(this.i.release(),this.i=null),this.B&&(this.B.disconnect(),this.B=null)),Promise.resolve()},f.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(r){return r.startTime<e||r.endTime>=t}),Vs(this,n>this.h.length),this.h.length||Eh(this),!0},f.isTextVisible=function(){return this.A},f.setTextVisibility=function(e){this.A=e,Vs(this,!0)},f.setTextLanguage=function(e){e&&e!="und"?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},f.enableTextDisplayer=function(){};function Eh(e){e.o&&(e.h.length?e.o.ua((e.u?e.u.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.j.playbackRate))):e.o.stop())}function m9(e,t){for(;t!=null;){if(t==e.g)return!0;t=t.parentElement}return!1}function kA(e,t,n,r,i){var a=!1,u=[],l=[];t=w(t);for(var p=t.next();!p.done;p=t.next()){p=p.value,i.push(p);var g=e.l.get(p),v=p.startTime<=r&&p.endTime>r,y=g?g.Nh:null;g&&(u.push(g.lf),g.Ec&&u.push(g.Ec),v||(a=!0,e.l.delete(p),g=null)),v&&(l.push(p),g?m9(e,y)||(a=!0):(v9(e,p,i),g=e.l.get(p),y=g.Nh,a=!0)),0<p.nestedCues.length&&y&&kA(e,p.nestedCues,y,r,i),i.pop()}if(a){for(r=w(u),i=r.next();!i.done;i=r.next())i=i.value,i.parentElement&&i.parentElement.removeChild(i);for(l.sort(function(x,S){return x.startTime!=S.startTime?x.startTime-S.startTime:x.endTime-S.endTime}),l=w(l),r=l.next();!r.done;r=l.next())r=e.l.get(r.value),r.Ec?(r.Ec.contains(n)&&r.Ec.removeChild(n),n.appendChild(r.Ec),r.Ec.appendChild(r.lf)):n.appendChild(r.lf)}}function Vs(e,t){if(e.g){var n=e.j.currentTime;if(!e.A||t!==void 0&&t){t=w(e.F.values());for(var r=t.next();!r.done;r=t.next())js(r.value);js(e.g),e.l.clear(),e.F.clear()}e.A&&kA(e,e.h,e.g,n,[])}}function v9(e,t,n){var r=1<n.length,i=r?"span":"div";t.lineBreak&&(i="br"),t.rubyTag&&(i=t.rubyTag),r=!r&&0<t.nestedCues.length;var a=document.createElement(i);if(i!="br"&&b9(e,a,t,n,r),n=null,t.region&&t.region.id){var u=t.region,l=e.m===4/3?2.5:1.9;if(n=u.id+"_"+u.width+"x"+u.height+(u.heightUnits==ci?"%":"px")+"-"+u.viewportAnchorX+"x"+u.viewportAnchorY+(u.viewportAnchorUnits==ci?"%":"px"),e.F.has(n))n=e.F.get(n);else{i=document.createElement("span");var p=u.heightUnits==ci?"%":"px",g=u.widthUnits==ci?"%":"px",v=u.viewportAnchorUnits==ci?"%":"px";i.id="shaka-text-region---"+n,i.classList.add("shaka-text-region"),i.style.position="absolute";var y=u.height,x=u.width;u.heightUnits===2&&(y=5.33*u.height,p="%"),u.widthUnits===2&&(x=u.width*l,g="%"),i.style.height=y+p,i.style.width=x+g,u.viewportAnchorUnits===2?(l=u.viewportAnchorY/75*100,p=u.viewportAnchorX/(e.m===4/3?160:210)*100,l-=u.regionAnchorY*y/100,p-=u.regionAnchorX*x/100,i.style.top=l+"%",i.style.left=p+"%"):(i.style.top=u.viewportAnchorY-u.regionAnchorY*y/100+v,i.style.left=u.viewportAnchorX-u.regionAnchorX*x/100+v),u.heightUnits!==0&&u.widthUnits!==0&&u.viewportAnchorUnits!==0&&(u=Math.max(0,Math.min(100-(parseInt(i.style.width.slice(0,-1),10)||0),parseInt(i.style.left.slice(0,-1),10)||0)),i.style.top=Math.max(0,Math.min(100-(parseInt(i.style.height.slice(0,-1),10)||0),parseInt(i.style.top.slice(0,-1),10)||0))+"%",i.style.left=u+"%"),i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.justifyContent=t.displayAlign=="before"?"flex-start":t.displayAlign=="center"?"center":"flex-end",e.F.set(n,i),n=i}}i=a,r&&(i=document.createElement("span"),i.classList.add("shaka-text-wrapper"),i.style.backgroundColor=t.backgroundColor,i.style.lineHeight="normal",a.appendChild(i)),e.l.set(t,{lf:a,Nh:i,Ec:n})}function y9(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==Zg?n:e==="left"||e==="start"&&t===Yp||e==="end"&&t==="rtl"?"line-left":e==="right"||e==="start"&&t==="rtl"||e==="end"&&t===Yp?"line-right":"center"}function b9(e,t,n,r,i){var a=t.style,u=n.nestedCues.length==0,l=1<r.length;a.whiteSpace="pre-wrap";var p=n.payload.replace(/\s+$/g,function(v){return"\xA0".repeat(v.length)});if(a.webkitTextStrokeColor=n.textStrokeColor,a.webkitTextStrokeWidth=n.textStrokeWidth,a.color=n.color,a.direction=n.direction,a.opacity=n.opacity,a.paddingLeft=g2(n.linePadding,n,e.C),a.paddingRight=g2(n.linePadding,n,e.C),a.textCombineUpright=n.textCombineUpright,a.textShadow=n.textShadow,n.backgroundImage)a.backgroundImage="url('"+n.backgroundImage+"')",a.backgroundRepeat="no-repeat",a.backgroundSize="contain",a.backgroundPosition="center",n.backgroundColor&&(a.backgroundColor=n.backgroundColor),a.width="100%",a.height="100%";else{if(n.nestedCues.length)var g=t;else g=document.createElement("span"),t.appendChild(g);n.border&&(g.style.border=n.border),i||((t=w9(r,function(v){return v.backgroundColor}))?g.style.backgroundColor=t:p&&(g.style.backgroundColor="rgba(0, 0, 0, 0.8)")),p&&(g.textContent=p)}l&&!r[r.length-1].isContainer?a.display="inline":(a.display="flex",a.flexDirection="column",a.alignItems="center",n.textAlign=="left"||n.textAlign=="start"?(a.width="100%",a.alignItems="start"):(n.textAlign=="right"||n.textAlign=="end")&&(a.width="100%",a.alignItems="end"),a.justifyContent=n.displayAlign=="before"?"flex-start":n.displayAlign=="center"?"center":"flex-end"),u||(a.margin="0"),a.fontFamily=n.fontFamily,a.fontWeight=n.fontWeight.toString(),a.fontStyle=n.fontStyle,a.letterSpacing=n.letterSpacing,a.fontSize=g2(n.fontSize,n,e.C,e.u?e.u.fontScaleFactor:1),r=n.line,r!=null&&(u=n.lineInterpretation,u==Jp&&(u=1,l=16,e.m&&1>e.m&&(l=32),r=0>r?100+r/l*100:r/l*100),u==1&&(a.position="absolute",n.writingMode==Gu?(a.width="100%",n.lineAlign==Ku?a.top=r+"%":n.lineAlign=="end"&&(a.bottom=100-r+"%")):n.writingMode=="vertical-lr"?(a.height="100%",n.lineAlign==Ku?a.left=r+"%":n.lineAlign=="end"&&(a.right=100-r+"%")):(a.height="100%",n.lineAlign==Ku?a.right=r+"%":n.lineAlign=="end"&&(a.left=100-r+"%")))),a.lineHeight=n.lineHeight,e=y9(n),e=="line-left"?(a.cssFloat="left",n.position!==null&&(a.position="absolute",n.writingMode==Gu?(a.left=n.position+"%",a.width="auto"):a.top=n.position+"%")):e=="line-right"?(a.cssFloat="right",n.position!==null&&(a.position="absolute",n.writingMode==Gu?(a.right=100-n.position+"%",a.width="auto"):a.bottom=n.position+"%")):n.position!==null&&n.position!=50&&(a.position="absolute",n.writingMode==Gu?(a.left=n.position+"%",a.width="auto"):a.top=n.position+"%"),a.textAlign=n.textAlign,a.textDecoration=n.textDecoration.join(" "),a.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&a.writingMode==n.writingMode||(a.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==Gu?a.width=n.size+"%":a.height=n.size+"%")}function g2(e,t,n,r){r=r===void 0?1:r;var i=(i=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(i[1]),unit:i[2]}:null;if(!i)return e;switch(e=i.unit,r*=i.value,e){case"%":return r/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*r/t.cellResolution.rows+"px";default:return r+e}}function w9(e,t){for(var n=e.length-1;0<=n;n--){var r=t(e[n]);if(r||r===0)return r}return null}Ee("shaka.text.UITextDisplayer",xr),xr.prototype.enableTextDisplayer=xr.prototype.enableTextDisplayer,xr.prototype.setTextLanguage=xr.prototype.setTextLanguage,xr.prototype.setTextVisibility=xr.prototype.setTextVisibility,xr.prototype.isTextVisible=xr.prototype.isTextVisible,xr.prototype.remove=xr.prototype.remove,xr.prototype.destroy=xr.prototype.destroy,xr.prototype.append=xr.prototype.append,xr.prototype.configure=xr.prototype.configure;function x9(e,t){function n(a){for(var u=a,l=w(t),p=l.next();!p.done;p=l.next())p=p.value,p.end&&p.start<a&&(u+=p.end-p.start);return a=Math.floor(u/3600),l=Math.floor(u/60%60),p=Math.floor(u%60),u=Math.floor(1e3*u%1e3),(10>a?"0":"")+a+":"+(10>l?"0":"")+l+":"+(10>p?"0":"")+p+"."+(100>u?10>u?"00":"0":"")+u}var r=f2(e);e=`WEBVTT

`,r=w(r);for(var i=r.next();!i.done;i=r.next())i=i.value,e+=n(i.startTime)+" --> "+n(i.endTime)+function(a){var u=[];switch(a.textAlign){case"left":u.push("align:left");break;case"right":u.push("align:right");break;case ro:u.push("align:middle");break;case"start":u.push("align:start");break;case"end":u.push("align:end")}switch(a.writingMode){case"vertical-lr":u.push("vertical:lr");break;case"vertical-rl":u.push("vertical:rl")}return u.length?" "+u.join(" "):""}(i)+`
`,e+=i.payload+`

`;return e}Ee("shaka.text.WebVttGenerator",function(){});function m2(e,t){this.h=e,this.g=t,this.i=void 0,this.u=!1,this.F=!0,this.l=this.B=!1,this.o=this.m=void 0,this.A=0,this.G=!1,this.C=new Ce,this.j=null}m2.prototype.setMediaElement=function(e){this.j=e,E9(this)},m2.prototype.configure=function(e){this.g=e};function S9(e){e.u=!1,e.F=!0,e.B=!1,e.l=!1,e.m=0,e.o=0,e.A=0,e.G=!1,e.j=null,e.C.Qa()}function k9(e,t){e.l=t,e.l?e.i==Wm?e.i=Xm:e.i==Ym&&(e.i=Jm):e.i==Xm?e.i=Wm:e.i==Jm&&(e.i=Ym)}function T9(e,t){if(e.g&&e.g.enabled&&e.g.version==EA&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.A=t}).catch(function(){e.A=0})}}function A9(e,t,n){try{if(!e.g.enabled)return t;var r=v2(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var i=Hm;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":i=Gm;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":i=AA;break e}i=void 0}r.ot=i,r.su=!0;var a=zm(r);return y2(t,a)}catch(u){return $t("CMCD_SRC_ERROR","Could not generate src CMCD data.",u),t}}function E9(e){e.C.ma(e.j,"play",function(){e.m||(e.m=Date.now())}),e.C.ma(e.j,"playing",function(){e.o||(e.o=Date.now())})}function v2(e){return e.g.sessionId||(e.g.sessionId=d.crypto.randomUUID()),{v:e.g.version,sf:e.i,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.h.getBandwidthEstimate()/1e3}}function td(e,t,n){n=n===void 0?{}:n;var r=r===void 0?e.g.useHeaders:r;if(e.g.enabled){Object.assign(n,v2(e)),n.pr=e.h.gb();var i=n.ot===qm||n.ot===Gm;if(e.B&&i&&(n.bs=!0,n.su=!0,e.B=!1),n.su==null&&(n.su=e.F),n.v===EA&&(e.h.U()&&(n.ltc=e.h.Zd()),i=!e.G&&e.o&&e.m?e.o-(e.A||e.m):void 0,i!=null&&(n.msd=i,e.G=!0)),e=C9(e,n),r)r=D9(e),Object.keys(r).length&&Object.assign(t.headers,r);else{var a=zm(e);a&&(t.uris=t.uris.map(function(u){return y2(u,a)}))}}}function C9(e,t){var n=e.g.includeKeys;return n.length?Object.keys(t).reduce(function(r,i){return n.includes(i)&&(r[i]=t[i]),r},{}):t}function I9(e){if(e.type===0)return P9;if(e=e.stream){var t=e.type;if(t=="video")return e.codecs&&e.codecs.includes(",")?Gm:qm;if(t=="audio")return Hm;if(t=="text")return e.mimeType==="application/mp4"?Km:b2}}function M9(e,t){if(t=e.h.Fb()[t],!t.length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(r){return r.start<=n&&r.end>=n}))?1e3*(e.end-n):NaN}function TA(e,t){if(t=e.h.Fb()[t],!t.length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(r){return r.start<=n&&r.end>=n}))?1e3*(e.end-n):0}function _9(e,t){var n=e.h.Rb();if(!n.length)return NaN;e=n[0],n=w(n);for(var r=n.next();!r.done;r=n.next())r=r.value,r.type==="variant"&&r.bandwidth>e.bandwidth&&(e=r);switch(t){case qm:return e.videoBandwidth||NaN;case Hm:return e.audioBandwidth||NaN;default:return e.bandwidth}}function zm(e){function t(y){return 100*n(y/100)}function n(y){return Math.round(y)}function r(y){return!Number.isNaN(y)&&y!=null&&y!==""&&y!==!1}var i=[],a={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(y){return encodeURIComponent(y)},rtp:t,tb:n},u=Object.keys(e||{}).sort();u=w(u);for(var l=u.next();!l.done;l=u.next()){l=l.value;var p=e[l];if(r(p)&&(l!=="v"||p!==1)&&(l!="pr"||p!==1)){var g=a[l];g&&(p=g(p)),g=typeof p;var v=void 0;v=g==="string"&&l!=="ot"&&l!=="sf"&&l!=="st"?l+"="+JSON.stringify(p):g==="boolean"?l:g==="symbol"?l+"="+p.description:l+"="+p,i.push(v)}}return i.join(",")}function D9(e){var t=Object.keys(e),n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};t=w(t);for(var u=t.next();!u.done;u=t.next())u=u.value,i[a[u]!=null?a[u]:1][u]=e[u];for(e=0;e<i.length;e++)(a=zm(i[e]))&&(n["CMCD-"+r[e]]=a);return n}function y2(e,t){return!t||e.includes("offline:")?e:(e=new ee(e),e.g.set("CMCD",t),e.toString())}var AA="m",Hm="a",qm="v",Gm="av",P9="i",b2="c",Km="tt",EA=2,Wm="d",Xm="ld",Ym="h",Jm="lh";Ee("shaka.util.CmcdManager.StreamingFormat",{DASH:Wm,hk:Xm,HLS:Ym,ik:Jm,wk:"s",OTHER:"o"});function Xi(e){this.h=e,this.g=null}f=Xi.prototype,f.configure=function(e){this.h=e},f.Ug=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(MA)?1e3*this.g.get(MA):null},f.Sg=function(){return this.h.enabled&&this.g&&this.g.has(IA)?1e3*this.g.get(IA):null},f.Ci=function(){return this.h.enabled&&this.g&&this.g.has(_A)?this.g.get(_A):null},f.Di=function(){return this.h.enabled&&this.g&&this.g.has(DA)?this.g.get(DA):null},f.getBandwidthEstimate=function(e){var t=this.Sg();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e};function CA(e){return e?e.toLowerCase()==="false"?!1:/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""):!0}Ee("shaka.util.CmsdManager",Xi),Xi.prototype.getBandwidthEstimate=Xi.prototype.getBandwidthEstimate,Xi.prototype.getRoundTripTime=Xi.prototype.Di,Xi.prototype.getResponseDelay=Xi.prototype.Ci,Xi.prototype.getEstimatedThroughput=Xi.prototype.Sg,Xi.prototype.getMaxBitrate=Xi.prototype.Ug;var IA="etp",MA="mb",_A="rd",DA="rtt";function PA(){this.g=null,this.h=[]}function w2(e,t){return P(function(n){if(n.g==1)return e.g?T(n,new Promise(function(r){return e.h.push(r)}),2):n.s(2);e.g=t,oe(n)})}PA.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function ce(e,t,n){t=t===void 0?null:t,Xt.call(this);var r=this;this.m=tv,this.h=null,this.ue=t,this.oa=!1,this.Qe=new Ce,this.zd=new Ce,this.l=new Ce,this.Na=new Ce,this.Sb=new Ce,this.G=this.I=this.C=this.F=null,this.Te=0,this.Z=new PA,this.Y=this.Pb=this.T=this.i=this.Qb=this.H=this.j=this.xd=this.O=this.yg=this.fa=this.L=this.Ga=this.Aa=this.yd=this.M=this.pa=this.K=this.La=null,this.sa=!1,this.Fa=this.o=null,this.We=1e9,this.Oe=[],this.Ve=-1,this.g=Go(this),this.Xe=gA(),this.P=null,this.Ue=-1,this.Ma=null,this.ka={width:1/0,height:1/0},this.te=new Cb(this.g,this.ka,null),this.Ee=[],this.A=null,this.W=this.g.adaptationSetCriteriaFactory(),this.W.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:this.g.preferredAudioChannelCount,Sc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Kc:this.g.preferredAudioLabel,fd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),this.Tb=this.g.preferredTextLanguage,this.Hd=this.g.preferredTextRole,this.Fd=this.g.preferForcedSubs,this.Cd=[],n&&n(this),this.L=K9(this),this.fa=new Xi(this.g.cmsd),this.F=VA(this),this.F.kg(this.g.streaming.forceHTTP),this.F.lg(this.g.streaming.forceHTTPS),this.F.o=this.g.streaming.minBytesForProgressEvents,this.Ub=this.ea=this.u=null,this.Ze=!1,this.Ye=new Tt(function(){return P(function(i){if(i.g==1)return r.ea?T(i,r.Lb(r.Ub,!0),3):i.s(0);if(i.g!=4)return T(i,r.load(r.ea),4);r.Ze?r.Ub.pause():r.Ub.play(),r.ea=null,r.Ze=!1,oe(i)})}),nv&&(this.u=nv(),this.u.configure(this.g.ads),this.Sb.D(this.u,"ad-content-pause-requested",function(i){var a;return P(function(u){if(u.g==1)return r.Ye.stop(),r.ea?u.s(0):(r.Ub=r.h,r.Ze=r.Uc(),a=i.saveLivePosition||!1,T(u,r.Lg(!0,a),3));r.ea=u.h,oe(u)})}),this.Sb.D(this.u,"ad-content-resume-requested",function(i){if(i=i.offset||0,r.ea){var a=r.ea;a.B&&i&&(a.B+=i)}r.Ye.da(.1)}),this.Sb.D(this.u,"ad-content-attach-requested",function(){return P(function(i){return r.h||!r.Ub?i.s(0):T(i,r.Lb(r.Ub,!0),0)})})),this.Qe.D(d,"online",function(){I2(r),r.eg()}),this.xe=new Tt(function(){for(var i=Date.now()/1e3,a=!1,u=!0,l=w(r.i.variants),p=l.next();!p.done;p=l.next())p=p.value,0<p.disabledUntilTime&&p.disabledUntilTime<=i&&(p.disabledUntilTime=0,a=!0),0<p.disabledUntilTime&&(u=!1);u&&r.xe.stop(),a&&rd(r,!1,void 0,!1,!1)}),this.ya=null,e&&(ut("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Lb(e,!0)),this.B=null}Te(ce,Xt);function Qm(e){e.O!=null&&(a5(e.O),e.O.release(),e.O=null)}function L9(e,t,n){n||t.lcevc.enabled?(Qm(e),e.O==null&&(e.O=new $p(e.h,e.yg,t.lcevc,n),e.I&&(e.I.I=e.O))):Qm(e)}function on(e,t){return new Ae(e,t)}f=ce.prototype,f.destroy=function(){var e=this,t;return P(function(n){switch(n.g){case 1:return e.m==ga?n.return():(Qm(e),t=e.detach(),e.m=ga,T(n,t,2));case 2:return T(n,e.pf(),3);case 3:if(e.Qe&&(e.Qe.release(),e.Qe=null),e.zd&&(e.zd.release(),e.zd=null),e.l&&(e.l.release(),e.l=null),e.Na&&(e.Na.release(),e.Na=null),e.Sb&&(e.Sb.release(),e.Sb=null),e.Fa=null,e.g=null,e.A=null,e.ue=null,e.L=null,e.fa=null,!e.F){n.s(4);break}return T(n,e.F.destroy(),5);case 5:e.F=null;case 4:e.o&&(e.o.release(),e.o=null),Xt.prototype.release.call(e),oe(n)}})};function LA(e,t){cE.set(e,t)}function nd(e,t){e.dispatchEvent(on("onstatechange",new Map().set("state",t)))}f.Lb=function(e,t){t=t===void 0?!0:t;var n=this,r,i,a;return P(function(u){switch(u.g){case 1:if(n.m==ga)throw new $(2,7,7e3);if(r=n.h&&n.h==e,!n.h||n.h==e){u.s(2);break}return T(u,n.detach(),2);case 2:return T(u,x2(n,"attach"),4);case 4:if(u.h)return u.return();if(ve(u,5,6),r||(nd(n,"attach"),i=function(){var l=M2(n,!1);l&&id(n,l)},n.zd.D(e,"error",i),n.h=e,n.L&&n.L.setMediaElement(e)),!t||!Za()||n.I){u.s(6);break}return T(u,S2(n),6);case 6:Se(u),n.Z.release(),te(u,0);break;case 5:return a=W(u),T(u,n.detach(),10);case 10:throw a}})},f.Vh=function(e){this.yg=e},f.detach=function(e){e=e===void 0?!1:e;var t=this;return P(function(n){if(n.g==1){if(t.m==ga)throw new $(2,7,7e3);return T(n,t.kc(!1,e),2)}if(n.g!=3)return T(n,x2(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.zd.Qa(),t.h=null),nd(t,"detach"),t.u&&!e&&t.u.release()}finally{t.Z.release()}oe(n)})};function x2(e,t){var n;return P(function(r){return r.g==1?(n=++e.Te,T(r,w2(e.Z,t),2)):n!=e.Te?(e.Z.release(),r.return(!0)):r.return(!1)})}f.kc=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,r,i,a,u,l,p,g,v,y,x;return P(function(S){switch(S.g){case 1:return n.m!=ga&&(n.m=tv),T(S,x2(n,"unload"),2);case 2:return S.h?S.return():(be(S,3),n.sa=!1,nd(n,"unload"),Qm(n),r=n.Cd.map(function(k){return k()}),n.Cd=[],T(S,Promise.all(r),5));case 5:if(n.dispatchEvent(on("unloading")),n.yd&&(n.yd.release(),n.yd=null),n.Aa&&(n.Aa.release(),n.Aa=null),n.Ga&&(n.Ga.release(),n.Ga=null),n.h&&(n.l.Qa(),n.Na.Qa()),n.xe.stop(),n.La&&(n.La.release(),n.La=null),n.pa&&(n.pa.stop(),n.pa=null),!n.H){S.s(6);break}return T(S,n.H.stop(),7);case 7:n.H=null,n.Qb=null;case 6:if(!n.o){S.s(8);break}return T(S,n.o.stop(),8);case 8:if(!n.j){S.s(10);break}return T(S,n.j.destroy(),11);case 11:n.j=null;case 10:if(n.K&&(n.K.release(),n.K=null),n.G&&(n.G.release(),n.G=null),d.shakaMediaKeysPolyfill!=="webkit"||!n.C){S.s(12);break}return T(S,n.C.destroy(),13);case 13:n.C=null;case 12:if(!n.I){S.s(14);break}return T(S,n.I.destroy(),15);case 15:n.I=null;case 14:if(n.u&&!t&&n.u.onAssetUnload(),n.ea&&!t&&(n.ea.destroy(),n.ea=null),t||n.Ye.stop(),n.L&&S9(n.L),n.fa&&(n.fa.g=null),!n.B){S.s(16);break}return T(S,n.B.destroy(),17);case 17:n.B=null;case 16:if(n.h&&(js(n.h),n.h.src&&(n.h.removeAttribute("src"),n.h.load())),!n.C){S.s(18);break}return T(S,n.C.destroy(),19);case 19:n.C=null;case 18:if(n.ya&&n.T!=n.ya.Qc()&&(n.ya.u||n.ya.destroy(),n.ya=null),n.T=null,n.Pb=null,n.M=null,n.i){for(i=w(n.i.variants),a=i.next();!a.done;a=i.next())for(u=a.value,l=w([u.audio,u.video]),p=l.next();!p.done;p=l.next())(g=p.value)&&g.segmentIndex&&g.segmentIndex.release();for(v=w(n.i.textStreams),y=v.next();!y.done;y=v.next())x=y.value,x.segmentIndex&&x.segmentIndex.release()}n.g&&n.g.streaming.clearDecodingCache&&(am.clear(),wc.clear()),n.i=null,n.A=new $m,n.Se=null,n.Ma=null,n.P=null,n.Ue=-1,n.Oe=[],n.Ve=-1,n.F&&n.F.Hg(),E2(n);case 3:Se(S),n.Z.release(),te(S,4);break;case 4:if(e&&Za()&&!n.I&&n.h)return T(S,S2(n),0);S.s(0)}})},f.Kj=function(e){this.Y=e},f.load=function(e,t,n){t=t===void 0?null:t;var r=this,i,a,u,l,p,g,v,y,x,S,k,C,E;return P(function(I){switch(I.g){case 1:if(r.m==ga)throw new $(2,7,7e3);if(i=null,a="",e instanceof Wi){if(e.u)throw new $(2,7,7006);i=e,a=i.Qc()||""}else a=e||"";return T(I,w2(r.Z,"load"),2);case 2:if(r.Z.release(),!r.h)throw new $(2,7,7002);if(!r.T){I.s(3);break}return r.T=a,T(I,r.kc(!1),3);case 3:if(u=++r.Te,l=function(){return P(function(_){if(_.g==1)return r.Te==u?_.s(0):i?T(_,i.destroy(),3):_.s(3);throw new $(2,7,7e3)})},p=function(_,j){return P(function(B){switch(B.g){case 1:return be(B,2),T(B,w2(r.Z,j),4);case 4:return T(B,l(),5);case 5:return T(B,_(),6);case 6:return T(B,l(),7);case 7:i&&r.g&&(i.g=r.g);case 2:Se(B),r.Z.release(),te(B,0)}})},ve(I,5,6),t==null&&i&&(t=i.getStartTime()),r.Y=t,r.sa=!1,r.dispatchEvent(on("loading")),i){n=i.Y,I.s(8);break}if(n){I.s(8);break}return T(I,p(function(){return P(function(_){if(_.g==1)return T(_,UA(r,a),2);n=_.h,oe(_)})},"guessMimeType_"),8);case 8:if(g=!!i,i){mA(i,r),r.A=i.getStats(),I.s(11);break}return T(I,NA(r,a,t,n,!0),12);case 12:(i=I.h)?(i.A=!1,mA(i,r),r.A=i.getStats(),i.start(),i.m.catch(function(){})):r.A=new $m;case 11:return v=!i,y=Date.now()/1e3,r.A=i?i.getStats():new $m,r.T=a,r.Pb=n||null,r.Aa=new mh(function(){return r.Ra()}),v?T(I,p(function(){return P(function(_){return T(_,U9(r,n),0)})},"initializeSrcEqualsDrmInner_"),23):(r.Ga=new mh(function(){return r.Ra()}),T(I,p(function(){return P(function(_){if(_.g==1)return T(_,Promise.race([i.oa,i.m]),2);r.Qb=i.G;var j=i;j.pa=!0,r.H=j.l,r.i=i.Hf(),oe(_)})},"waitForFinish"),15));case 15:if(r.I){I.s(16);break}return T(I,p(function(){return P(function(_){return T(_,S2(r),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return r.i&&r.i.textStreams.length&&(r.B.enableTextDisplayer?r.B.enableTextDisplayer():ut("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),T(I,p(function(){return P(function(_){return T(_,i.m,0)})},"waitForFinish"),18);case 18:if(r.g=i.getConfiguration(),r.te=i.F,r.H&&r.H.setMediaElement&&r.h&&r.H.setMediaElement(r.h),r.yd=u9(i),r.xd=i.Ga,(x=i.o)&&(r.W=x),g&&r.h&&r.h.nodeName==="AUDIO"&&(R9(r),r.configure("manifest.disableVideo",!0)),i.i){I.s(19);break}return T(I,p(function(){return P(function(_){return T(_,vA(i,r.h),0)})},"drmEngine_.init"),19);case 19:return r.C=l9(i),T(I,p(function(){return P(function(_){return T(_,r.C.Lb(r.h),0)})},"drmEngine_.attach"),21);case 21:return!(S=i.C)||r.Fa&&r.Fa==S||(r.o=s9(i),r.Fa=i.C,typeof r.o.setMediaElement!="function"&&(ut("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),r.o.setMediaElement=function(){}),typeof r.o.setCmsdManager!="function"&&(ut("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),r.o.setCmsdManager=function(){}),typeof r.o.trySuggestStreams!="function"&&(ut("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),r.o.trySuggestStreams=function(){})),k=c9(i),C=i.K,T(I,p(function(){return P(function(_){return T(_,O9(r,y,C,k),0)})},"loadInner_"),22);case 22:o9(i),r.Pb&&dr()&&cb(r.Pb)&&eN(r.I,r.T,r.Pb),I.s(14);break;case 23:return T(I,p(function(){return P(function(_){return T(_,F9(r,y,n),0)})},"srcEqualsInner_"),14);case 14:r.dispatchEvent(on("loaded"));case 6:if(Se(I),!i){I.s(25);break}return T(I,i.destroy(),25);case 25:r.ya=null,te(I,0);break;case 5:if(E=W(I),!E||E.code==7e3){I.s(27);break}return T(I,r.kc(!1),27);case 27:throw E}})};function R9(e){for(var t=w(e.i.variants),n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(r){return r.audio})}f.Gj=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,r;return P(function(i){return i.g==1?T(i,RA(n),2):i.g!=3?(r=i.h,T(i,n.kc(e,t),3)):i.return(r)})},f.Lg=function(e,t){e=e===void 0?!1:e,t=t===void 0?!1:t;var n=this,r;return P(function(i){return i.g==1?T(i,RA(n,t),2):i.g!=3?(r=i.h,T(i,n.detach(e),3)):i.return(r)})};function RA(e,t){t=t===void 0?!1:t;var n,r;return P(function(i){if(i.g==1)return n=null,e.i&&e.H&&e.Qb&&e.T?(r=e.h.currentTime,e.U()&&!t&&(r=null),T(i,OA(e,e.T,r,e.Pb,!0,!1,!1),3)):i.s(2);if(i.g!=2){n=i.h,e.Ee.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null);var a=n,u=e.H,l=e.Qb;a.h=e.i,a.l=u,a.G=l,a=n,u=e.Fa,a.j=e.o,a.C=u,n.o=e.W,n.start(),e.i=null,e.H=null,e.Qb=null,e.o=null,e.Fa=null}return i.return(n)})}f.preload=function(e,t,n){t=t===void 0?null:t;var r=this,i;return P(function(a){return a.g==1?T(a,NA(r,e,t,n),2):((i=a.h)?i.start():id(r,new $(2,7,7005)),a.return(i))})},f.pf=function(){var e=this,t,n,r,i;return P(function(a){for(t=[],n=w(e.Ee),r=n.next();!r.done;r=n.next())i=r.value,i.u||t.push(i.destroy());return e.Ee=[],T(a,Promise.all(t),0)})};function NA(e,t,n,r,i){i=i===void 0?!1:i;var a,u,l;return P(function(p){return p.g==1?r?p.s(2):T(p,UA(e,t),3):(p.g!=2&&(r=p.h),N9(e,r)?p.return(null):(a=!1,u=!0,i&&(e.o&&e.Fa==e.g.abrFactory&&(u=!1),e.h&&e.h.nodeName==="AUDIO"&&(a=!0)),l=OA(e,t,n,r||null,!i,a,u),l=i?l.then(function(g){return g.A=!1,g}):l.then(function(g){return e.Ee.push(g),g}),p.return(l)))})}function OA(e,t,n,r,i,a,u){i=i===void 0?!0:i,a=a===void 0?!1:a,u=u===void 0?!0:u;var l,p,g,v,y,x,S,k,C,E,I,_,j,B;return P(function(q){return q.g==1?(l=null,p=Ua(e.g),a&&(p.manifest.disableVideo=!0),g=function(){return l.T&&l.u?null:l},v=function(){return g()?g().getConfiguration():e.g},e.ka.width!=1/0||e.ka.height!=1/0||e.g.ignoreHardwareResolution?q.s(2):T(q,t5(),3)):(q.g!=2&&(y=q.h,e.ka.width=y.width,e.ka.height=y.height),x=new Cb(p,e.ka,null),S={networkingEngine:e.F,filter:function(O){var R,H;return P(function(z){if(z.g==1)return T(z,v4(x,O),2);if(z.g!=4)return R=z.h,R?(H=on("trackschanged"),T(z,Promise.resolve(),4)):z.s(0);l.dispatchEvent(H),oe(z)})},makeTextStreamsForClosedCaptions:function(O){return Y9(e,O)},onTimelineRegionAdded:function(O){Wb(l.H,O)},onEvent:function(O){return l.dispatchEvent(O)},onError:function(O){return l.onError(O)},isLowLatencyMode:function(){return v().streaming.lowLatencyMode},updateDuration:function(){e.j&&l.T&&e.j.updateDuration()},newDrmInfo:function(O){var R=l.i,H=R?R.h:null;H&&R.A&&Ib(x,H.keySystem,O)},onManifestUpdated:function(){var O=new Map().set("isLive",e.U());l.dispatchEvent(on("manifestupdated",O)),kh(l,!1,function(){e.u&&e.u.onManifestUpdated(e.U())})},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},onMetadata:function(O,R,H,z){var Y=O;O=="com.apple.hls.interstitial"&&(Y="com.apple.quicktime.HLS",O={startTime:R,endTime:H,values:z},e.u)&&e.u.onHLSInterstitialMetadata(e,e.h,O),z=w(z),O=z.next();for(var K={};!O.done;K={Zf:void 0},O=z.next())K.Zf=O.value,K.Zf.name!="ID"&&kh(l,!1,function(J){return function(){k2(e,R,H,Y,J.Zf)}}(K))},disableStream:function(O){return e.disableStream(O,e.g.streaming.maxDisabledTime)},addFont:function(O,R){return e.addFont(O,R)}},k=new mh(function(){return e.Ra()}),k.addEventListener("regionadd",function(O){var R=O.region;_h(e,"timelineregionadded",R,l),kh(l,!1,function(){e.u&&(e.u.onDashTimedMetadata(R),e.u.onDASHInterstitialMetadata(e,e.h,R))})}),C=null,p.streaming.observeQualityChanges&&(C=new Cm(function(){return e.Fb()}),C.addEventListener("qualitychange",function(O){oE(e,O.quality,O.position)}),C.addEventListener("audiotrackchange",function(O){oE(e,O.quality,O.position,!0)})),E=!0,I={Xb:e.F,onError:function(O){return l.onError(O)},pe:function(O){kh(l,!0,function(){e:{var R=O,H=on("keystatuschanged");e.dispatchEvent(H);var z=Object.keys(R);z.length==1&&z[0]==""&&(z=["00"],R={"00":R[""]}),H=z.length==1&&z[0]=="00";var Y=!1;if(z.length){z=e.keySystem();for(var K=Qu(e.g.drm.clearKeys),J=w(e.i.variants),ae=J.next();!ae.done;ae=J.next()){ae=ae.value;var ne=[];ae.audio&&ne.push(ae.audio),ae.video&&ne.push(ae.video),ne=w(ne);for(var ue=ne.next();!ue.done;ue=ne.next()){var se=ue.value;if(ue=ae.allowedByKeySystem,se.keyIds.size)if(se.drmInfos.length&&!K.size){se=w(se.drmInfos);for(var he=se.next();!he.done;he=se.next())if(he=he.value,he.keyIds.size&&he.keySystem==z){ae.allowedByKeySystem=!0,he=w(he.keyIds);for(var xe=he.next();!xe.done;xe=he.next())xe=xe.value,((xe=R[H?"00":xe])||e.C.F)&&(ae.allowedByKeySystem=ae.allowedByKeySystem&&!!xe&&!Mb.includes(xe))}}else for(ae.allowedByKeySystem=!0,se=w(se.keyIds),he=se.next();!he.done;he=se.next())he=he.value,((he=R[H?"00":he])||e.C.F)&&(ae.allowedByKeySystem=ae.allowedByKeySystem&&!!he&&!Mb.includes(he));ue!=ae.allowedByKeySystem&&(Y=!0)}}}if(Y&&(Zr(e),!ul(e)))break e;(R=e.j.l)&&!R.allowedByKeySystem&&rd(e)}})},onExpirationUpdated:function(O,R){var H=on("expirationupdated");l.dispatchEvent(H),(H=l.l)&&H.onExpirationUpdated&&H.onExpirationUpdated(O,R)},onEvent:function(O){l.dispatchEvent(O),O.type=="drmsessionupdate"&&E&&(E=!1,O=Date.now()/1e3-l.ya,(e.A||l.getStats()).j=O,e.O&&a5(e.O))}},_=VA(e,g),W5(e.F,_),j=function(){return e.Lc(I)},B={config:p,$i:S,kj:k,jj:C,Lc:j,Zi:x,networkingEngine:_,Uh:i,Th:u},l=new Wi(t,r,n,B),q.return(l))})}function UA(e,t){var n,r;return P(function(i){return i.g==1?(n=e.g.manifest.retryParameters,T(i,sl(t,e.F,n),2)):(r=i.h,r=="application/x-mpegurl"&&dr()&&(r="application/vnd.apple.mpegurl"),i.return(r))})}function N9(e,t){if(!Za())return!0;if(t){if((e.h||e5()).canPlayType(t)=="")return!1;if(!Za()||!Bc.has(t))return!0;if(cb(t))return dr()&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if(t==="application/dash+xml"||t==="video/vnd.mpeg.dash.mpd")return e.g.streaming.preferNativeDash}return!1}function FA(e){var t=e.g.textDisplayFactory;t!==e.Se&&(e.B=t(),e.B.configure?e.B.configure(e.g.textDisplayer):ut("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.Se=t,e.B.setTextVisibility(e.oa))}function S2(e){var t,n,r;return P(function(i){if(i.g==1)return nd(e,"media-source"),e.h.removeAttribute("src"),js(e.h),FA(e),t=G9(e.h,e.B,{si:function(){return e.keySystem()},onMetadata:function(a,u,l){a=w(a);for(var p=a.next();!p.done;p=a.next())if(p=p.value,p.data&&typeof p.cueTime=="number"&&p.frames){var g=p.cueTime+u,v=l;v&&g>v&&(v=g);for(var y=w(p.frames),x=y.next();!x.done;x=y.next())k2(e,g,v,"org.id3",x.value);e.u&&e.u.onHlsTimedMetadata(p,g)}},ej:function(a){e.Ga&&Wb(e.Ga,{schemeIdUri:a.schemeIdUri,startTime:a.startTime,endTime:a.endTime,id:String(a.id),emsg:a})},onEvent:function(a){return e.dispatchEvent(a)},gj:function(){e.H&&e.H.update&&e.H.update()}},e.O),t.configure(e.g.mediaSource),n=e.g.manifest,r=n.segmentRelativeVttTiming,t.Ea=r,T(i,t.G,2);e.I=t,oe(i)})}function jA(e,t,n){function r(){return C2(e)}e.l.D(t,"playing",r),e.l.D(t,"pause",r),e.l.D(t,"ended",r),e.l.D(t,"ratechange",function(){var i=e.h.playbackRate;i!=0&&(e.K&&(e.K.set(i),e.m==Dr&&e.o.playbackRateChanged(i),QA(e,i)),i=on("ratechange"),e.dispatchEvent(i))}),t.remote&&(e.l.D(t.remote,"connect",function(){return Zr(e)}),e.l.D(t.remote,"connecting",function(){return Zr(e)}),e.l.D(t.remote,"disconnect",function(){return P(function(i){if(i.g==1)return e.j&&t.remote.state=="disconnected"?T(i,Nm(e.j),2):i.s(2);Zr(e),oe(i)})})),t.audioTracks&&(e.l.D(t.audioTracks,"addtrack",function(){return Zr(e)}),e.l.D(t.audioTracks,"removetrack",function(){return Zr(e)}),e.l.D(t.audioTracks,"change",function(){return Zr(e)})),t.textTracks&&(e.l.D(t.textTracks,"addtrack",function(i){if(i.track)switch(i=i.track,i.kind){case"metadata":V9(e,i);break;case"chapters":$9(e,i);break;default:Zr(e)}}),e.l.D(t.textTracks,"removetrack",function(){return Zr(e)}),e.l.D(t.textTracks,"change",function(){return Zr(e)}),e.g.streaming.crossBoundaryStrategy!=="keep"&&(e.l.D(t,"waiting",function(){e.j&&o2(e.j)}),e.l.D(t,"timeupdate",function(){e.j&&o2(e.j)}))),t.preload!="none"&&e.l.ma(t,"loadedmetadata",function(){e.A.C=Date.now()/1e3-n})}function O9(e,t,n,r){var i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae;return P(function(ne){switch(ne.g){case 1:for(nd(e,"load"),i=e.h,e.K=new gh({$d:function(){return i.playbackRate},sc:function(){return i.defaultPlaybackRate},mg:function(ue){i.playbackRate=ue},gh:function(ue){i.currentTime+=ue}}),jA(e,i,t),a=!1,u=w(e.i.variants),l=u.next();!l.done;l=u.next())p=l.value,(g=p.video&&p.video.dependencyStream)&&(a=o5(g));L9(e,e.g,a),e.Tb=e.g.preferredTextLanguage,e.Hd=e.g.preferredTextRole,e.Fd=e.g.preferForcedSubs,_2(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.o.init(function(ue,se,he){e.i&&e.j&&ue!=e.j.l&&Ih(e,ue,!0,se===void 0?!1:se,he===void 0?0:he)}),e.o.setMediaElement(i),e.o.setCmsdManager(e.fa),e.j=W9(e),e.j.configure(e.g.streaming),e.m=Dr,e.dispatchEvent(on("streaming")),v=n;case 2:for((x=e.j.l)||v||(v=ul(e)?e.o.chooseVariant():null),S=[],y=x||v,k=w([y.video,y.audio]),C=k.next();!C.done;C=k.next())(E=C.value)&&!E.segmentIndex&&(S.push(E.createSegmentIndex()),E.dependencyStream&&S.push(E.dependencyStream.createSegmentIndex()));if(!(0<S.length)){ne.s(4);break}return T(ne,Promise.all(S),4);case 4:if(!y||y.disabledUntilTime!=0){ne.s(2);break}if(e.H&&e.H.onInitialVariantChosen&&e.H.onInitialVariantChosen(y),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.Xe):Be("Low-latency 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.")),e.L&&(k9(e.L,e.i.isLowLatency&&e.g.streaming.lowLatencyMode),T9(e.L,1e3*t)),_2(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),_N(e.j,e.g.playRangeStart,e.g.playRangeEnd),I=function(ue){e.G=z9(e,ue),e.La=H9(e,ue),$A(e,i,!1)},e.g.streaming.startAtSegmentBoundary||(_=e.Y,_==null&&e.i.startTime&&(_=e.i.startTime),I(_)),x){ne.s(7);break}if(!e.g.streaming.startAtSegmentBoundary){ne.s(8);break}return j=e.i.presentationTimeline,B=e.Y||e.h.currentTime,e.Y==null&&e.i.startTime&&(B=e.i.startTime),q=j.Hb(),O=j.ob(),B<q?B=q:B>O&&(B=O),T(ne,J9(v,B),9);case 9:R=ne.h,I(R);case 8:Ih(e,v,!0,!1,0);case 7:return e.G.ready(),H=e.vc().find(function(ue){return ue.active}),H||((z=Rc(e.i.textStreams,e.Tb,e.Hd,e.Fd)[0]||null)&&d2(e.A.h,z,!0),v&&(z?(V5(v.audio,z,e.g)&&(e.oa=!0),e.oa&&e.B.setTextVisibility(!0),iE(e)):e.oa=!1),z&&(e.g.streaming.alwaysStreamText||e.Pf())&&(Dm(e.j,z),Mh(e))),T(ne,e.j.start(r),10);case 10:e.g.abr.enabled&&(e.o.enable(),aE(e)),Zr(e),ul(e),e.i.variants.some(function(ue){return ue.primary}),((Y=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(K=function(){return ZA(e)},e.l.D(i,"timeupdate",K)),Y||(J=function(){return Zm(e)},e.l.D(i,"timeupdate",J),Zm(e),e.i.nextUrl&&(0<e.g.streaming.preloadNextUrlWindow&&(ae=function(){var ue;return P(function(se){if(se.g==1)return ue=e.Ra().end-e.h.currentTime,isNaN(ue)||!(ue<=e.g.streaming.preloadNextUrlWindow)?se.s(0):(e.l.Ja(i,"timeupdate",ae),T(se,e.preload(e.i.nextUrl),4));e.ya=se.h,oe(se)})},e.l.D(i,"timeupdate",ae)),e.l.D(i,"ended",function(){e.load(e.ya||e.i.nextUrl)}))),e.u&&e.u.onManifestUpdated(Y),e.sa=!0,oe(ne)}})}function U9(e,t){var n,r,i,a,u;return P(function(l){return l.g==1?(n=zn,r=Date.now()/1e3,i=!0,e.C=e.Lc({Xb:e.F,onError:function(p){id(e,p)},pe:function(){},onExpirationUpdated:function(){var p=on("expirationupdated");e.dispatchEvent(p)},onEvent:function(p){e.dispatchEvent(p),p.type=="drmsessionupdate"&&i&&(i=!1,e.A.j=Date.now()/1e3-r)}}),e.C.configure(e.g.drm),a={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},u={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:t?di(t):"",codecs:t?pi(t):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.la,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},u.fullMimeTypes.add(Dn(u.mimeType,u.codecs)),t.startsWith("audio/")?(u.type=n.V,a.audio=u):a.video=u,e.C.Z=!0,T(l,n4(e.C,[a],[]),2)):T(l,e.C.Lb(e.h),0)})}function F9(e,t,n){var r,i,a,u,l,p,g,v,y,x,S,k;return P(function(C){switch(C.g){case 1:if(nd(e,"src-equals"),r=e.h,e.G=new Z4(r),i=!1,e.Cd.push(function(){i=!0}),e.Y!=null&&e.G.af(e.Y),e.La=q9(e,e.Y||0),e.K=new gh({$d:function(){return r.playbackRate},sc:function(){return r.defaultPlaybackRate},mg:function(E){r.playbackRate=E},gh:function(E){r.currentTime+=E}}),$A(e,r,!0),r.textTracks&&(FA(e),a=function(){var E=Ch(e).find(function(I){return I.mode!=="disabled"});E&&(E.mode="showing")},u=function(){var E=Ch(e).find(function(I){return I.mode!=="disabled"});E&&(E.mode="hidden")},e.l.D(r,"enterpictureinpicture",function(){return a()}),e.l.D(r,"leavepictureinpicture",function(){return u()}),r.remote?(e.l.D(r.remote,"connect",function(){return u()}),e.l.D(r.remote,"connecting",function(){return u()}),e.l.D(r.remote,"disconnect",function(){return u()})):"webkitCurrentPlaybackTargetIsWireless"in r&&e.l.D(r,"webkitcurrentplaybacktargetiswirelesschanged",function(){return u()}),l=r,l.webkitSupportsFullscreen&&e.l.D(l,"webkitpresentationmodechanged",function(){l.webkitPresentationMode!="inline"?a():u()})),jA(e,r,t),p=A9(e.L,e.T,n),!p.includes("#t=")&&(0<e.g.playRangeStart||isFinite(e.g.playRangeEnd))&&(p+="#t=",0<e.g.playRangeStart&&(p+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(p+=","+e.g.playRangeEnd)),!e.I){C.s(2);break}return T(C,e.I.destroy(),3);case 3:e.I=null;case 2:return js(r),r.src=p,(Na()||_o())&&r.load(),r.preload!="none"&&!r.autoplay&&cb(n)&&dr()&&r.load(),e.m=Mi,e.dispatchEvent(on("streaming")),g=new Wt,Xc(r,HTMLMediaElement.HAVE_METADATA,e.l,function(){e.G.ready(),g.resolve()}),v=function(){return new Promise(function(E){var I=new Tt(E);e.l.D(r.textTracks,"change",function(){return I.da(.5)}),I.da(.5)})},Xc(r,HTMLMediaElement.HAVE_CURRENT_DATA,e.l,function(){var E,I,_,j,B;return P(function(q){if(q.g==1)return T(q,v(),2);if(i)return q.return();for(j9(e),E=Ch(e),E.some(function(O){return O.mode==="showing"})&&(e.oa=!0,e.B.setTextVisibility(!0)),E.length&&(e.B.enableTextDisplayer?e.B.enableTextDisplayer():ut("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),I=!1,_=w(E),j=_.next();!j.done;j=_.next())B=j.value,B.mode!=="disabled"&&(I?(B.mode="disabled",Be("Found more than one enabled text track, disabling it",B)):(WA(e,B),I=!0));B9(e),oe(q)})}),r.error?g.reject(M2(e)):r.preload=="none"&&(Be('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.'),g.resolve()),e.l.ma(r,"error",function(){g.reject(M2(e))}),T(C,Zp(e.g.streaming.loadTimeout,g),4);case 4:((y=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(x=function(){return ZA(e)},e.l.D(r,"timeupdate",x)),y||(S=function(){return Zm(e)},e.l.D(r,"timeupdate",S),Zm(e)),e.u&&(e.u.onManifestUpdated(y),y&&(k=e.Ra().end,e.l.D(r,"progress",function(){var E=e.Ra().end;k!=E&&(e.u.onManifestUpdated(e.U()),k=E)}))),e.sa=!0,oe(C)}})}function j9(e){var t=e.g.preferredAudioLanguage;t!=""&&e.sh(t,e.g.preferredVariantRole)}function B9(e){var t=e.g.preferredTextLanguage;t!=""&&e.hg(t,e.g.preferredTextRole,e.g.preferForcedSubs)}function V9(e,t){if(t.kind=="metadata"){t.mode="hidden",e.l.D(t,"cuechange",function(){if(t.activeCues)for(var r=w(t.activeCues),i=r.next();!i.done;i=r.next())i=i.value,k2(e,i.startTime,i.endTime,i.type,i.value),e.u&&e.u.onCueMetadataChange(i.value);if(t.cues){r=[],i=w(t.cues);for(var a=i.next(),u={};!a.done;u={bc:void 0},a=i.next())u.bc=a.value,u.bc.type=="com.apple.quicktime.HLS"&&u.bc.startTime!=null&&(a=r.find(function(l){return function(p){return p.startTime==l.bc.startTime&&p.endTime==l.bc.endTime}}(u)),a||(a={startTime:u.bc.startTime,endTime:u.bc.endTime,values:[]},r.push(a)),a.values.push(u.bc.value));for(r=w(r),i=r.next();!i.done;i=r.next())i=i.value,i.values.some(function(l){return l.key=="X-ASSET-URI"||l.key=="X-ASSET-LIST"})&&e.u&&(i.values.push({key:"CUE",description:"",data:i.startTime!=0||e.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.u.onHLSInterstitialMetadata(e,e.h,i))}});var n=new Tt(function(){var r=X9(e);r=w(r);for(var i=r.next();!i.done;i=r.next())i.value.mode="hidden"}).sb().da(.5);e.Cd.push(function(){n.stop()})}}function BA(e,t){t=new Map().set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(on("metadata",t))}function k2(e,t,n,r,i){e.Aa&&(t={schemeIdUri:r,startTime:t,endTime:n||1/0,id:"",payload:i},t.id=JSON.stringify(t),Wb(e.Aa,t))}function $9(e,t){if(t&&t.kind=="chapters"){t.mode="hidden";var n=new Tt(function(){t.mode="hidden"}).sb().da(.5);e.Cd.push(function(){n.stop()})}}f.oj=function(){for(var e=this.Z;e.g;)e.release()},f.Lc=function(e){return new pm(e)};function VA(e,t){function n(i){t()?t().dispatchEvent(i):e.dispatchEvent(i)}function r(i){t()?kh(t(),!0,i):i()}return t||(t=function(){return null}),new an(function(i,a,u,l){var p=t()?t().j:e.o;p&&p.segmentDownloaded(i,a,u,l)},function(i,a,u){a=new Map().set("headers",i).set("request",a).set("requestType",u),n(on("downloadheadersreceived",a)),r(function(){if(e.fa){var l=e.fa;if(l.h.enabled){var p=i["cmsd-static"];if(p)try{var g=new Map,v=p.split(",");for(p=0;p<v.length;p++){var y=v[p].split("=");g.set(y[0],CA(y[1]))}}catch{}if(g=i["cmsd-dynamic"]){try{var x=new Map,S=g.split(";");for(g=1;g<S.length;g++){var k=S[g].split("=");x.set(k[0],CA(k[1]))}var C=x}catch{C=null}C&&(l.g=C)}}}})},function(i,a){i=new Map().set("request",i).set("response",a),n(on("downloadcompleted",i))},function(i,a,u,l){i=new Map().set("request",i).set("error",a).set("httpResponseCode",u).set("aborted",l),n(on("downloadfailed",i))},function(i,a,u){r(function(){var l=e.L,p=u;if(p=p===void 0?{}:p,l.g.enabled)if(a.method==="HEAD")td(l,a);else switch(i){case 0:try{if(l.g.enabled){if(p.type){e:{switch(p.type){case 4:var g=l.l?Xm:Wm;break e;case 3:case 2:g=l.l?Jm:Ym;break e;case 5:g="s";break e}g=void 0}l.i=g}td(l,a,{ot:AA,su:!l.u})}}catch(ne){$t("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",ne)}break;case fa:try{if(l.g.enabled){var v=p.segment;g=0,v&&(g=v.endTime-v.startTime);var y={d:1e3*g,st:l.h.U()?"l":"v"};y.ot=I9(p);var x=y.ot===qm||y.ot===Hm||y.ot===Gm||y.ot===Km,S=p.stream;if(S){var k=l.h.gb();if(x&&(y.bl=M9(l,S.type),y.ot!==Km)){var C=TA(l,S.type);y.dl=k?C/Math.abs(k):C}if(S.bandwidth&&(y.br=S.bandwidth/1e3),S.segmentIndex&&v){var E=S.segmentIndex.Gb(v.endTime,!0,0>k);if(E){var I=E.next().value;if(I&&I!=v){if(!Ac(v.N(),I.N())){var _=I.N()[0],j=a.uris[0],B=new URL(_),q=new URL(j);if(B.origin!==q.origin)var O=_;else{for(var R=B.pathname.split("/").slice(1),H=q.pathname.split("/").slice(1,-1);R[0]===H[0];)R.shift(),H.shift();for(;H.length;)H.shift(),R.unshift("..");O=R.join("/")}y.nor=O}if((I.Sa||I.wa)&&(v.Sa!=I.Sa||v.wa!=I.wa)){var z=I.Sa+"-";I.wa&&(z+=I.wa),y.nrr=z}}}var Y=l.h.gb()||1,K=TA(l,S.type)||500,J=S.bandwidth,ae=J?J*(v.endTime-v.startTime)/1e3/(K/Y/1e3)*l.g.rtpSafetyFactor:NaN;isNaN(ae)||(y.rtp=ae)}}x&&y.ot!==Km&&(y.tb=_9(l,y.ot)/1e3),td(l,a,y)}}catch(ne){$t("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",ne)}break;case 2:case 5:case 6:td(l,a,{ot:"k"});break;case 4:td(l,a,{ot:"o"})}})},function(i,a,u,l){(i=t()?t().l:e.H)&&i.banLocation&&i.banLocation(l)},function(i,a){if(a.data){a=a.data.byteLength;var u=t()?t().getStats():e.A;u&&(u.mc=isNaN(u.mc)?a:u.mc+a,i===0&&(u.bh=a))}})}function z9(e,t){return new eA(e.h,e.i,e.g.streaming,t,function(){e.La&&iA(e.La,!0),e.j&&e.j.Fc(),e.M&&io(e)},function(n){return e.dispatchEvent(n)})}function H9(e,t){var n=e.U()||0<t;t=new ol(e.yd,n),t.addEventListener("enter",function(a){_h(e,"timelineregionenter",a.region)}),t.addEventListener("exit",function(a){_h(e,"timelineregionexit",a.region)}),t.addEventListener("skip",function(a){var u=a.region;a.seeking||(_h(e,"timelineregionenter",u),_h(e,"timelineregionexit",u))});var r=new ol(e.Aa,n);r.addEventListener("enter",function(a){BA(e,a.region)}),n=new ol(e.Ga,n),n.addEventListener("enter",function(a){a=new Map().set("detail",a.region.emsg),e.dispatchEvent(on("emsg",a))});var i=new Kb(e.h);return i.g.add(t),i.g.add(r),i.g.add(n),e.xd&&i.g.add(e.xd),i}function q9(e,t){t=new ol(e.Aa,0<t),t.addEventListener("enter",function(r){BA(e,r.region)});var n=new Kb(e.h);return n.g.add(t),n}function $A(e,t,n){e.M=new MR,e.M.g=jc,zA(e),E2(e),e.pa=new Tt(function(){io(e)}),e.g.streaming.rebufferingGoal&&e.pa.ua(.25),e.l.D(t,"waiting",function(){return io(e)}),e.l.D(t,"canplaythrough",function(){return io(e)}),e.l.D(t,"playing",function(){return io(e)}),e.l.D(t,"seeked",function(){return io(e)}),n&&(e.l.D(t,"stalled",function(){return io(e)}),e.l.D(t,"progress",function(){return io(e)}),e.l.D(t,"timeupdate",function(){return io(e)}))}function zA(e){var t=e.g.streaming.rebufferingGoal;e.M.i.set(sh,Math.min(.5,t/2)).set(jc,t)}function io(e){switch(e.m){case Mi:if(e.Uc())var t=!0;else{var n=Db(e.h.buffered);t=n!=null&&n>=e.h.duration-1}break;case Dr:e:if(e.Uc()||rl(e.I))t=!0;else{if(e.i.presentationTimeline.U()){n=e.i.presentationTimeline.cc();var r=Db(e.h.buffered);if(r!=null&&r>=n){t=!0;break e}}t=!1}break;default:t=!1}r=P4(e.h.buffered,e.h.currentTime),n=e.M;var i=t,a=n.i.get(n.g);t=n.g,r=i||r>=a&&0<r?sh:jc,n.g=r,(t=t!=r)&&r===sh&&(n.h=Date.now()),t&&E2(e)}function G9(e,t,n,r){return new j4(e,t,n,r)}function K9(e){return new m2({getBandwidthEstimate:function(){return e.o?e.o.getBandwidthEstimate():NaN},Fb:function(){return e.Fb()},getCurrentTime:function(){return e.h?e.h.currentTime:0},gb:function(){return e.gb()},xb:function(){return e.xb()},Rb:function(){return e.Rb()},U:function(){return e.U()},Zd:function(){return e.Zd()}},e.g.cmcd)}function W9(e){return new cA(e.i,{Rc:function(){return e.G?e.G.Od():0},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},gb:function(){return e.gb()},video:e.h,aa:e.I,Xb:e.F,onError:function(t){return id(e,t)},onEvent:function(t){return e.dispatchEvent(t)},qe:function(t,n,r){var i=t.startTime;if(t=t.endTime,n=n.type,n!=wt){if(e.G){e.G.ih();var a=Bb(e.I,n);!e.U()&&e.h.paused&&!e.h.seeking&&a!=null&&0<a&&e.G.Od()<a&&e.G.af(a)}io(e)}r=new Map().set("start",i).set("end",t).set("contentType",n).set("isMuxed",r),e.dispatchEvent(on("segmentappended",r))},fj:function(t,n){(n=n.Wc)&&e.xd&&xN(e.xd,n,t)},Fg:function(t,n){var r=e.C;if(r.g.parseInbandPsshEnabled&&!r.F&&["audio","video"].includes(t)){t=new kb(Ye(n)),n=0;for(var i=w(t.data),a=i.next();!a.done;a=i.next())n+=a.value.length;if(n==0)r=Promise.resolve();else{for(n=new Uint8Array(n),i=0,t=w(t.data),a=t.next();!a.done;a=t.next())a=a.value,n.set(a,i),i+=a.length;ih(r,"cenc",n),r=r.m}}else r=Promise.resolve();return r},disableStream:function(t,n){return e.disableStream(t,n)}})}f.configure=function(e,t){if(arguments.length==2&&typeof e=="string"&&(e=Um(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(ut("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(ut("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming&&(ut("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&dr(),delete e.streaming.useNativeHlsOnSafari),e.streaming&&typeof e.streaming.liveSync=="boolean"){ut("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var n=e.streaming.liveSync;e.streaming.liveSync={},e.streaming.liveSync.enabled=n}if(e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){n=e.streaming.liveSyncMinLatency||0;var r=Math.abs((e.streaming.liveSyncMaxLatency||1)-n)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=n+r,e.streaming.liveSync.targetLatencyTolerance=r}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(ut("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(ut("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(ut("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(ut("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(ut("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(ut("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(ut("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(ut("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){ut("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var i=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return i},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(ut("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(ut("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(ut("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(ut("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(ut("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.manifest&&e.manifest.dash&&"ignoreSupplementalCodecs"in e.manifest.dash&&(ut("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.dash.ignoreSupplementalCodecs,delete e.manifest.dash.ignoreSupplementalCodecs),e.manifest&&e.manifest.hls&&"ignoreSupplementalCodecs"in e.manifest.hls&&(ut("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.hls.ignoreSupplementalCodecs,delete e.manifest.hls.ignoreSupplementalCodecs),e.manifest&&e.manifest.dash&&"updatePeriod"in e.manifest.dash&&(ut("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.dash.updatePeriod,delete e.manifest.dash.updatePeriod),e.manifest&&e.manifest.hls&&"updatePeriod"in e.manifest.hls&&(ut("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.hls.updatePeriod,delete e.manifest.hls.updatePeriod),e.manifest&&e.manifest.dash&&"ignoreDrmInfo"in e.manifest.dash&&(ut("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),e.manifest.ignoreDrmInfo=e.manifest.dash.ignoreDrmInfo,delete e.manifest.dash.ignoreDrmInfo),e.drm&&e.drm.advanced){n=!1;for(var a in e.drm.advanced){var u=e.drm.advanced[a];r=u.videoRobustness,u=u.audioRobustness,"videoRobustness"in e.drm.advanced[a]&&!Array.isArray(e.drm.advanced[a].videoRobustness)&&(e.drm.advanced[a].videoRobustness=[r],n=!0),"audioRobustness"in e.drm.advanced[a]&&!Array.isArray(e.drm.advanced[a].audioRobustness)&&(e.drm.advanced[a].audioRobustness=[u],n=!0)}n&&ut("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}return e.streaming&&"crossBoundaryStrategy"in e.streaming&&e.streaming.crossBoundaryStrategy!="keep"&&(e.streaming.inaccurateManifestTolerance=0),a=Bs(this.g,e,Go(this)),HA(this),a},f.ci=function(e){this.Xe=e};function HA(e){if(e.te=new Cb(e.g,e.ka,e.C),e.H){var t=Ua(e.g.manifest);e.h&&e.h.nodeName==="AUDIO"&&(t.disableVideo=!0),e.H.configure(t)}if(e.C&&e.C.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{e.m!=ga&&b4(e.te,e.i)&&Zr(e)}catch(i){id(e,i)}e.o&&ul(e),t=e.j.l,!t||t.allowedByApplication&&t.allowedByKeySystem||rd(e)}if(e.F&&(e.F.kg(e.g.streaming.forceHTTP),e.F.lg(e.g.streaming.forceHTTPS),e.F.o=e.g.streaming.minBytesForProgressEvents),e.I&&(e.I.configure(e.g.mediaSource),e.I.Ea=e.g.manifest.segmentRelativeVttTiming),e.B)if(t=e.g.textDisplayFactory,e.Se!=t){var n=e.B;if(e.B=t(),e.B.configure?e.B.configure(e.g.textDisplayer):ut("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.B.setTextLanguage||ut("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),e.B.setTextVisibility(n.isTextVisible()),n.destroy(),e.I){n=e.I;var r=e.B;n.ea=r,n.h&&(n.h.j=r)}e.Se=t,e.j&&(t=e.j,(n=t.i.get(wt))&&Yc(t,n.stream,!0,0,!0))}else e.B.configure&&e.B.configure(e.g.textDisplayer);e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),aE(e)),e.M&&zA(e),e.pa&&(e.g.streaming.rebufferingGoal?e.pa.ua(.25):e.pa.stop()),e.i&&_2(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.u&&e.u.configure(e.g.ads),e.L&&e.L.configure(e.g.cmcd),e.fa&&e.fa.configure(e.g.cmsd)}f.getConfiguration=function(){var e=Go(this);return Bs(e,this.g,Go(this)),e},f.ki=function(){return this.Xe},f.Vg=function(){var e=Go(this);return Bs(e,this.g,Go(this)),hA(this.g,Go(this))},f.Qg=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(t=Math.min(this.h.currentTime+t,this.Ra().end),e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},f.sj=function(){for(var e in this.g)delete this.g[e];Bs(this.g,Go(this),Go(this)),HA(this)},f.ti=function(){return this.m},f.Tg=function(){return this.i?this.i.type:null},f.xi=function(){return this.h},f.xb=function(){return this.F},f.Qc=function(){return this.T},f.Pg=function(){return this.u?this.u:null},f.U=function(){return this.i&&!this.Pa()?this.i.presentationTimeline.U():this.h&&this.h.src?this.h.duration==1/0:!1},f.yc=function(){return this.i?this.i.presentationTimeline.yc():!1},f.Qi=function(){if(this.i&&!this.Pa()){var e=this.i.variants;return e.length?!e[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1},f.Ra=function(){if(this.i&&!this.Pa()){if(!this.sa&&this.i.type=="HLS")return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Hb(),end:e.ob()}}if(this.h&&this.h.src&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return e=Math.min(e.end(e.length-1),n),{start:t,end:e}}return{start:0,end:0}},f.Ni=function(){this.U()&&(this.h.currentTime=this.Ra().end)},f.Ri=function(){return this.sa},f.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},f.drmInfo=function(){return this.C?this.C.h:null},f.pd=function(){return this.C?this.C.pd():1/0},f.Gf=function(){return this.C?this.C.Gf():[]},f.Yd=function(){return this.C?this.C.Yd():{}},f.Of=function(){return this.M?this.M.g==jc:!1},f.gb=function(){return this.h?this.K?this.K.i:1:0},f.Md=function(e,t){t=t===void 0?!0:t,e==0?Be("A trick play rate of 0 is unsupported!"):(this.K.set(e),this.m==Dr&&(this.o.playbackRateChanged(e),Zb(this.j,t&&1<Math.abs(e))),QA(this,e))},f.gd=function(){var e=this.K.sc();this.m==Mi&&this.K.set(e),this.m==Dr&&(this.K.set(e),this.o.playbackRateChanged(e),Zb(this.j,!1)),this.Na.Qa()},f.Rb=function(){if(this.i&&!this.Pa()){for(var e=this.j?this.j.l:null,t=[],n=0,r=w(this.i.variants),i=r.next();!i.done;i=r.next())if(i=i.value,rh(i)){var a=Xu(i);a.active=i==e,a.active||n==1||e==null||i.video!=e.video||i.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(u){return vb(u)}):[]},f.vc=function(){if(this.i&&!this.Pa()){for(var e=this.j?this.j.u:null,t=[],n=w(this.i.textStreams),r=n.next();!r.done;r=n.next()){r=r.value;var i=nh(r);i.active=r==e,t.push(i)}return t}return this.h&&this.h.src&&this.h.textTracks?Ch(this).map(function(a){return O5(a)}):[]},f.pi=function(){var e=this.Oe;return this.i&&(e=this.i.imageStreams),e.map(function(t){return gb(t)})},f.fi=function(e){var t=this,n,r;return P(function(i){return i.g==1?T(i,GA(t,e),2):(n=i.h,n?(r=[],n.segmentIndex.Eb(function(a){var u=qA(a.tilesLayout||n.tilesLayout);if(u){u=u.rows*u.oc;for(var l=a.j-a.startTime,p=0;p<u;p++){var g=KA(n,a.startTime+l*p/u);g&&r.push(g)}}}),n.closeSegmentIndex&&n.closeSegmentIndex(),i.return(r)):i.return(null))})};function qA(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{oc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}f.Hi=function(e,t){var n=this,r;return P(function(i){return i.g==1?T(i,GA(n,e),2):(r=i.h)?i.return(KA(r,t)):i.return(null)})};function GA(e,t){var n,r;return P(function(i){return i.g==1?e.m!=Dr&&e.m!=Mi||(n=e.Oe,e.i&&(n=e.i.imageStreams),r=n[0],!r)?i.return(null):(t!=null&&(r=n.find(function(a){return a.id==t})),r?r.segmentIndex?i.s(2):T(i,r.createSegmentIndex(),2):i.return(null)):i.return(r)})}function KA(e,t){var n=e.segmentIndex.find(t);if(n==null)return null;n=e.segmentIndex.get(n);var r=qA(n.tilesLayout||e.tilesLayout);if(!r)return null;var i=e.width||0,a=e.height||0,u=i/r.oc,l=a/r.rows,p=r.oc*r.rows,g=n.j-n.startTime;g=n.B||g/p;var v=n.startTime,y=0,x=0;return 1<p&&(t=Math.floor((t-n.startTime)/g),v=n.startTime+t*g,y=t%r.oc*u,x=Math.floor(t/r.oc)*l),t=!1,(r=n.thumbnailSprite)&&(t=!0,l=r.height,y=r.positionX,x=r.positionY,u=r.width),{segment:n,imageHeight:a,imageWidth:i,height:l,positionX:y,positionY:x,startTime:v,duration:g,uris:n.N(),width:u,sprite:t,mimeType:n.mimeType||e.mimeType,codecs:n.codecs||e.codecs}}f.th=function(e){function t(){var r=n.i.textStreams.find(function(i){return i.id==e.id});r&&r!=n.j.u&&(d2(n.A.h,r,!1),Dm(n.j,r),ev(n),Mh(n),n.Tb=r.language)}var n=this;this.i&&this.G&&(t(),!this.Pa())||function(){if(n.h&&n.h.textTracks){var r=Ch(n),i=r.find(function(a){return a.mode!=="disabled"});(r=r.find(function(a){return mb(a)===e.id}))&&(i!==r&&(i&&(i.mode="disabled",n.l.Ja(i,"cuechange"),n.B.remove(0,1/0)),r&&WA(n,r)),ev(n),Mh(n))}}()};function WA(e,t){e.l.D(t,"cuechange",function(){e.B.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},r=[],i=Array.from(t.activeCues||[]);i=w(i);for(var a=i.next();!a.done;a=i.next()){if(a=a.value,a.endTime===1/0||a.endTime<a.startTime)a=null;else{var u=new un(a.startTime,a.endTime,a.text);u.line=typeof a.line=="number"?a.line:null,a.lineAlign&&(u.lineAlign=a.lineAlign),u.lineInterpretation=a.snapToLines?Jp:1,u.position=typeof a.position=="number"?a.position:null,a.positionAlign&&(u.positionAlign=a.positionAlign),u.size=a.size,u.textAlign=a.align,a.vertical==="lr"?u.writingMode="vertical-lr":a.vertical==="rl"&&(u.writingMode="vertical-rl"),a.region&&(u.region.id=a.region.id,u.region.height=a.region.lines,u.region.heightUnits=2,u.region.regionAnchorX=a.region.regionAnchorX,u.region.regionAnchorY=a.region.regionAnchorY,u.region.scroll=a.region.scroll,u.region.viewportAnchorX=a.region.viewportAnchorX,u.region.viewportAnchorY=a.region.viewportAnchorY,u.region.viewportAnchorUnits=ci,u.region.width=a.region.width,u.region.widthUnits=ci),Qg(u),a=u}a&&((u=e.g.mediaSource.modifyCueCallback)&&u(a,null,n),r.push(a))}e.B.append(r)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}f.Be=function(e,t,n){function r(){var a=i.i.variants.find(function(l){return l.id==e.id});if(a&&rh(a)){var u=i.j.l;i.g.abr.enabled&&(u.video!=a.video||u.audio&&a.audio&&u.audio.language==a.audio.language&&u.audio.channelsCount==a.audio.channelsCount&&u.audio.label==a.audio.label)&&Be("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),i.Pa()?Ih(i,a,!1,!1,0):Ih(i,a,!1,t||!1,n||0),i.W.configure({language:a.language,role:a.audio&&a.audio.roles&&a.audio.roles[0]||"",channelCount:a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,Sc:a.video&&a.video.hdr?a.video.hdr:"",spatialAudio:a.audio&&a.audio.spatialAudio?a.audio.spatialAudio:!1,videoLayout:a.video&&a.video.videoLayout?a.video.videoLayout:"",Kc:a.audio&&a.audio.label?a.audio.label:"",fd:"",codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:a.audio&&a.audio.codecs?a.audio.codecs:""}),ul(i)}}var i=this;t=t===void 0?!1:t,n=n===void 0?0:n,!(this.i&&this.G&&(r(),!this.Pa()))&&function(){if(i.h&&i.h.audioTracks){var a=Array.from(i.h.audioTracks);a=w(a);for(var u=a.next();!u.done;u=a.next())if(u=u.value,mb(u)==e.id){eE(i,u);break}}}()},f.xj=function(e,t){t=t===void 0?0:t;var n=this.Rb();if(n.length){var r=n.find(function(i){return i.active});r&&(n=n.find(function(i){return i.videoId===r.videoId&&i.language==e.language&&i.label==e.label&&i.audioMimeType==e.mimeType&&i.audioCodec==e.codecs&&i.primary==e.primary&&Ac(i.audioRoles,e.roles)&&i.accessibilityPurpose==e.accessibilityPurpose&&i.channelsCount==e.channelsCount&&i.audioSamplingRate==e.audioSamplingRate&&i.spatialAudio==e.spatialAudio}))&&!n.active&&this.Be(n,!0,t)}},f.getAudioTracks=function(){var e=this.Rb();if(!e.length)return[];var t=e.find(function(i){return i.active});if(!t)return[];var n=e;if(this.m==Dr&&(n=e.filter(function(i){return i.originalVideoId===t.originalVideoId&&i.audioCodec})),!n.length)return[];e=new Set,n=w(n);for(var r=n.next();!r.done;r=n.next())r=r.value,e.add({active:r.active,language:r.language,label:r.label,mimeType:r.audioMimeType,codecs:r.audioCodec,primary:r.primary,roles:r.audioRoles||[],accessibilityPurpose:r.accessibilityPurpose,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,originalLanguage:r.originalLanguage});return e.size?Array.from(e):[]},f.hi=function(){return uE(this.Rb())},f.Fi=function(){return uE(this.vc())},f.gi=function(){return Array.from(sE(this.Rb()))},f.Ei=function(){return Array.from(sE(this.vc()))},f.sh=function(e,t,n,r,i,a,u){function l(){function g(k,C){return k.video||C.video?k.video&&C.video?Math.abs((k.video.height||0)-(C.video.height||0))+Math.abs((k.video.width||0)-(C.video.width||0)):1/0:0}p.W=p.g.adaptationSetCriteriaFactory(),p.W.configure({language:e,role:t||"",channelCount:n||0,Sc:"",spatialAudio:a||!1,videoLayout:"",Kc:u||"",fd:"",codecSwitchingStrategy:p.g.mediaSource.codecSwitchingStrategy,audioCodec:i||""});var v=p.j.l,y=p.W.create(p.i.variants),x=null;y=w(y.values());for(var S=y.next();!S.done;S=y.next())S=S.value,rh(S)&&(!x||g(x,v)>g(S,v))&&(x=S);x!=v&&(x?(v=Xu(x),p.Be(v,!0,r||0)):rd(p))}var p=this;n=n===void 0?0:n,r=r===void 0?0:r,i=i===void 0?"":i,a=a===void 0?!1:a,u=u===void 0?"":u,!(this.i&&this.G&&(l(),!this.Pa()))&&function(){if(p.h&&p.h.audioTracks){var g=Rc(p.Rb(),e,t||"",!1)[0];g&&p.Be(g)}}()},f.hg=function(e,t,n){function r(){i.Tb=e,i.Hd=t||"",i.Fd=n||!1;var a=Rc(i.i.textStreams,i.Tb,i.Hd,i.Fd)[0]||null;a&&a!=i.j.u&&(d2(i.A.h,a,!1),i.g.streaming.alwaysStreamText||i.Pf())&&(Dm(i.j,a),ev(i),Mh(i))}var i=this;n=n===void 0?!1:n,!(this.i&&this.G&&(r(),!this.Pa()))&&function(){var a=Rc(i.vc(),e,t||"",n||!1)[0];a&&i.th(a)}()},f.yj=function(e,t,n){function r(){for(var a=null,u=w(i.i.variants),l=u.next();!l.done;l=u.next())if(l=l.value,l.audio.label==e){a=l;break}a!=null&&(i.W=i.g.adaptationSetCriteriaFactory(),i.W.configure({language:a.language,role:"",channelCount:0,Sc:"",spatialAudio:!1,videoLayout:"",fd:"",Kc:e,codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),rd(i,t,n))}var i=this;t=t===void 0?!0:t,n=n===void 0?0:n,!(this.i&&this.G&&(r(),!this.Pa()))&&function(){if(i.h&&i.h.audioTracks){var a=Array.from(i.h.audioTracks),u=null;a=w(a);for(var l=a.next();!l.done;l=a.next())l=l.value,l.label==e&&(u=l);u&&eE(i,u)}}()},f.Pf=function(){var e=this.oa;return this.B?this.B.isTextVisible():e},f.Rg=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?XA(this).map(function(e){return O5(e)}):[]},f.ji=function(e){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var t=Jt(e),n=XA(this).filter(function(l){return Jt(l.language)==t});if(!n||!n.length)return[];e=[];var r=new Set;n=w(n);for(var i=n.next();!i.done;i=n.next())if((i=i.value)&&i.cues){i=w(i.cues);for(var a=i.next();!a.done;a=i.next()){var u=a.value;(a=u.id)&&a!=""||(a=u.startTime+"-"+u.endTime+"-"+u.text),u={id:a,title:u.text,startTime:u.startTime,endTime:u.endTime},r.has(a)||(e.push(u),r.add(a))}}return e};function Ch(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind!="metadata"&&t.kind!="chapters"&&t.label!="Shaka Player TextTrack"})}function X9(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="metadata"})}function XA(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="chapters"})}f.zh=function(e){e=!!e,this.oa!=e&&(this.oa=e,this.m==Dr?(this.B.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.u||(e=Rc(this.i.textStreams,this.Tb,this.Hd,this.Fd),0<e.length&&(Dm(this.j,e[0]),ev(this),Mh(this))):PN(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.B.setTextVisibility(e),iE(this))},f.yi=function(){if(this.G)var e=this.G.Od();else{if(this.Y==null)return new Date;e=this.Y}if(this.i&&!this.Pa()){var t=this.i.presentationTimeline;return new Date(1e3*((t.m||t.i)+e))}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null},f.Wg=function(){if(this.i&&!this.Pa()){var e=this.i.presentationTimeline;return new Date(1e3*(e.m||e.i))}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),isNaN(e.getTime())?null:e):null},f.ae=function(){return this.U()&&this.i?this.i.presentationTimeline.ae():null},f.Fb=function(){if(this.m==Dr)return this.I.Fb();var e={total:[],audio:[],video:[],text:[]};return this.m==Mi&&(e.total=$o(this.h.buffered)),e},f.Zd=function(){if(!this.h||!this.h.currentTime)return null;var e=this.Wg().getTime()+1e3*this.h.currentTime;return Math.floor(Date.now()-e)},f.getStats=function(){if(this.m!=Dr&&this.m!=Mi)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,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};C2(this);var e=this.h,t=e.currentTime/e.duration;if(!isNaN(t)&&!this.U()){var n=this.A;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.G&&(this.A.P=this.G.zg(),this.A.T=this.G.Ag()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.A;var r=Number(n.totalVideoFrames);t.O=Number(n.droppedVideoFrames),t.M=r,this.A.L=Number(n.corruptedVideoFrames)}if(this.C?(n=this.C,n=n.H?n.H:NaN):n=NaN,this.A.o=n,this.m==Dr){if(n=this.j.l,t=this.j.u,n){r=this.K?this.K.i:1;var i=r*n.bandwidth;t&&t.bandwidth&&(i+=r*t.bandwidth),this.A.A=i}n&&n.video&&(t=this.A,r=n.video.height||NaN,t.m=n.video.width||NaN,t.l=r),this.U()&&(n=this.Zd()||0,this.A.B=n/1e3),this.i&&(this.A.G=this.i.periodCount,this.A.F=this.i.gapCount,this.i.presentationTimeline&&(this.A.I=this.i.presentationTimeline.h)),n=this.o.getBandwidthEstimate(),this.A.u=n}this.m==Mi&&(n=this.A,n.mc=isNaN(n.mc)?NaN:n.mc+NaN,n=this.A,t=e.videoHeight||NaN,n.m=e.videoWidth||NaN,n.l=t);var a=this.A;e=a.m,n=a.l,t=a.A,r=a.M,i=a.O;var u=a.L,l=a.T,p=a.P,g=a.u,v=a.i,y=a.C,x=a.H,S=a.j,k=c2(a.g,"playing"),C=c2(a.g,"paused"),E=c2(a.g,"buffering"),I=a.o,_=a.B,j=a.I,B=a.bh,q=a.mc,O=a.K,R=a.G,H=a.F,z=i9(a.g),Y=[];a=w(a.h.g);for(var K=a.next();!K.done;K=a.next())K=K.value,Y.push({timestamp:K.timestamp,id:K.id,type:K.type,fromAdaptation:K.fromAdaptation,bandwidth:K.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:r,droppedFrames:i,corruptedFrames:u,stallsDetected:l,gapsJumped:p,estimatedBandwidth:g,completionPercent:v,loadLatency:y,manifestTimeSeconds:x,drmTimeSeconds:S,playTime:k,pauseTime:C,bufferingTime:E,licenseTime:I,liveLatency:_,maxSegmentDuration:j,manifestSizeBytes:B,bytesDownloaded:q,nonFatalErrorCount:O,manifestPeriodCount:R,manifestGapCount:H,stateHistory:z,switchHistory:Y}},f.Rh=function(e,t,n,r,i,a,u){u=u===void 0?!1:u;var l=this,p,g,v,y,x,S,k,C,E,I,_,j,B;return P(function(q){switch(q.g){case 1:if(l.m!=Dr&&l.m!=Mi)throw new $(1,7,7004);if(n!="subtitles"&&n!="captions"&&Be("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),r){q.s(2);break}return T(q,T2(l,e),3);case 3:r=q.h;case 2:if(p=[],l.u&&(p=l.u.getCuePoints()),l.m!=Mi){q.s(4);break}return u&&(n="forced"),T(q,YA(l,e,t,n,r,a||"",p),5);case 5:if(g=Jt(t),v=l.vc(),y=v.find(function(O){return Jt(O.language)==g&&O.label==(a||"")&&O.kind==n}))return Zr(l),q.return(y);throw new $(1,2,2012);case 4:if(x=zn,S=l.Ra(),k=S.end-S.start,l.i&&(k=l.i.presentationTimeline.getDuration()),k==1/0)throw new $(1,4,4033);if(!p.length){q.s(6);break}return T(q,A2(l,e,l.F,l.g.streaming.retryParameters),7);case 7:C=q.h,E=JA(l,C,r,p),I=new Blob([E],{type:"text/vtt"}),e=zb(I),r="text/vtt";case 6:if(_={id:l.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Em(0,k,[e]),mimeType:r||"",codecs:i||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:x.za,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!u,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Dn(r||"",i||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},j=Dn(_.mimeType,_.codecs),B=Pc(j),!B)throw new $(2,2,2014,r);return l.i.textStreams.push(_),Zr(l),q.return(nh(_))}})},f.Sh=function(e,t){var n=this,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B;return P(function(q){switch(q.g){case 1:if(n.m!=Dr&&n.m!=Mi)throw new $(1,7,7004);if(t){q.s(2);break}return T(q,T2(n,e),3);case 3:t=q.h;case 2:if(t!="text/vtt")throw new $(1,2,2017,e);if(r=zn,i=n.Ra(),a=i.end-i.start,n.i&&(a=n.i.presentationTimeline.getDuration()),a==1/0)throw new $(1,4,4045);return T(q,A2(n,e,n.F,n.g.streaming.retryParameters),4);case 4:if(u=q.h,l=tm(t),!l)throw new $(2,2,2014,t);for(p=l(),g={periodStart:0,segmentStart:0,segmentEnd:a,vttOffset:0},v=Ye(u),y=p.parseMedia(v,g,e,[]),x=[],S=w(y),k=S.next(),C={};!k.done;C={Ne:void 0,Mc:void 0},k=S.next())C.Mc=k.value,C.Ne=null,E=function(O){return function(){return O.Ne==null&&(O.Ne=Qn([e],[O.Mc.payload])),O.Ne||[]}}(C),I=new Ge(C.Mc.startTime,C.Mc.endTime,E,0,null,null,0,0,1/0),C.Mc.payload.includes("#xywh")&&(_=C.Mc.payload.split("#xywh=")[1].split(","),_.length===4&&I.De({height:parseInt(_[3],10),positionX:parseInt(_[0],10),positionY:parseInt(_[1],10),width:parseInt(_[2],10)})),x.push(I);if(j=t,!x.length){q.s(5);break}return T(q,sl(x[0].N()[0],n.F,n.g.manifest.retryParameters),6);case 6:j=q.h;case 5:return B={id:n.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new jt(x),mimeType:j||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:r.$e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Dn(j||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},n.m==Mi?n.Oe.push(B):n.i.imageStreams.push(B),Zr(n),q.return(gb(B))}})},f.Qh=function(e,t,n){var r=this,i,a,u,l;return P(function(p){switch(p.g){case 1:if(r.m!=Dr&&r.m!=Mi)throw new $(1,7,7004);if(n){p.s(2);break}return T(p,T2(r,e),3);case 3:n=p.h;case 2:return i=[],r.u&&(i=r.u.getCuePoints()),T(p,YA(r,e,t,"chapters",n,"",i),4);case 4:if(a=p.h,u=r.Rg(),l=u.find(function(g){return g.language==t}),!l){p.s(5);break}return T(p,new Promise(function(g,v){r.l.ma(a,"load",g),r.l.ma(a,"error",function(){v(new $(1,2,2015))})}),6);case 6:return Zr(r),p.return(l);case 5:throw new $(1,2,2012)}})};function T2(e,t){var n;return P(function(r){switch(r.g){case 1:return ve(r,2),T(r,sl(t,e.F,e.g.streaming.retryParameters),4);case 4:n=r.h,V(r,3);break;case 2:W(r);case 3:if(n)return r.return(n);throw new $(1,2,2011,t)}})}function YA(e,t,n,r,i,a,u){var l,p,g,v;return P(function(y){if(y.g==1)return i!="text/vtt"||u.length?T(y,A2(e,t,e.F,e.g.streaming.retryParameters),3):y.s(2);y.g!=2&&(l=y.h,p=JA(e,l,i,u),g=new Blob([p],{type:"text/vtt"}),t=zb(g),i="text/vtt"),v=document.createElement("track");var x=e.L,S=t;try{if(x.g.enabled){var k=v2(x);k.ot=b2,k.su=!0;var C=zm(k),E=y2(S,C)}else E=S}catch(I){$t("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",I),E=S}return v.src=E,v.label=a,v.kind=r,v.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(v),y.return(v)})}function A2(e,t,n,r){var i,a,u;return P(function(l){if(l.g==1){i=fa,a=qn([t],r),a.method="GET";var p=e.L;try{p.g.enabled&&td(p,a,{ot:b2,su:!0})}catch(g){$t("CMCD_TEXT_ERROR","Could not generate text CMCD data.",g)}return T(l,n.request(i,a).promise,2)}return u=l.h,l.return(u.data)})}function JA(e,t,n,r){var i=tm(n);if(i)return n=i(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=Ye(t),t=n.parseMedia(t,e,null,[]),x9(t,r);throw new $(2,2,2014,n)}f.Dj=function(e,t){this.ka.width=e,this.ka.height=t},f.eg=function(e){if(this.m==Dr){var t=this.j;if(e=e===void 0?.1:e,t.m.g)t=!1;else if(t.B)t=!1;else{for(var n=w(t.i.values()),r=n.next();!r.done;r=n.next())r=r.value,!r.sd||r.Da||r.kb||(r.sd=!1,jr(t,r,e));t=!0}}else t=!1;return t},f.Hf=function(){return Be("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for."),this.i},f.ui=function(){return this.Qb},f.ni=function(){var e={video:null,audio:null,text:null};if(this.m!=Dr)return e;var t=this.j.l,n=this.h.currentTime;t=w([t.video,t.audio,this.j.u]);for(var r=t.next();!r.done;r=t.next())if((r=r.value)&&r.segmentIndex){var i=r.segmentIndex.find(n);i=r.segmentIndex.get(i),i={codecs:i.codecs||r.codecs,mimeType:i.mimeType||r.mimeType,bandwidth:i.bandwidth||r.bandwidth},r.type=="video"?(i.width=r.width,i.height=r.height,e.video=i):r.type=="audio"?e.audio=i:r.type==wt&&(e.text=i)}return e};function Go(e){var t=Zc();return t.streaming.failureCallback=function(n){if(e.U()){var r=null;n.code==1001||n.code==1002?(r=1,e.g.streaming.lowLatencyMode&&(r=.1)):n.code==1003&&(r=.1),r!=null&&(n.severity=1,e.eg(r))}},t.textDisplayFactory=function(){return!e.ue||dr()&&!document.fullscreenEnabled?"addTextTrack"in e.h?new br(e.h,"Shaka Player TextTrack"):new wr:new xr(e.h,e.ue)},t}f.Ch=function(e){this.ue=e};function Y9(e,t){for(var n=new Set,r=w(t.textStreams),i=r.next();!i.done;i=r.next())i=i.value,i.mimeType!="application/cea-608"&&i.mimeType!="application/cea-708"||n.add(i.originalId);for(r=w(t.variants),i=r.next();!i.done;i=r.next())if((i=i.value.video)&&i.closedCaptions){for(var a=w(i.closedCaptions.keys()),u=a.next();!u.done;u=a.next())if(u=u.value,!n.has(u)){var l=u.startsWith("CC")?"application/cea-608":"application/cea-708",p=new kn,g=i.closedCaptions.get(u);l={id:e.We++,originalId:u,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:p,mimeType:l,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:g,originalLanguage:g,label:null,type:wt,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:i.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Dn(l,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(l),n.add(u)}}}function J9(e,t){var n,r,i,a,u;return P(function(l){return l.g==1?(n=e.audio,r=e.video,i=function(p,g){var v,y,x;return P(function(S){return S.g==1?p?p.segmentIndex?S.s(2):T(S,p.createSegmentIndex(),2):S.return(null):(y=(v=p.segmentIndex.Gb(g))?v.next().value:null,y?(x=y.startTime,S.return(x)):S.return(null))})},T(l,i(n,t),2)):l.g!=3?(a=l.h,T(l,i(r,t),3)):(u=l.h,u!=null&&a!=null?l.return(Math.max(u,a)):u!=null?l.return(u):a!=null?l.return(a):l.return(t))})}function E2(e){var t=e.Of();if(e.A&&e.M&&e.G){if(e.g.streaming.rebufferingGoal==0){var n=e.K;n.j=!1,Gb(n)}else n=e.K,n.j=t,Gb(n);if(e.L&&(n=e.L,t||n.u||(n.u=!0),n.u&&t&&(n.B=!0),n.F=t),C2(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Ue<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var r=e.g.streaming.liveSync.targetLatencyTolerance,i=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.P&&(e.P=Math.min(e.P+ ++e.Ue*i,n-r))}}t=new Map().set("buffering",t),e.dispatchEvent(on("buffering",t))}function QA(e,t){e.Na.Qa(),e.U()&&e.Na.D(e.h,"timeupdate",function(){var n=e.h.currentTime,r=e.Ra(),i=e.g.streaming.safeSeekOffset;0<t?Math.floor(n)>=Math.floor(r.end)&&e.gd():Math.floor(n)<=Math.floor(r.start+i)&&e.gd()})}function C2(e){if(e.A&&e.M){var t=e.A.g,n="playing";e.M.g==jc?n="buffering":e.Uc()?n="ended":e.h.paused&&(n="paused");var r=n;if(t.g==null)t.g={timestamp:Date.now()/1e3,state:r,duration:0},t=!0;else{var i=Date.now()/1e3;t.g.duration=i-t.g.timestamp,t.g.state==r?t=!1:(t.h.push(t.g),t.g={timestamp:i,state:r,duration:0},t=!0)}t&&(n=new Map().set("newstate",n),e.dispatchEvent(on("statechanged",n)))}}function ZA(e){var t=e.h.playbackRate,n=e.U();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var r=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,i=e.Qg();i<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=r&&e.Md(r,!1):i==1&&t!==e.K.sc()&&e.gd()}if(n&&(n=e.Ra(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){r=e.g.streaming.liveSync.targetLatencyTolerance,i=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var a=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var u=e.g.streaming.liveSync.targetLatency,l=u+r,p=Math.max(0,u-r),g=e.g.streaming.liveSync.maxPlaybackRate,v=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(u=e.i.serviceDescription.targetLatency,e.i.serviceDescription.targetLatency!=null?l=e.i.serviceDescription.targetLatency+r:e.i.serviceDescription.maxLatency!=null&&(l=e.i.serviceDescription.maxLatency),e.i.serviceDescription.targetLatency!=null?p=Math.max(0,e.i.serviceDescription.targetLatency-r):e.i.serviceDescription.minLatency!=null&&(p=e.i.serviceDescription.minLatency),g=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,v=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.P||typeof u!="number"||(e.P=u);var y=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;i&&e.Ma&&e.P!==null&&typeof u=="number"&&e.Ue<y&&Date.now()-e.Ma>1e3*a&&(a=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.P=Math.max(e.P-(u-a)/2,a+r),e.Ma=Date.now()),i&&e.P!==null&&(l=e.P+r,p=e.P-r),u=n.end-e.h.currentTime,r=0,e.m==Mi&&(i=e.h.buffered,0<i.length&&(r=i.end(i.length-1),r=Math.max(g,r-n.end))),n=e.g.streaming.liveSync.panicMode,i=1e3*e.g.streaming.liveSync.panicThreshold,a=Date.now()-e.M.h,n&&!v&&(v=e.g.streaming.liveSync.minPlaybackRate),n&&v&&a<=i?t!=v&&e.Md(v,!1):l!=null&&g&&u-r>l?(t!=g&&e.Md(g,!1),e.Ma=null):p!=null&&v&&u-r<p?(t!=v&&e.Md(v,!1),e.Ma=null):t!==e.K.sc()&&(e.gd(),e.Ma=Date.now())}}function Zm(e){if(e.h){var t=function(i,a){var u=u===void 0?Number.EPSILON:u;if(i===a)u=!0;else{var l=Math.abs(i-a);u=l<=u?!0:u!==Number.EPSILON?Math.abs(l-u)<=Number.EPSILON:!1}return(u||a>i)&&e.Ve<i?(e.Ve=i,!0):!1},n=e.Ra();if(n=n.end-n.start,n=0<n?e.h.currentTime/n:0,!isNaN(n)){if(n*=100,t(0,n))var r=on("started");else t(25,n)?r=on("firstquartile"):t(50,n)?r=on("midpoint"):t(75,n)?r=on("thirdquartile"):(t(100,n)&&(r=on("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Uc()&&e.h.pause());r&&e.dispatchEvent(r)}}}function ul(e){try{w4(e.te,e.i)}catch(n){return id(e,n),!1}var t=im(e.i.variants);return t=e.W.create(t),e.o.setVariants(Array.from(t.values())),!0}function rd(e,t,n,r,i){t=t===void 0?!0:t,n=n===void 0?0:n,r=r===void 0?!1:r,i=i===void 0?!0:i;var a;(a=ul(e)?e.o.chooseVariant():null)&&Ih(e,a,i,t,n,r)}function Ih(e,t,n,r,i,a){a=a===void 0?!1:a;var u=e.j.l;if(t==u)r&&dA(e.j,t,r,i,!0);else{var l=e.A.h;if(l.h!=t&&(l.h=t,l.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),dA(e.j,t,r,i,a,n),r=null,u&&(r=Xu(u)),u=Xu(t),u.active=!0,e.O&&(i=e.O,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),a=0,l=-1,t.mimeType){case"video/webm":a=1;break;case"video/mp4":a=2}switch(e.Tg()){case"DASH":l=1;break;case"HLS":l=0}i.g&&(i.g.setLevelSwitching(t.id,!0),i.g.setContainerFormat(a),i.j||i.g.setStreamingFormat(l))}n?(n=new Map().set("oldTrack",r).set("newTrack",u),n=on("adaptation",n),ll(e,n)):tE(e,r,u),nE(e,r,u)}}function eE(e,t){var n=Array.from(e.h.audioTracks).find(function(r){return r.enabled});t.enabled=!0,n&&(t.id!==n.id&&(n.enabled=!1),n=vb(n),t=vb(t),tE(e,n,t),nE(e,n,t))}function Zr(e){var t=on("trackschanged");ll(e,t),rE(e)}function tE(e,t,n){t=new Map().set("oldTrack",t).set("newTrack",n),t=on("variantchanged",t),ll(e,t)}function nE(e,t,n){var r=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(r=!0),r&&rE(e)}function rE(e){var t=on("audiotrackschanged");ll(e,t)}function ev(e){var t=on("textchanged");ll(e,t)}function iE(e){var t=on("texttrackvisibility");ll(e,t)}function aE(e){e.g.abr.enabled||I2(e);var t=new Map().set("newStatus",e.g.abr.enabled);ll(e,on("abrstatuschanged",t))}function Mh(e){var t=e.vc().find(function(n){return n.active});t&&e.B&&e.B.setTextLanguage&&e.B.setTextLanguage(t.language)}function I2(e,t){if(t=t===void 0?!0:t,e.m==Dr){e.xe.stop();for(var n=w(e.i.variants),r=n.next();!r.done;r=n.next())r.value.disabledUntilTime=0;t&&ul(e)}}f.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===ga||!navigator.onLine||t==0||!this.i)return!1;if(this.i.variants.some(function(l){var p=l[e.type];return p&&p.id!==e.id&&!l.disabledUntilTime?e.type=="audio"?e.language===p.language:!0:!1})){for(var n=!1,r=!1,i=w(this.i.variants),a=i.next();!a.done;a=i.next()){a=a.value;var u=a[e.type];u&&(u.id===e.id?(a.disabledUntilTime=Date.now()/1e3+t,n=!0):u.trickModeVideo&&u.trickModeVideo.id==e.id&&(r=!0))}return!n&&r?!1:(this.xe.ua(1),t=this.Fb().video.reduce(function(l,p){return l+p.end-p.start},0),rd(this,!1,t,!0,!1),!0)}return!1};function id(e,t){var n,r,i,a;return P(function(u){switch(u.g){case 1:if(e.m==ga)return u.return();if(t.severity===1&&e.A.K++,n=!0,!(e.sa&&e.i&&e.j)||t.code!=3016&&t.code!=3014&&t.code!=3015&&t.code!=3018){u.s(2);break}return dr()&&t.code==3016?u.return():(ve(u,3),T(u,Nm(e.j),5));case 5:r=u.h,n=!r,r&&(i=on("mediasourcerecovered"),e.dispatchEvent(i)),V(u,2);break;case 3:W(u),n=!0;case 2:if(!n)return u.return();t.severity===2&&I2(e,!1),a=on("error",new Map().set("detail",t)),e.dispatchEvent(a),a.defaultPrevented&&(t.handled=!0),oe(u)}})}f.addFont=function(e,t){var n,r,i,a,u;return P(function(l){if(l.g==1)return"fonts"in document&&"FontFace"in d?T(l,document.fonts.ready,3):l.s(0);if(!("entries"in document.fonts))return l.return();for(n=function(p){p=p.entries();for(var g=[],v=p.next();v.done===!1;)g.push(v.value),v=p.next();return g},r=w(n(document.fonts)),i=r.next();!i.done;i=r.next())if(a=i.value,a.family==e&&a.display=="swap")return l.return();u=new FontFace(e,"url("+t+")",{display:"swap"}),document.fonts.add(u),oe(l)})};function _h(e,t,n,r){r=r===void 0?e:r,e=new Map().set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventElement:n.eventElement,eventNode:n.eventNode}),r.dispatchEvent(on(t,e))}function oE(e,t,n,r){r=r===void 0?!1:r,t=new Map().set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(on(r?"audiotrackchanged":"mediaqualitychanged",t))}function M2(e,t){if(t=t===void 0?!0:t,!e.h.error)return t?new $(2,3,3016):null;var n=e.h.error.code;return!t&&n==1?null:((t=e.h.error.msExtendedCode)&&(0>t&&(t+=Math.pow(2,32)),t=t.toString(16)),new $(2,3,3016,n,t,e.h.error.message))}function _2(e,t,n){0<t&&(e.U()||e.Bh(t)),t=e.getDuration(),n<t&&(e.U()||e.bb(n))}function ll(e,t){P(function(n){if(n.g==1)return T(n,Promise.resolve(),2);e.m!=ga&&e.dispatchEvent(t),oe(n)})}function sE(e){var t=new Set;e=w(e);for(var n=e.next();!n.done;n=e.next())n=n.value,n.language?t.add(Jt(n.language)):t.add("und");return t}function uE(e){var t=new Map,n=new Map;e=w(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;var i="und",a=[];r.language&&(i=Jt(r.language)),r.type=="variant"?a=r.audioRoles:a=r.roles,a&&a.length||(a=[""]),t.has(i)||t.set(i,new Set),a=w(a);for(var u=a.next();!u.done;u=a.next())u=u.value,t.get(i).add(u),r.label&&(n.has(i)||n.set(i,new Map),n.get(i).set(u,r.label))}var l=[];return t.forEach(function(p,g){p=w(p);for(var v=p.next();!v.done;v=p.next()){v=v.value;var y=null;n.has(g)&&n.get(g).has(v)&&(y=n.get(g).get(v)),l.push({language:g,role:v,label:y})}}),l}f.Pa=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1},f.Uc=function(){return!this.h||this.h.ended?!0:this.sa&&!this.U()&&this.h.currentTime>=this.Ra().end},Ee("shaka.Player",ce),ce.prototype.isEnded=ce.prototype.Uc,ce.prototype.isRemotePlayback=ce.prototype.Pa,ce.prototype.addFont=ce.prototype.addFont,ce.prototype.setVideoContainer=ce.prototype.Ch,ce.prototype.getFetchedPlaybackInfo=ce.prototype.ni,ce.prototype.getManifestParserFactory=ce.prototype.ui,ce.prototype.getManifest=ce.prototype.Hf,ce.prototype.retryStreaming=ce.prototype.eg,ce.prototype.setMaxHardwareResolution=ce.prototype.Dj,ce.prototype.addChaptersTrack=ce.prototype.Qh,ce.prototype.addThumbnailsTrack=ce.prototype.Sh,ce.prototype.addTextTrackAsync=ce.prototype.Rh,ce.prototype.getStats=ce.prototype.getStats,ce.prototype.getBufferedInfo=ce.prototype.Fb,ce.prototype.getSegmentAvailabilityDuration=ce.prototype.ae,ce.prototype.getPresentationStartTimeAsDate=ce.prototype.Wg,ce.prototype.getPlayheadTimeAsDate=ce.prototype.yi,ce.prototype.setTextTrackVisibility=ce.prototype.zh,ce.prototype.getChapters=ce.prototype.ji,ce.prototype.getChaptersTracks=ce.prototype.Rg,ce.prototype.isTextTrackVisible=ce.prototype.Pf,ce.prototype.selectVariantsByLabel=ce.prototype.yj,ce.prototype.selectTextLanguage=ce.prototype.hg,ce.prototype.selectAudioLanguage=ce.prototype.sh,ce.prototype.getTextLanguages=ce.prototype.Ei,ce.prototype.getAudioLanguages=ce.prototype.gi,ce.prototype.getTextLanguagesAndRoles=ce.prototype.Fi,ce.prototype.getAudioLanguagesAndRoles=ce.prototype.hi,ce.prototype.getAudioTracks=ce.prototype.getAudioTracks,ce.prototype.selectAudioTrack=ce.prototype.xj,ce.prototype.selectVariantTrack=ce.prototype.Be,ce.prototype.selectTextTrack=ce.prototype.th,ce.prototype.getThumbnails=ce.prototype.Hi,ce.prototype.getAllThumbnails=ce.prototype.fi,ce.prototype.getImageTracks=ce.prototype.pi,ce.prototype.getTextTracks=ce.prototype.vc,ce.prototype.getVariantTracks=ce.prototype.Rb,ce.prototype.cancelTrickPlay=ce.prototype.gd,ce.prototype.trickPlay=ce.prototype.Md,ce.prototype.getPlaybackRate=ce.prototype.gb,ce.prototype.isBuffering=ce.prototype.Of,ce.prototype.getKeyStatuses=ce.prototype.Yd,ce.prototype.getActiveSessionsMetadata=ce.prototype.Gf,ce.prototype.getExpiration=ce.prototype.pd,ce.prototype.drmInfo=ce.prototype.drmInfo,ce.prototype.keySystem=ce.prototype.keySystem,ce.prototype.isFullyLoaded=ce.prototype.Ri,ce.prototype.goToLive=ce.prototype.Ni,ce.prototype.seekRange=ce.prototype.Ra,ce.prototype.isAudioOnly=ce.prototype.Qi,ce.prototype.isInProgress=ce.prototype.yc,ce.prototype.isLive=ce.prototype.U,ce.prototype.getAdManager=ce.prototype.Pg,ce.prototype.getAssetUri=ce.prototype.Qc,ce.prototype.getNetworkingEngine=ce.prototype.xb,ce.prototype.getMediaElement=ce.prototype.xi,ce.prototype.getManifestType=ce.prototype.Tg,ce.prototype.getLoadMode=ce.prototype.ti,ce.prototype.resetConfiguration=ce.prototype.sj,ce.prototype.getBufferFullness=ce.prototype.Qg,ce.prototype.getNonDefaultConfiguration=ce.prototype.Vg,ce.prototype.getConfigurationForLowLatency=ce.prototype.ki,ce.prototype.getConfiguration=ce.prototype.getConfiguration,ce.prototype.configurationForLowLatency=ce.prototype.ci,ce.prototype.configure=ce.prototype.configure,ce.prototype.releaseAllMutexes=ce.prototype.oj,ce.prototype.destroyAllPreloads=ce.prototype.pf,ce.prototype.preload=ce.prototype.preload,ce.prototype.detachAndSavePreload=ce.prototype.Lg,ce.prototype.unloadAndSavePreload=ce.prototype.Gj,ce.prototype.load=ce.prototype.load,ce.prototype.updateStartTime=ce.prototype.Kj,ce.prototype.unload=ce.prototype.kc,ce.prototype.detach=ce.prototype.detach,ce.prototype.attachCanvas=ce.prototype.Vh,ce.prototype.attach=ce.prototype.Lb,ce.probeSupport=function(e){e=e===void 0?!0:e;var t,n,r,i,a,u;return P(function(l){switch(l.g){case 1:if(t={},!e){l.s(2);break}return T(l,xR(),3);case 3:t=l.h;case 2:return n=_R(),r=nN(),T(l,t5(),4);case 4:return i=l.h,a={manifest:n,media:r,drm:t,hardwareResolution:i},u=cE,u.forEach(function(p,g){a[g]=p()}),l.return(a)}})},ce.isBrowserSupported=function(){return d.Promise||Be("A Promise implementation or polyfill is required"),d.Promise&&d.Uint8Array&&Array.prototype.forEach&&!Rn("Trident/")?Za()?!0:jp("application/x-mpegurl"):!1},ce.setAdManagerFactory=function(e){nv=e},ce.registerSupportPlugin=LA,ce.prototype.destroy=ce.prototype.destroy;var ga=0,tv=1,Dr=2,Mi=3;ce.LoadMode={DESTROYED:ga,NOT_LOADED:tv,MEDIA_SOURCE:Dr,SRC_EQUALS:Mi},ce.version="v4.14.6";var lE=["4","14"];Ur=new function(e){this.g=e,this.i=Ei,this.h=ua}(new rn(Number(lE[0]),Number(lE[1])));var cE=new Map,nv=null;function dE(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function Q9(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function Je(e,t,n){var r=this;this.g=e,this.h=t,this.j=n,this.i=!1,this.l=this.h.getVolume(),this.m=new Ce,this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){r.i=!0}),this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){r.i=!1})}f=Je.prototype,f.needsSkipUI=function(){return!1},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return!0},f.isUsingAnotherMediaElement=function(){return!0},f.getDuration=function(){return this.g.getDuration()},f.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},f.getRemainingTime=function(){return this.h.getRemainingTime()},f.isPaused=function(){return this.i},f.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},f.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},f.canSkipNow=function(){return this.h.getAdSkippableState()},f.skip=function(){return this.h.skip()},f.pause=function(){return this.h.pause()},f.play=function(){return this.h.resume()},f.getVolume=function(){return this.h.getVolume()},f.setVolume=function(e){return this.j.volume=e,this.h.setVolume(e)},f.isMuted=function(){return this.h.getVolume()==0},f.isLinear=function(){return this.g.isLinear()},f.resize=function(e,t){var n=!1,r=this.j;document.fullscreenEnabled?n=!!document.fullscreenElement:r.webkitSupportsFullscreen&&(n=r.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},f.setMuted=function(e){(this.j.muted=e)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)},f.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},f.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},f.getTitle=function(){return this.g.getTitle()},f.getDescription=function(){return this.g.getDescription()},f.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},f.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},f.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},f.getAdId=function(){return this.g.getAdId()},f.getCreativeAdId=function(){return this.g.getCreativeAdId()},f.getAdvertiserName=function(){return this.g.getAdvertiserName()},f.getMediaUrl=function(){return this.g.getMediaUrl()},f.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},f.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},f.release=function(){this.h=this.g=null},Ee("shaka.ads.ClientSideAd",Je),Je.prototype.release=Je.prototype.release,Je.prototype.getPodIndex=Je.prototype.getPodIndex,Je.prototype.getTimeOffset=Je.prototype.getTimeOffset,Je.prototype.getMediaUrl=Je.prototype.getMediaUrl,Je.prototype.getAdvertiserName=Je.prototype.getAdvertiserName,Je.prototype.getCreativeAdId=Je.prototype.getCreativeAdId,Je.prototype.getAdId=Je.prototype.getAdId,Je.prototype.getVastMediaWidth=Je.prototype.getVastMediaWidth,Je.prototype.getVastMediaHeight=Je.prototype.getVastMediaHeight,Je.prototype.getVastMediaBitrate=Je.prototype.getVastMediaBitrate,Je.prototype.getDescription=Je.prototype.getDescription,Je.prototype.getTitle=Je.prototype.getTitle,Je.prototype.getPositionInSequence=Je.prototype.getPositionInSequence,Je.prototype.getSequenceLength=Je.prototype.getSequenceLength,Je.prototype.setMuted=Je.prototype.setMuted,Je.prototype.resize=Je.prototype.resize,Je.prototype.isLinear=Je.prototype.isLinear,Je.prototype.isMuted=Je.prototype.isMuted,Je.prototype.setVolume=Je.prototype.setVolume,Je.prototype.getVolume=Je.prototype.getVolume,Je.prototype.play=Je.prototype.play,Je.prototype.pause=Je.prototype.pause,Je.prototype.skip=Je.prototype.skip,Je.prototype.canSkipNow=Je.prototype.canSkipNow,Je.prototype.getTimeUntilSkippable=Je.prototype.getTimeUntilSkippable,Je.prototype.isSkippable=Je.prototype.isSkippable,Je.prototype.isPaused=Je.prototype.isPaused,Je.prototype.getRemainingTime=Je.prototype.getRemainingTime,Je.prototype.getMinSuggestedDuration=Je.prototype.getMinSuggestedDuration,Je.prototype.getDuration=Je.prototype.getDuration,Je.prototype.isUsingAnotherMediaElement=Je.prototype.isUsingAnotherMediaElement,Je.prototype.hasCustomClick=Je.prototype.hasCustomClick,Je.prototype.isClientRendering=Je.prototype.isClientRendering,Je.prototype.needsSkipUI=Je.prototype.needsSkipUI;function fn(){}function pE(e,t){var n=[];e=w(Gt(e,"Ad"));for(var r=e.next();!r.done;r=e.next())if((r=Nn(r.value,"InLine"))&&(r=Nn(r,"Creatives"))){r=w(Gt(r,"Creative"));for(var i=r.next();!i.done;i=r.next()){i=i.value;var a=Nn(i,"Linear");if(a&&Z9(n,t,a),i=Nn(i,"NonLinearAds")){i=Gt(i,"NonLinear"),i=w(i);for(var u=i.next();!u.done;u=i.next())e:{a=n;var l=t,p=u.value,g=Nn(p,"StaticResource");if(g)u=g.attributes.creativeType;else{if(g=Nn(p,"HTMLResource"),!g)break e;u="text/html"}if(g=Ii(g)){u==="text/html"&&(g="data:text/html;charset=UTF-8,"+encodeURIComponent(g));var v=st(p,"width",Fr)||st(p,"expandedWidth",Fr),y=st(p,"height",Fr)||st(p,"expandedHeight",Fr);if(v||y){var x=null;(p=p.attributes.minSuggestedDuration)&&(x=Ic(p)),p=0,l!=null&&(p=l),a.push({id:null,groupId:null,startTime:p,endTime:null,uri:g,mimeType:u,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:x,once:!0,pre:l==null,post:l==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:v||0,y:y||0}},displayOnBackground:!1,currentVideo:null,background:null})}}}}}}return n}function Z9(e,t,n){var r=0;t!=null&&(r=t);var i=null;if(n.attributes.skipoffset&&(i=Ic(n.attributes.skipoffset),isNaN(i)&&(i=null)),n=Nn(n,"MediaFiles")){var a=Gt(n,"MediaFile");for(n=a,a=a.filter(function(l){return l.attributes.delivery=="streaming"}),a.length&&(n=a),n=n.sort(function(l,p){return(parseInt(p.attributes.height,10)||0)-(parseInt(l.attributes.height,10)||0)}),n=w(n),a=n.next();!a.done;a=n.next())if(a=a.value,!a.attributes.apiFramework){var u=Ii(a);if(u){e.push({id:null,groupId:null,startTime:r,endTime:null,uri:u,mimeType:a.attributes.type||null,isSkippable:i!=null,skipOffset:i,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:t==null,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}Ee("shaka.ads.Utils",fn),fn.ADS_LOADED="ads-loaded",fn.AD_STARTED="ad-started",fn.AD_FIRST_QUARTILE="ad-first-quartile",fn.AD_MIDPOINT="ad-midpoint",fn.AD_THIRD_QUARTILE="ad-third-quartile",fn.AD_COMPLETE="ad-complete",fn.AD_STOPPED="ad-stopped",fn.AD_SKIPPED="ad-skipped",fn.AD_VOLUME_CHANGED="ad-volume-changed",fn.AD_MUTED="ad-muted",fn.AD_PAUSED="ad-paused",fn.AD_RESUMED="ad-resumed",fn.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",fn.CUEPOINTS_CHANGED="ad-cue-points-changed",fn.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",fn.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",fn.AD_CLICKED="ad-clicked",fn.AD_PROGRESS="ad-progress",fn.AD_BUFFERING="ad-buffering",fn.AD_IMPRESSION="ad-impression",fn.AD_DURATION_CHANGED="ad-duration-changed",fn.AD_CLOSED="ad-closed",fn.AD_LOADED="ad-loaded",fn.ALL_ADS_COMPLETED="all-ads-completed",fn.AD_LINEAR_CHANGED="ad-linear-changed",fn.AD_METADATA="ad-metadata",fn.AD_RECOVERABLE_ERROR="ad-recoverable-error",fn.AD_ERROR="ad-error",fn.AD_BREAK_READY="ad-break-ready",fn.AD_INTERACTION="ad-interaction",fn.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",fn.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",fn.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function rv(e,t,n,r,i){var a=this;this.u=e,this.i=t,this.F=!1,this.A=this.o=null,this.G=NaN,this.l=i,this.j=null,this.h=new Ce,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.C=new google.ima.AdDisplayContainer(this.u,this.i),this.C.initialize(),this.m=new google.ima.AdsLoader(this.C),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.14.6"),this.g=null,this.B=r||new google.ima.AdsRenderingSettings,this.h.D(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(u){eO(a,u)}),this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(u){hE(a,u)}),this.h.D(this.i,"ended",function(){a.m.contentComplete()}),this.h.ma(this.i,"play",function(){a.F=!0})}rv.prototype.configure=function(e){this.o=e},rv.prototype.stop=function(){this.g&&this.g.stop(),this.u&&js(this.u)},rv.prototype.release=function(){this.stop(),this.A&&this.A.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.C.destroy()};function hE(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new Ae("ad-error",t)),av(e,null),e.l(new Ae("ad-cue-points-changed",new Map().set("cuepoints",[])))}function eO(e,t){if(e.l(new Ae("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.G))),e.o.customPlayheadTracker){var n={currentTime:e.i.currentTime};e.g=t.getAdsManager(n,e.B),e.i.muted?e.g.setVolume(0):e.g.setVolume(e.i.volume),e.h.D(e.i,"timeupdate",function(){e.i.duration&&(n.currentTime=e.i.currentTime)}),e.h.D(e.i,"volumechange",function(){e.j&&(e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))})}else e.g=t.getAdsManager(e.i,e.B);e.l(new Ae("ima-ad-manager-loaded",new Map().set("imaAdManager",e.g)));var r=e.g.getCuePoints();if(r.length){t=[],r=w(r);for(var i=r.next();!i.done;i=r.next())t.push({start:i.value,end:null});e.l(new Ae("ad-cue-points-changed",new Map().set("cuepoints",t)))}tO(e);try{e.g.init(e.i.offsetWidth,e.i.offsetHeight,iv(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),e.h.D(e.i,"loadeddata",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,iv(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in d?(e.A=new ResizeObserver(function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,iv(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),e.A.observe(e.i)):e.h.D(document,"fullscreenchange",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,iv(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),e.F||e.o.skipPlayDetection?e.g.start():e.h.ma(e.i,"play",function(){e.F=!0,e.g.start()})}catch{av(e,null)}}function iv(e){return document.fullscreenEnabled?!!document.fullscreenElement:(e=e.i,e.webkitSupportsFullscreen?e.webkitDisplayingFullscreen:!1)}function tO(e){function t(n,r){n=new Map().set("originalEvent",n),e.l(new Ae(r,n))}e.h.D(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){hE(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(n){fE(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.STARTED,function(n){fE(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(n){t(n,"ad-first-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.MIDPOINT,function(n){t(n,"ad-midpoint")}),e.h.D(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(n){t(n,"ad-third-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.COMPLETE,function(n){t(n,"ad-complete")}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(n){av(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){av(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPED,function(n){t(n,"ad-skipped")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(n){t(n,"ad-volume-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(n){t(n,"ad-muted")}),e.h.D(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.D(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.CLICK,function(n){t(n,"ad-clicked")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(n){t(n,"ad-progress")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(n){t(n,"ad-buffering")}),e.h.D(e.g,google.ima.AdEvent.Type.IMPRESSION,function(n){t(n,"ad-impression")}),e.h.D(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(n){t(n,"ad-duration-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(n){t(n,"ad-closed")}),e.h.D(e.g,google.ima.AdEvent.Type.LOADED,function(n){t(n,"ad-loaded")}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){t(n,"all-ads-completed")}),e.h.D(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(n){t(n,"ad-linear-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_METADATA,function(n){t(n,"ad-metadata")}),e.h.D(e.g,google.ima.AdEvent.Type.LOG,function(n){t(n,"ad-recoverable-error")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(n){t(n,"ad-break-ready")}),e.h.D(e.g,google.ima.AdEvent.Type.INTERACTION,function(n){t(n,"ad-interaction")})}function fE(e,t){var n=t.getAd();n?(e.j=new Je(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new Ae("ad-content-pause-requested")),t=new Map().set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new Ae("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?(t=e.j,t.l=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):Be("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function av(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new Ae("ad-content-resume-requested")),e.l(new Ae("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.u.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function Qe(e,t,n,r,i,a){this.g=e,this.i=t,this.j=(this.h=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.A=n,this.o=r,this.m=i,this.u=a,this.B=t.overlay}f=Qe.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return!1},f.isUsingAnotherMediaElement=function(){return this.u},f.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},f.isPaused=function(){return this.g.paused},f.isSkippable=function(){return this.h&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},f.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},f.canSkipNow=function(){return this.h&&this.getTimeUntilSkippable()==0},f.skip=function(){this.canSkipNow()&&this.A()},f.pause=function(){return this.g.pause()},f.play=function(){return this.g.play()},f.getVolume=function(){return this.g.volume},f.setVolume=function(e){this.g.volume=e},f.isMuted=function(){return this.g.muted},f.isLinear=function(){return this.B==null},f.resize=function(){},f.setMuted=function(e){this.g.muted=e},f.getSequenceLength=function(){return this.o},f.getPositionInSequence=function(){return this.m},f.getTitle=function(){return""},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getAdId=function(){return this.i.id||""},f.getCreativeAdId=function(){return""},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return this.i.uri},f.getTimeOffset=function(){return 0},f.getPodIndex=function(){return 0},f.release=function(){this.g=null},Ee("shaka.ads.InterstitialAd",Qe),Qe.prototype.release=Qe.prototype.release,Qe.prototype.getPodIndex=Qe.prototype.getPodIndex,Qe.prototype.getTimeOffset=Qe.prototype.getTimeOffset,Qe.prototype.getMediaUrl=Qe.prototype.getMediaUrl,Qe.prototype.getAdvertiserName=Qe.prototype.getAdvertiserName,Qe.prototype.getCreativeAdId=Qe.prototype.getCreativeAdId,Qe.prototype.getAdId=Qe.prototype.getAdId,Qe.prototype.getVastMediaWidth=Qe.prototype.getVastMediaWidth,Qe.prototype.getVastMediaHeight=Qe.prototype.getVastMediaHeight,Qe.prototype.getVastMediaBitrate=Qe.prototype.getVastMediaBitrate,Qe.prototype.getDescription=Qe.prototype.getDescription,Qe.prototype.getTitle=Qe.prototype.getTitle,Qe.prototype.getPositionInSequence=Qe.prototype.getPositionInSequence,Qe.prototype.getSequenceLength=Qe.prototype.getSequenceLength,Qe.prototype.setMuted=Qe.prototype.setMuted,Qe.prototype.resize=Qe.prototype.resize,Qe.prototype.isLinear=Qe.prototype.isLinear,Qe.prototype.isMuted=Qe.prototype.isMuted,Qe.prototype.setVolume=Qe.prototype.setVolume,Qe.prototype.getVolume=Qe.prototype.getVolume,Qe.prototype.play=Qe.prototype.play,Qe.prototype.pause=Qe.prototype.pause,Qe.prototype.skip=Qe.prototype.skip,Qe.prototype.canSkipNow=Qe.prototype.canSkipNow,Qe.prototype.getTimeUntilSkippable=Qe.prototype.getTimeUntilSkippable,Qe.prototype.isSkippable=Qe.prototype.isSkippable,Qe.prototype.isPaused=Qe.prototype.isPaused,Qe.prototype.getRemainingTime=Qe.prototype.getRemainingTime,Qe.prototype.getMinSuggestedDuration=Qe.prototype.getMinSuggestedDuration,Qe.prototype.getDuration=Qe.prototype.getDuration,Qe.prototype.isUsingAnotherMediaElement=Qe.prototype.isUsingAnotherMediaElement,Qe.prototype.hasCustomClick=Qe.prototype.hasCustomClick,Qe.prototype.isClientRendering=Qe.prototype.isClientRendering,Qe.prototype.needsSkipUI=Qe.prototype.needsSkipUI;function Ze(e,t,n){this.g=e,this.j=t,this.h=n,this.i=e.overlay==null}f=Ze.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return!1},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return-1},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return-1},f.isPaused=function(){return!1},f.isSkippable=function(){return!1},f.getTimeUntilSkippable=function(){return 0},f.canSkipNow=function(){return!1},f.skip=function(){},f.pause=function(){},f.play=function(){},f.getVolume=function(){return 1},f.setVolume=function(){},f.isMuted=function(){return!1},f.isLinear=function(){return this.i},f.resize=function(){},f.setMuted=function(){},f.getSequenceLength=function(){return this.j},f.getPositionInSequence=function(){return this.h},f.getTitle=function(){return""},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getAdId=function(){return this.g.id||""},f.getCreativeAdId=function(){return""},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return this.g.uri},f.getTimeOffset=function(){return 0},f.getPodIndex=function(){return 0},f.release=function(){},Ee("shaka.ads.InterstitialStaticAd",Ze),Ze.prototype.release=Ze.prototype.release,Ze.prototype.getPodIndex=Ze.prototype.getPodIndex,Ze.prototype.getTimeOffset=Ze.prototype.getTimeOffset,Ze.prototype.getMediaUrl=Ze.prototype.getMediaUrl,Ze.prototype.getAdvertiserName=Ze.prototype.getAdvertiserName,Ze.prototype.getCreativeAdId=Ze.prototype.getCreativeAdId,Ze.prototype.getAdId=Ze.prototype.getAdId,Ze.prototype.getVastMediaWidth=Ze.prototype.getVastMediaWidth,Ze.prototype.getVastMediaHeight=Ze.prototype.getVastMediaHeight,Ze.prototype.getVastMediaBitrate=Ze.prototype.getVastMediaBitrate,Ze.prototype.getDescription=Ze.prototype.getDescription,Ze.prototype.getTitle=Ze.prototype.getTitle,Ze.prototype.getPositionInSequence=Ze.prototype.getPositionInSequence,Ze.prototype.getSequenceLength=Ze.prototype.getSequenceLength,Ze.prototype.setMuted=Ze.prototype.setMuted,Ze.prototype.resize=Ze.prototype.resize,Ze.prototype.isLinear=Ze.prototype.isLinear,Ze.prototype.isMuted=Ze.prototype.isMuted,Ze.prototype.setVolume=Ze.prototype.setVolume,Ze.prototype.getVolume=Ze.prototype.getVolume,Ze.prototype.play=Ze.prototype.play,Ze.prototype.pause=Ze.prototype.pause,Ze.prototype.skip=Ze.prototype.skip,Ze.prototype.canSkipNow=Ze.prototype.canSkipNow,Ze.prototype.getTimeUntilSkippable=Ze.prototype.getTimeUntilSkippable,Ze.prototype.isSkippable=Ze.prototype.isSkippable,Ze.prototype.isPaused=Ze.prototype.isPaused,Ze.prototype.getRemainingTime=Ze.prototype.getRemainingTime,Ze.prototype.getMinSuggestedDuration=Ze.prototype.getMinSuggestedDuration,Ze.prototype.getDuration=Ze.prototype.getDuration,Ze.prototype.isUsingAnotherMediaElement=Ze.prototype.isUsingAnotherMediaElement,Ze.prototype.hasCustomClick=Ze.prototype.hasCustomClick,Ze.prototype.isClientRendering=Ze.prototype.isClientRendering,Ze.prototype.needsSkipUI=Ze.prototype.needsSkipUI;function gE(e,t,n,r){var i=this;this.T=null,this.A=e,this.H=t,this.g=n,this.F=null,this.B=!0,this.h=this.g,this.i=r,this.W=new Set,this.G=new Set,this.C=new Map,this.L=new Map,this.j=new ce,R2(this),this.I=new Ce,this.l=new Ce,this.K=!1,this.ea=this.m=this.u=this.o=null,this.fa=!1,this.O=-1,this.Z=function(){if(!i.K&&i.o&&!i.H.Pa()){i.o=i.g.currentTime,i.u&&!i.u.pre&&!i.u.post&&i.o<i.u.startTime&&(i.u=null);var a=Ph(i);a&&ov(i,a,1,1,Date.now())}},this.Y=function(){if(!(i.K||i.o||i.H.Pa())){i.o=i.g.currentTime;var a=Ph(i,!0);a&&ov(i,a,1,1,Date.now())}},this.P=new Tt(this.Z),this.M=new Tt(function(){var a,u,l,p,g,v,y,x,S,k,C;return P(function(E){switch(E.g){case 1:if(!i.G.size||i.o==null){E.s(0);break}if(a=i.H.m,a==ga||a==tv)return E.return();u=!1,l=Array.from(i.G),p=i.H.Ra(),g=w(l),v=g.next();case 3:if(v.done){E.s(5);break}if(y=v.value,y==i.u){E.s(4);break}if(x=y.endTime||y.startTime,!(1<=p.start-x)){S=y.startTime-i.o,0<S&&10>=S&&(!i.C.has(y)&&vE(y)&&i.C.set(y,i.j.preload(y.uri,null,y.mimeType||void 0)),yE(i,y)),E.s(4);break}if(!i.C.has(y)){E.s(7);break}return T(E,i.C.get(y),8);case 8:(k=E.h)&&k.destroy(),i.C.delete(y);case 7:bE(i,y),C=JSON.stringify(y),i.W.has(C)&&i.W.delete(C),i.G.delete(y),D2(i),y.overlay||(u=!0);case 4:v=g.next(),E.s(3);break;case 5:u&&sv(i),oe(E)}})})}f=gE.prototype,f.configure=function(e){this.T=e,P2(this)};function nO(e){if(!e.fa&&e.G.size){if(e.I.D(e.g,"playing",e.Y),e.I.D(e.g,"timeupdate",e.Y),e.I.D(e.g,"ended",e.Z),"requestVideoFrameCallback"in e.g&&!B1()){var t=e.g,n=function(){e.O!=-1&&(e.Z(),e.O!=-1&&(e.O=t.requestVideoFrameCallback(n)))};e.O=t.requestVideoFrameCallback(n)}else e.P.ua(.025);e.M&&e.M.ua(1),e.fa=!0}}function D2(e){e.fa&&!e.G.size&&(e.I.Ja(e.g,"playing",e.Y),e.I.Ja(e.g,"timeupdate",e.Y),e.I.Ja(e.g,"ended",e.Z),e.O!=-1&&(e.g.cancelVideoFrameCallback(e.O),e.O=-1),e.P&&e.P.stop(),e.M&&e.M.stop(),e.fa=!1)}function P2(e){if(e.A&&e.T&&!e.K){var t=e.T.supportsMultipleMediaElements,n=e.g;n.webkitSupportsFullscreen&&n.webkitDisplayingFullscreen&&(t=!1),e.B==t&&(e.B=!t,e.B?(e.h=e.g,e.F&&(e.F.parentElement&&e.A.removeChild(e.F),e.F=null)):(e.F||(t=document.createElement(e.g.tagName),t.autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.F=t),e.h=e.F))}}f.stop=function(){if(this.l&&this.l.Qa(),this.W.clear(),this.G.clear(),this.j.pf(),this.C.size){var e=Array.from(this.C.values());e=w(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(n){n&&n.destroy()})}if(this.C.clear(),this.L.size)for(e=Array.from(this.L.keys()),e=w(e),t=e.next();!t.done;t=e.next())bE(this,t.value);this.L.clear(),this.j.detach(),this.K=!1,this.u=this.o=null,this.B=!0,this.h=this.g,this.F=null,L2(this),D2(this),this.A&&js(this.A),this.m&&(this.m.stop(),this.m=null)},f.release=function(){this.stop(),this.I&&this.I.release(),this.l&&this.l.release(),this.P&&(this.P.stop(),this.P=null),this.M&&(this.M.stop(),this.M=null),this.j.destroy()},f.If=function(){return this.j};function rO(e,t){var n;P(function(r){if(r.g==1)return R2(e),T(r,sO(e,t),2);n=r.h,n.length?Dh(e,n):Be("Unsupported HLS interstitial",t),oe(r)})}function iO(e,t){var n=Nn(t.eventNode,"OverlayEvent"),r=n.attributes.uri,i=n.attributes.mimeType,a=n.attributes.loop=="true",u=st(n,"z",Fr);if(r&&u!=0){var l={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},p=Nn(n,"Viewport"),g=Nn(n,"TopLeft"),v=Nn(n,"Size");if(p&&g&&v){if(l=st(p,"x",Fr),l==null||(p=st(p,"y",Fr),p==null))return;var y=st(g,"x",Fr);if(y==null||(g=st(g,"y",Fr),g==null))return;var x=st(v,"x",Fr);if(x==null||(v=st(v,"y",Fr),v==null))return;l={viewport:{x:l,y:p},topLeft:{x:y,y:g},size:{x,y:v}}}v=Nn(n,"SqueezeCurrent"),n=null,v&&(v=st(v,"percentage",Kp))&&(n={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*v,y:1080*v}}),Dh(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:r,mimeType:i,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:a,overlay:l,displayOnBackground:u==-1,currentVideo:n,background:null}])}}f.addAdUrlInterstitial=function(e){var t=this,n,r,i,a,u,l,p,g,v;return P(function(y){switch(y.g){case 1:return n={type:12},T(y,N2(t,e,n),2);case 2:if(r=y.h,i=Gp(r,"VAST,vmap:VMAP"),!i)throw new $(2,10,10007);if(a=[],i.tagName=="VAST"){a=pE(i,t.o),y.s(3);break}if(i.tagName!="vmap:VMAP"){y.s(3);break}for(var x=[],S=w(Gt(i,"vmap:AdBreak")),k=S.next();!k.done;k=S.next()){var C=k.value,E=C.attributes.timeOffset;E&&(k=null,E=="start"?k=0:E=="end"?k=1/0:k=Ic(E),(C=Nn(C,"vmap:AdSource"))&&(C=Nn(C,"vmap:AdTagURI"))&&(C=jn(C))&&x.push({time:k,uri:C}))}u=w(x),l=u.next();case 5:if(l.done){y.s(3);break}return p=l.value,T(y,N2(t,p.uri,n),8);case 8:if(g=y.h,v=Gp(g,"VAST"),!v)throw new $(2,10,10007);a.push.apply(a,U(pE(v,p.time))),l=u.next(),y.s(5);break;case 3:Dh(t,a),oe(y)}})};function Dh(e,t){var n,r,i,a,u,l,p,g;P(function(v){switch(v.g){case 1:n=!1,r=w(t),i=r.next();case 2:if(i.done){v.s(4);break}if(a=i.value,!a.uri){Be("Missing URL in interstitial",a),v.s(3);break}if(a.mimeType){v.s(5);break}return ve(v,6),u=e.j.xb(),T(v,sl(a.uri,u,e.H.getConfiguration().streaming.retryParameters),8);case 8:a.mimeType=v.h,V(v,5);break;case 6:W(v);case 5:if(l=a.id||JSON.stringify(a),e.W.has(l)){v.s(3);break}a.loop&&!a.overlay&&Be("Loop is only supported in overlay interstitials",a),a.overlay||(n=!0),e.W.add(l),e.G.add(a),p=!1,a.pre&&e.o==null?p=!0:a.startTime!=0||a.canJump?e.o!=null&&(g=a.startTime-e.o,0<g&&10>=g&&(p=!0)):p=!0,p&&(!e.C.has(a)&&vE(a)&&e.C.set(a,e.j.preload(a.uri,null,a.mimeType||void 0)),yE(e,a));case 3:i=r.next(),v.s(2);break;case 4:n&&sv(e),nO(e),oe(v)}})}function Ph(e,t,n){t=t===void 0?!1:t,n=n===void 0?null:n;var r=0,i=null;if(e.G.size&&e.o!=null){var a=e.g.ended,u=Array.from(e.G).sort(function(v,y){return y.startTime-v.startTime}),l=u;for(l=t?u.filter(function(v){return v.pre}):a?u.filter(function(v){return v.post}):u.filter(function(v){return!v.pre&&!v.post}),u=w(l),l=u.next();!l.done;l=u.next()){l=l.value;var p=!1;if(t)p=l.pre;else if(a)p=l.post;else if(!l.pre&&!l.post){var g=e.o-Math.round(1e3*l.startTime)/1e3;0<g&&(1>=g||!l.canJump)&&(p=!(n==null&&e.u&&!e.u.pre&&!e.u.post&&e.u.startTime>=l.startTime))}p&&(!e.u||l.startTime>=e.u.startTime)&&(r==(n||0)?i=l:i&&!l.canJump&&.001<Math.round(1e3*l.startTime)/1e3-Math.round(1e3*i.startTime)/1e3&&(i=l,r=0),r++)}}return i}function ov(e,t,n,r,i,a){a=a===void 0?0:a,e.u=t,P2(e),!e.h.parentElement&&e.A&&e.A.appendChild(e.h),r==1&&n==1&&(n=Array.from(e.G).filter(function(u){return t.pre?u.pre==t.pre:t.post?u.post==t.post:.001>Math.abs(u.startTime-t.startTime)}).length),t.once&&(a++,e.G.delete(t),D2(e),t.overlay||sv(e)),t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html")?t.overlay?aO(e,t,n,r,a):Be("Unsupported interstitial",t):e.B&&t.overlay?Be("Unsupported interstitial",t):oO(e,t,n,r,i,a)}function aO(e,t,n,r,i){function a(){e.m&&(e.m.stop(),e.m=null),e.A.removeChild(p),L2(e,t),e.i(new Ae("ad-stopped"));var x=Ph(e,t.pre,r-i);x?(e.l.Qa(),ov(e,x,n,++r,Date.now(),i)):e.K=!1}var u=t.overlay,l=t.mimeType=="text/html"?"iframe":"img",p=document.createElement(l);p.style.objectFit="contain",p.style.position="absolute",p.style.border="none",mE(e,t),e.i(new Ae("ad-started",new Map().set("ad",new Ze(t,n,r)))),l=="iframe"?p.src=t.uri:(p.src=t.uri,p.onerror=function(x){e.i(new Ae("ad-error",new Map().set("originalEvent",x))),a()});var g=u.viewport,v=u.topLeft;u=u.size,g.x==0&&g.y==0?(p.width=t.overlay.size.x,p.height=t.overlay.size.y,p.style.bottom="10%",p.style.left="0",p.style.right="0",p.style.width="100%",t.overlay.size.y||l!="iframe"||(p.style.height="auto")):(p.style.height=u.y/g.y*100+"%",p.style.left=v.x/g.x*100+"%",p.style.top=v.y/g.y*100+"%",p.style.width=u.x/g.x*100+"%"),e.A.appendChild(p);var y=Date.now();e.m&&e.m.stop(),e.m=new Tt(function(){t.playoutLimit&&(Date.now()-y)/1e3>t.playoutLimit?(e.i(new Ae("ad-complete")),a()):t.endTime&&e.g.currentTime>t.endTime?(e.i(new Ae("ad-complete")),a()):e.g.currentTime<t.startTime&&(e.i(new Ae("ad-skipped")),a())}),t.playoutLimit&&!t.endTime?e.m.da(t.playoutLimit):t.endTime&&e.m.ua(.025),e.l.D(e.g,"seeked",function(){var x=e.g.currentTime;(x<t.startTime||t.endTime&&x>t.endTime)&&(e.m&&e.m.stop(),e.i(new Ae("ad-skipped")),a())})}function oO(e,t,n,r,i,a){var u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O;P(function(R){switch(R.g){case 1:if(u=Date.now(),e.K=!0,!e.B||r!=1){R.s(2);break}return e.i(new Ae("ad-content-pause-requested",new Map().set("saveLivePosition",!0))),l=new Wt,p=function(H){return P(function(z){if(z.g==1)return H.state!="detach"?z.s(0):B1()?T(z,new Promise(function(Y){return new Tt(Y).da(.1)}),3):z.s(3);l.resolve(),e.l.Ja(e.H,"onstatechange",p),oe(z)})},e.l.D(e.H,"onstatechange",p),T(R,l,2);case 2:return mE(e,t),e.B||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,g=t.overlay.viewport,v=t.overlay.topLeft,y=t.overlay.size,e.h.style.height=y.y/g.y*100+"%",e.h.style.left=v.x/g.x*100+"%",e.h.style.top=v.y/g.y*100+"%",e.h.style.width=y.x/g.x*100+"%"):(e.g.pause(),t.resumeOffset!=null&&t.resumeOffset!=0&&(e.g.currentTime+=t.resumeOffset),e.h.loop=!1,e.h.style.height="100%",e.h.style.left="0",e.h.style.top="0",e.h.style.width="100%")),x=!1,S=function(){if(!e.B&&!t.overlay&&t.resumeOffset==null)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var H=Date.now();e.g.currentTime+=(H-i)/1e3,i=H}},k=function(H){var z,Y;return P(function(K){if(K.g==1){if(S(),z=Ph(e,t.pre,r-a),H&&t.groupId)for(;z&&z.groupId==t.groupId;)r++,z=Ph(e,t.pre,r-a);return e.m&&(!t.groupId||z&&z.groupId!=t.groupId)&&(e.m.stop(),e.m=null),L2(e,t),z&&!z.overlay?K.s(2):(t.post&&(e.o=null,e.u=null),e.B?T(K,e.j.detach(),4):T(K,e.j.kc(),4))}K.g!=2&&(e.B&&(Y=t.resumeOffset,Y==null&&(Y=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.o||0):(Date.now()-i)/1e3),e.i(new Ae("ad-content-resume-requested",new Map().set("offset",Y)))),e.i(new Ae("ad-stopped")),e.l.Qa(),e.K=!1,e.B?sv(e):(e.h.style.display="none",S(),e.g.ended||e.g.play())),P2(e),z&&(e.i(new Ae("ad-stopped")),e.l.Qa(),ov(e,z,n,++r,i,a)),oe(K)})},C=function(H){return P(function(z){return x?z.return():(x=!0,e.i(new Ae("ad-error",new Map().set("originalEvent",H))),T(z,k(!1),0))})},E=function(){return P(function(H){if(H.g==1)return x?H.return():(x=!0,T(H,k(!1),2));e.i(new Ae("ad-complete")),oe(H)})},e.ea=function(){return P(function(H){return x?H.return():(x=!0,e.i(new Ae("ad-skipped")),T(H,k(!0),0))})},I=new Qe(e.h,t,e.ea,n,r,!e.B),e.B||(I.setMuted(e.g.muted),I.setVolume(e.g.volume)),e.i(new Ae("ad-started",new Map().set("ad",I))),(_=I.canSkipNow())&&e.i(new Ae("ad-skip-state-changed")),e.l.ma(e.j,"error",C),e.l.D(e.h,"timeupdate",function(){if(e.h.duration){var H=I.canSkipNow();_!=H&&0<I.getRemainingTime()&&0<I.getDuration()&&e.i(new Ae("ad-skip-state-changed")),_=H}}),e.l.ma(e.j,"firstquartile",function(){S(),e.i(new Ae("ad-first-quartile"))}),e.l.ma(e.j,"midpoint",function(){S(),e.i(new Ae("ad-midpoint"))}),e.l.ma(e.j,"thirdquartile",function(){S(),e.i(new Ae("ad-third-quartile"))}),e.l.ma(e.j,"complete",E),e.l.D(e.h,"play",function(){e.i(new Ae("ad-resumed"))}),e.l.D(e.h,"pause",function(){var H=e.j.getConfiguration();e.h.currentTime>=H.playRangeEnd?E():e.i(new Ae("ad-paused"))}),e.l.D(e.h,"volumechange",function(){e.h.muted?e.i(new Ae("ad-muted")):e.i(new Ae("ad-volume-changed"))}),ve(R,4),R2(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(j=t.endTime-t.startTime,0<j&&e.j.configure("playRangeEnd",j)),t.playoutLimit&&!e.m&&(e.m=new Tt(function(){e.ea()}).da(t.playoutLimit),e.j.configure("playRangeEnd",t.playoutLimit)),T(R,e.j.Lb(e.h),6);case 6:return e.C.has(t)?T(R,e.C.get(t),10):T(R,e.j.load(t.uri,null,t.mimeType||void 0),8);case 10:return B=R.h,e.C.delete(t),B?T(R,e.j.load(B),8):T(R,e.j.load(t.uri,null,t.mimeType||void 0),8);case 8:e.h.play(),q=(Date.now()-u)/1e3,e.i(new Ae("ads-loaded",new Map().set("loadTime",q))),e.B&&e.g.play(),t.overlay&&(e.l.D(e.g,"seeking",function(){var H=e.g.currentTime-t.startTime;.1<Math.abs(H-e.h.currentTime)&&(e.h.currentTime=H)}),e.l.D(e.g,"seeked",function(){var H=e.g.currentTime;(H<t.startTime||t.endTime&&H>t.endTime)&&e.ea()})),V(R,0);break;case 4:if(O=W(R),!e.K)return R.return();C(O),oe(R)}})}function mE(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),t.currentVideo!=null){var n=t.currentVideo;e.g.style.transformOrigin="top left";var r=!0,i=[],a=n.topLeft.x/n.viewport.x*100;0<a&&100>=a&&(i.push("translateX("+a+"%)"),r=!1),a=n.topLeft.y/n.viewport.y*100,0<a&&100>=a&&(i.push("translateY("+a+"%)"),r=!1),a=n.size.x/n.viewport.x,1>a&&i.push("scaleX("+a+")"),n=n.size.y/n.viewport.y,1>a&&i.push("scaleY("+n+")"),i.length&&(e.g.style.transform=i.join(" ")),r&&(e.g.style.transition="transform 250ms")}e.A&&(e.A.style.pointerEvents="none",t.background&&(e.A.style.background=t.background)),e.F&&(e.F.style.background=t.overlay?"":"rgb(0, 0, 0)")}function L2(e,t){(!t||t.displayOnBackground)&&(e.g.style.zIndex=""),t&&t.currentVideo==null||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.A&&(e.A.style.pointerEvents="",!t||t.background)&&(e.A.style.background=""),e.F&&(e.F.style.background="")}function sO(e,t){var n,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne,ue,se,he,xe,tt,Fe,Vt,At,gt,vt,Rt,pt,Et;return P(function(ot){switch(ot.g){case 1:if(n=[],!t||(r=t.values.find(function(ht){return ht.key=="X-ASSET-URI"}),i=t.values.find(function(ht){return ht.key=="X-ASSET-LIST"}),!r&&!i))return ot.return(n);if(a=null,(u=t.values.find(function(ht){return ht.key=="ID"}))&&(a=u.data),l=a==null?Math.floor(10*t.startTime)/10:t.startTime,(p=t.endTime)&&t.endTime!=1/0&&typeof t.endTime=="number"&&(p=a==null?Math.floor(10*t.endTime)/10:t.endTime),g=t.values.find(function(ht){return ht.key=="X-RESTRICT"}),y=v=!0,g&&g.data&&(x=g.data,v=!x.includes("SKIP"),y=!x.includes("JUMP")),S=v?0:null,(k=t.values.find(function(ht){return ht.key=="X-ENABLE-SKIP-AFTER"}))&&(C=k.data,S=parseFloat(C),isNaN(S)&&(S=v?0:null)),E=null,(I=t.values.find(function(ht){return ht.key=="X-ENABLE-SKIP-FOR"}))&&(_=I.data,E=parseFloat(_),isNaN(S)&&(E=null)),j=null,(B=t.values.find(function(ht){return ht.key=="X-RESUME-OFFSET"}))&&(q=B.data,j=parseFloat(q),isNaN(j)&&(j=null)),O=null,(R=t.values.find(function(ht){return ht.key=="X-PLAYOUT-LIMIT"}))&&(H=R.data,O=parseFloat(H),isNaN(O)&&(O=null)),K=Y=z=!1,(J=t.values.find(function(ht){return ht.key=="CUE"}))&&(ae=J.data,z=ae.includes("ONCE"),Y=ae.includes("PRE"),K=ae.includes("POST")),ne=!1,(ue=t.values.find(function(ht){return ht.key=="X-TIMELINE-OCCUPIES"}))?(se=ue.data,ne=se.includes("RANGE")):!B&&e.H.U()&&(ne=!Y&&!K),r){if(he=r.data,!he)return ot.return(n);n.push({id:a,groupId:null,startTime:l,endTime:p,uri:he,mimeType:null,isSkippable:v,skipOffset:S,skipFor:E,canJump:y,resumeOffset:j,playoutLimit:O,once:z,pre:Y,post:K,timelineRange:ne,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}),ot.s(2);break}if(!i){ot.s(2);break}return xe=i.data,xe?(ve(ot,4),tt={type:11},T(ot,N2(e,xe,tt),6)):ot.return(n);case 6:for(Fe=ot.h,Vt=yn(Fe),At=JSON.parse(Vt),(gt=At["SKIP-CONTROL"])&&(vt=gt["ENABLE-SKIP-AFTER"],typeof vt=="number"&&(S=parseFloat(vt),isNaN(vt)&&(S=v?0:null)),Rt=gt["ENABLE-SKIP-FOR"],typeof Rt=="number"&&(E=parseFloat(Rt),isNaN(Rt)&&(E=null))),pt=0;pt<At.ASSETS.length;pt++)Et=At.ASSETS[pt],Et.URI&&n.push({id:a+"_shaka_asset_"+pt,groupId:a,startTime:l,endTime:p,uri:Et.URI,mimeType:null,isSkippable:v,skipOffset:S,skipFor:E,canJump:y,resumeOffset:j,playoutLimit:O,once:z,pre:Y,post:K,timelineRange:ne,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});V(ot,2);break;case 4:W(ot);case 2:return ot.return(n)}})}function sv(e){for(var t=[],n=w(e.G),r=n.next(),i={};!r.done;i={$b:void 0},r=n.next())r=r.value,r.overlay||(i.$b={start:r.startTime,end:null},r.pre?(i.$b.start=0,i.$b.end=null):r.post?(i.$b.start=-1,i.$b.end=null):r.timelineRange&&(i.$b.end=r.endTime),t.find(function(a){return function(u){return a.$b.start==u.start&&a.$b.end==u.end}}(i))||t.push(i.$b));e.i(new Ae("ad-cue-points-changed",new Map().set("cuepoints",t)))}function R2(e){e.j.configure(e.H.Vg()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),e.j.configure("playRangeEnd",1/0),W5(e.H.xb(),e.j.xb())}function N2(e,t,n){var r,i,a;return P(function(u){return u.g==1?(r=qn([t],ja()),i=e.H.xb().request(7,r,n),T(u,i.promise,2)):(a=u.h,u.return(a.data))})}function vE(e){return(e=e.mimeType)?!e.startsWith("image/")&&e!=="text/html":!0}function yE(e,t){if(!(e.L.has(t)||e.T&&!e.T.allowPreloadOnDomElements)){var n=function(a){var u=document.createElement("link");return u.rel="preload",u.href=a,u.as="image",document.head.appendChild(u),u},r=[];if(t.background){var i=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);i&&r.push(n(i[2]))}t.mimeType.startsWith("image/")&&r.push(n(t.uri)),e.L.set(t,r)}}function bE(e,t){if(e.L.has(t)){var n=e.L.get(t);n=w(n);for(var r=n.next();!r.done;r=n.next())r=r.value,r.parentNode.removeChild(r);e.L.delete(t)}}function We(e,t,n,r,i){this.h=e,this.j=Ic(this.h.skipOffset),this.g=i,this.i=t,this.l=n,this.o=r,this.m=!1}f=We.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!1},f.hasCustomClick=function(){return!1},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return this.h.durationInSeconds},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},f.isPaused=function(){return this.g.paused},f.isSkippable=function(){return typeof this.j=="number"},f.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},f.canSkipNow=function(){return this.getTimeUntilSkippable()==0},f.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},f.pause=function(){return this.g.pause()},f.play=function(){return this.g.play()},f.getVolume=function(){return this.g.volume},f.setVolume=function(e){this.g.volume=e},f.isMuted=function(){return this.g.muted},f.isLinear=function(){return this.o},f.resize=function(){},f.setMuted=function(e){this.g.muted=e},f.getSequenceLength=function(){return this.l?this.l:1},f.getPositionInSequence=function(){return this.i?this.i:1},f.getTitle=function(){return this.h.adTitle},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getAdId=function(){return this.h.adId},f.getCreativeAdId=function(){return this.h.creativeId},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return null},f.getTimeOffset=function(){return 0},f.getPodIndex=function(){return 0},f.release=function(){this.l=this.i=this.g=this.h=null},Ee("shaka.ads.MediaTailorAd",We),We.prototype.release=We.prototype.release,We.prototype.getPodIndex=We.prototype.getPodIndex,We.prototype.getTimeOffset=We.prototype.getTimeOffset,We.prototype.getMediaUrl=We.prototype.getMediaUrl,We.prototype.getAdvertiserName=We.prototype.getAdvertiserName,We.prototype.getCreativeAdId=We.prototype.getCreativeAdId,We.prototype.getAdId=We.prototype.getAdId,We.prototype.getVastMediaWidth=We.prototype.getVastMediaWidth,We.prototype.getVastMediaHeight=We.prototype.getVastMediaHeight,We.prototype.getVastMediaBitrate=We.prototype.getVastMediaBitrate,We.prototype.getDescription=We.prototype.getDescription,We.prototype.getTitle=We.prototype.getTitle,We.prototype.getPositionInSequence=We.prototype.getPositionInSequence,We.prototype.getSequenceLength=We.prototype.getSequenceLength,We.prototype.setMuted=We.prototype.setMuted,We.prototype.resize=We.prototype.resize,We.prototype.isLinear=We.prototype.isLinear,We.prototype.isMuted=We.prototype.isMuted,We.prototype.setVolume=We.prototype.setVolume,We.prototype.getVolume=We.prototype.getVolume,We.prototype.play=We.prototype.play,We.prototype.pause=We.prototype.pause,We.prototype.skip=We.prototype.skip,We.prototype.canSkipNow=We.prototype.canSkipNow,We.prototype.getTimeUntilSkippable=We.prototype.getTimeUntilSkippable,We.prototype.isSkippable=We.prototype.isSkippable,We.prototype.isPaused=We.prototype.isPaused,We.prototype.getRemainingTime=We.prototype.getRemainingTime,We.prototype.getMinSuggestedDuration=We.prototype.getMinSuggestedDuration,We.prototype.getDuration=We.prototype.getDuration,We.prototype.isUsingAnotherMediaElement=We.prototype.isUsingAnotherMediaElement,We.prototype.hasCustomClick=We.prototype.hasCustomClick,We.prototype.isClientRendering=We.prototype.isClientRendering,We.prototype.needsSkipUI=We.prototype.needsSkipUI;function Lh(e,t,n,r){this.B=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=r,this.I=!1,this.A=null,this.j=[],this.M=[],this.L=this.C=this.g=null,this.F=new Map,this.m=[],this.u=[],this.G="",this.O=!0,this.H="",this.o=new Ce}Lh.prototype.stop=function(){for(var e=w(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Ja(t.target,t.type,t.listener);ad(this),this.m=[],this.u=[],this.G="",this.O=!0,this.H="",this.A=null,this.j=[],this.M=[],this.F.clear()},Lh.prototype.release=function(){this.stop(),this.o&&this.o.release()},Lh.prototype.onManifestUpdated=function(e){this.I=e,this.G!=""&&(lO(this,this.G,this.O),this.O=!1)},Lh.prototype.getCuePoints=function(){for(var e=[],t=w(this.j),n=t.next();!n.done;n=t.next()){n=w(n.value.ads);for(var r=n.next();!r.done;r=n.next())r=r.value,e.push({start:r.startTimeInSeconds,end:r.startTimeInSeconds+r.durationInSeconds})}return e};function uO(e,t,n){var r,i,a,u,l,p,g,v,y,x,S,k;P(function(C){if(C.g==1)return r={type:7},i=qn([t],ja()),i.method="POST",n&&(a=JSON.stringify(n),i.body=ca(a)),u=e.K.request(7,i,r),ve(C,2),T(C,u.promise,4);if(C.g!=2){if(l=C.h,p=yn(l.data),g=JSON.parse(p),g.manifestUrl&&g.trackingUrl)v=new ee(t),y=new ee(g.trackingUrl),e.G=v.resolve(y).toString(),x=Date.now()/1e3,S=x-e.P,e.i(new Ae("ads-loaded",new Map().set("loadTime",S))),k=new ee(g.manifestUrl),e.l.resolve(v.resolve(k).toString()),e.l=null;else throw Error("Insufficient data from MediaTailor.");return V(C,0)}if(W(C),!e.H.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,C.return();e.l.resolve(e.H),e.l=null,oe(C)})}function lO(e,t,n){var r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_;P(function(j){if(j.g==1)return r={type:8},i=qn([t],ja()),a=e.K.request(7,i,r),ve(j,2),T(j,a.promise,4);if(j.g!=2){if(u=j.h,l=[],p=yn(u.data),g=JSON.parse(p),0<g.avails.length){if(JSON.stringify(e.j)!=JSON.stringify(g.avails)){for(e.j=g.avails,v=w(e.j),y=v.next();!y.done;y=v.next())for(x=y.value,S=w(x.nonLinearAdsList),k=S.next();!k.done;k=S.next())for(C=k.value,E=w(C.nonLinearAdList),I=E.next();!I.done;I=E.next())_=I.value,cO(e,_);l=e.getCuePoints(),e.i(new Ae("ad-cue-points-changed",new Map().set("cuepoints",l)))}}else e.j.length&&e.i(new Ae("ad-cue-points-changed",new Map().set("cuepoints",l))),ad(e),e.j=[];return n&&(e.I||0<l.length)&&dO(e),V(j,0)}W(j),oe(j)})}function cO(e,t){var n,r,i,a,u,l,p,g;P(function(v){if(v.g==1)return!t.staticResource||(n=wE(t),e.F.get(n))?v.return():(r={type:9},i=qn([t.staticResource],ja()),a=e.K.request(7,i,r),ve(v,2),e.F.set(n,[]),T(v,a.promise,4));if(v.g!=2)return u=v.h,l=yn(u.data),p=JSON.parse(l),g=p.apps,e.F.set(n,g),V(v,0);W(v),e.F.delete(n),oe(v)})}function wE(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function dO(e){SE(e),e.I||(xE(e),e.o.D(e.h,"seeked",function(){xE(e)}),e.o.D(e.h,"ended",function(){ad(e)})),e.o.D(e.h,"timeupdate",function(){SE(e)})}function xE(e){var t=e.h.currentTime;if(t!=0&&e.A==null){for(var n,r,i=w(e.j),a=i.next();!a.done;a=i.next()){a=a.value;for(var u=w(a.ads),l=u.next();!l.done;l=u.next())if(l=l.value,!r)l.startTimeInSeconds<t&&(r=l,n=a);else if(l.startTimeInSeconds<t&&l.startTimeInSeconds>r.startTimeInSeconds+r.durationInSeconds){r=l,n=a;break}}n&&r&&!e.M.includes(r.adId)&&(e.A=t,e.h.currentTime=n.startTimeInSeconds)}}function SE(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var r=e.C,i=r.startTimeInSeconds+.5*r.durationInSeconds,a=r.startTimeInSeconds+.75*r.durationInSeconds;t>=r.startTimeInSeconds+.25*r.durationInSeconds&&!e.u.includes("firstQuartile")?(e.u.push("firstQuartile"),Br(e,"firstQuartile")):t>=i&&!e.u.includes("midpoint")?(e.u.push("midpoint"),Br(e,"midpoint")):t>=a&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),Br(e,"thirdQuartile")),r=e.g.getRemainingTime(),i=e.g.getDuration(),e.g.canSkipNow()&&0<r&&0<i&&Br(e,"skipStateChanged"),0<i&&(0>=r||r>i)&&ad(e)}if(!e.g||!e.g.isLinear()){e:for(r=w(e.j),i=r.next();!i.done&&(i=i.value,!(e.g&&e.g.isLinear()));i=r.next())for(a=0;a<i.ads.length;a++){var u=i.ads[a],l=u.startTimeInSeconds+u.durationInSeconds;if(u.startTimeInSeconds<=t&&l>t){if(e.M.includes(u.adId)){if(e.h.ended)continue;e.h.currentTime=l;break e}ad(e),e.L=i,e.g=new We(u,a+1,i.ads.length,!0,e.h),e.C=u,a===0&&Br(e,"breakStart"),kE(e);break}}if(!e.g){for(r=w(e.j),i=r.next();!i.done&&(i=i.value,!e.g);i=r.next())for(a=0;a<i.nonLinearAdsList.length;a++)if(u=i.nonLinearAdsList[a],u.nonLinearAdList.length){l=i.startTimeInSeconds;var p=e.F.get(wE(u.nonLinearAdList[0]));if(l<=t&&p&&p.length){ad(e),l=e,p=w(p);for(var g=p.next();!g.done;g=p.next())if(g=g.value,g.data.source.length){var v=document.createElement("img");v.src=g.data.source[0].url,v.style.top=(g.placeholder.top||0)+"%",v.style.height=100-(g.placeholder.top||0)+"%",v.style.left=(g.placeholder.left||0)+"%",v.style.maxWidth=100-(g.placeholder.left||0)+"%",v.style.objectFit="contain",v.style.position="absolute",l.B.appendChild(v)}e.L=i,e.g=new We(u,a+1,i.ads.length,!1,e.h),e.C=u,a===0&&Br(e,"breakStart"),kE(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.A&&e.A>t&&(e.h.currentTime=e.A),e.A=null)}}}function ad(e){if(e.g){for(;e.B.lastChild;)e.B.removeChild(e.B.firstChild);e.I||e.M.push(e.C.adId);var t=e.g.m;t!==void 0&&t?Br(e,"skip"):Br(e,"complete"),t=w(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.Ja(n.target,n.type,n.listener);e.m=[],e.u=[],t=e.g.getPositionInSequence(),n=e.g.getSequenceLength(),t===n&&Br(e,"breakEnd"),e.g=null,e.C=null,e.L=null}}function kE(e){var t=!1;e.h.paused?t=!0:(Br(e,"impression"),Br(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&Br(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||Br(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(Br(e,"impression"),Br(e,"start"),t=!1):Br(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){Br(e,"pause")}});for(var n=w(e.m),r=n.next();!r.done;r=n.next())r=r.value,e.o.D(r.target,r.type,r.listener)}function Br(e,t){var n=e.C.trackingEvents.find(function(a){return a.eventType==t});if(n||(n=e.L.adBreakTrackingEvents.find(function(a){return a.eventType==t})),n){var r={type:10};n=w(n.beaconUrls);for(var i=n.next();!i.done;i=n.next())(i=i.value)&&i!=""&&(i=qn([i],ja()),i.method="POST",e.K.request(7,i,r))}switch(t){case"impression":e.i(new Ae("ad-impression"));break;case"start":e.i(new Ae("ad-started",new Map().set("ad",e.g)));break;case"mute":e.i(new Ae("ad-muted"));break;case"unmute":e.i(new Ae("ad-volume-changed"));break;case"resume":e.i(new Ae("ad-resumed"));break;case"pause":e.i(new Ae("ad-paused"));break;case"firstQuartile":e.i(new Ae("ad-first-quartile"));break;case"midpoint":e.i(new Ae("ad-midpoint"));break;case"thirdQuartile":e.i(new Ae("ad-third-quartile"));break;case"complete":e.i(new Ae("ad-complete")),e.i(new Ae("ad-stopped"));break;case"skip":e.i(new Ae("ad-skipped")),e.i(new Ae("ad-stopped"));break;case"breakStart":e.B.setAttribute("ad-active","true");break;case"breakEnd":e.B.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new Ae("ad-skip-state-changed"))}}function et(e,t){this.g=e,this.i=null,this.h=t}f=et.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!1},f.hasCustomClick=function(){return!0},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return this.i?this.i.duration:-1},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},f.isPaused=function(){return this.h.paused},f.isSkippable=function(){return this.g.isSkippable()},f.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},f.canSkipNow=function(){return this.getTimeUntilSkippable()==0},f.skip=function(){this.h.currentTime+=this.getRemainingTime()},f.pause=function(){return this.h.pause()},f.play=function(){return this.h.play()},f.getVolume=function(){return this.h.volume},f.setVolume=function(e){this.h.volume=e},f.isMuted=function(){return this.h.muted},f.isLinear=function(){return!0},f.resize=function(){},f.setMuted=function(e){this.h.muted=e},f.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},f.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},f.getTitle=function(){return this.g.getTitle()},f.getDescription=function(){return this.g.getDescription()},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},f.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},f.getAdId=function(){return this.g.getAdId()},f.getCreativeAdId=function(){return this.g.getCreativeAdId()},f.getAdvertiserName=function(){return this.g.getAdvertiserName()},f.getMediaUrl=function(){return null},f.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},f.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},f.release=function(){this.h=this.i=this.g=null},Ee("shaka.ads.ServerSideAd",et),et.prototype.release=et.prototype.release,et.prototype.getPodIndex=et.prototype.getPodIndex,et.prototype.getTimeOffset=et.prototype.getTimeOffset,et.prototype.getMediaUrl=et.prototype.getMediaUrl,et.prototype.getAdvertiserName=et.prototype.getAdvertiserName,et.prototype.getCreativeAdId=et.prototype.getCreativeAdId,et.prototype.getAdId=et.prototype.getAdId,et.prototype.getVastMediaWidth=et.prototype.getVastMediaWidth,et.prototype.getVastMediaHeight=et.prototype.getVastMediaHeight,et.prototype.getVastMediaBitrate=et.prototype.getVastMediaBitrate,et.prototype.getDescription=et.prototype.getDescription,et.prototype.getTitle=et.prototype.getTitle,et.prototype.getPositionInSequence=et.prototype.getPositionInSequence,et.prototype.getSequenceLength=et.prototype.getSequenceLength,et.prototype.setMuted=et.prototype.setMuted,et.prototype.resize=et.prototype.resize,et.prototype.isLinear=et.prototype.isLinear,et.prototype.isMuted=et.prototype.isMuted,et.prototype.setVolume=et.prototype.setVolume,et.prototype.getVolume=et.prototype.getVolume,et.prototype.play=et.prototype.play,et.prototype.pause=et.prototype.pause,et.prototype.skip=et.prototype.skip,et.prototype.canSkipNow=et.prototype.canSkipNow,et.prototype.getTimeUntilSkippable=et.prototype.getTimeUntilSkippable,et.prototype.isSkippable=et.prototype.isSkippable,et.prototype.isPaused=et.prototype.isPaused,et.prototype.getRemainingTime=et.prototype.getRemainingTime,et.prototype.getMinSuggestedDuration=et.prototype.getMinSuggestedDuration,et.prototype.getDuration=et.prototype.getDuration,et.prototype.isUsingAnotherMediaElement=et.prototype.isUsingAnotherMediaElement,et.prototype.hasCustomClick=et.prototype.hasCustomClick,et.prototype.isClientRendering=et.prototype.isClientRendering,et.prototype.needsSkipUI=et.prototype.needsSkipUI;function TE(e,t,n,r){var i=this;this.u=e,this.l=t,this.j=null,this.F=NaN,this.i=r,this.G=!1,this.A=this.m=this.o=null,this.B="",this.C=[],this.h=new Ce,e=new google.ima.dai.api.UiSettings,e.setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.u,e),this.i(new Ae("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(a){pO(i,a)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){i.B.length?i.j.resolve(i.B):i.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),i.j=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(a){a=a.getAd(),i.m=new et(a,i.l),i.A&&(i.m.i=i.A),i.i(new Ae("ad-started",new Map().set("ad",i.m))),i.u.setAttribute("ad-active","true")}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){i.u.removeAttribute("ad-active");var a=i.l.currentTime;i.o&&i.o>a&&(i.l.currentTime=i.o,i.o=null)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(a){i.A=a.getStreamData().adProgressData,i.m&&(i.m.i=i.A)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){i.i(new Ae("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){i.i(new Ae("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){i.i(new Ae("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){i.i(new Ae("ad-complete")),i.i(new Ae("ad-stopped")),i.u.removeAttribute("ad-active"),i.m=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){i.i(new Ae("ad-skipped")),i.i(new Ae("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(a){var u=a.getStreamData();a=[],u=w(u.cuepoints);for(var l=u.next();!l.done;l=u.next())l=l.value,a.push({start:l.start,end:l.end});i.C=a,i.i(new Ae("ad-cue-points-changed",new Map().set("cuepoints",a)))})}f=TE.prototype,f.configure=function(){},f.stop=function(){this.B="",this.o=null,this.C=[]},f.release=function(){this.stop(),this.h&&this.h.release()},f.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},f.getCuePoints=function(){return this.C};function pO(e,t){e.i(new Ae("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.F))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.G||e.h.D(e.l,"seeked",function(){var n=e.l.currentTime;if(n!=0){e.g.streamTimeForContentTime(n);var r=e.g.previousCuePointForStreamTime(n);r&&!r.played&&(e.o=n,e.l.currentTime=r.start)}})}function Oe(){Xt.call(this),this.h=this.i=this.j=this.g=null,this.m=new dE,this.o=navigator.language,this.l=null}Te(Oe,Xt),f=Oe.prototype,f.setLocale=function(e){this.o=e},f.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},f.initInterstitial=function(e,t,n){var r=this;this.g&&this.g.release(),this.g=new gE(e,t,n,function(i){return uv(r,i)}),this.g.configure(this.l)},f.initClientSide=function(e,t,n){var r=this;if(!d.google||!google.ima||!google.ima.AdsLoader)throw new $(2,10,1e4);this.j&&this.j.release(),this.j=new rv(e,t,this.o,n,function(i){return uv(r,i)}),this.j.configure(this.l)},f.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),Xt.prototype.release.call(this)},f.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new Ae("ad-stopped")),this.dispatchEvent(new Ae("ad-content-attach-requested")),this.m=new dE},f.requestClientSideAds=function(e){if(!this.j)throw new $(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.G=Date.now()/1e3,t.m.requestAds(e)},f.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new $(1,10,10001);var t=this.j;t.B=e,t.g&&t.g.updateAdsRenderingSettings(t.B)},f.initMediaTailor=function(e,t,n){var r=this;this.i&&this.i.release(),this.i=new Lh(e,t,n,function(i){return uv(r,i)})},f.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new $(1,10,10005);var r=this.i;return n=n===void 0?"":n,r.l?e=Promise.reject(new $(1,10,10004)):(r.l=new Wt,uO(r,e,t),r.H=n||"",r.P=Date.now()/1e3,e=r.l),e},f.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new $(1,10,10005);var t=this.i;t.G=e,t.i(new Ae("ads-loaded",new Map().set("loadTime",0)))},f.initServerSide=function(e,t){var n=this;if(!d.google||!google.ima||!google.ima.dai)throw new $(2,10,10002);this.h&&this.h.release(),this.h=new TE(e,t,this.o,function(r){return uv(n,r)}),this.h.configure(this.l)},f.requestServerSideStream=function(e,t){if(t=t===void 0?"":t,!this.h)throw new $(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&Be('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 overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.14.6",n=this.h,n.j?e=Promise.reject(new $(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new Wt,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},f.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new $(1,10,10003);(e.mpt||e.mpv)&&Be('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 overridden.'),e.mpt="Shaka Player",e.mpv="v4.14.6",this.h.g.replaceAdTagParameters(e)},f.getServerSideCuePoints=function(){return ut("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},f.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},f.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:Q9(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},f.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},f.onDashTimedMetadata=function(e){this.h&&e.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},f.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},f.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},f.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&rO(this.g,n))},f.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var r=n.schemeIdUri;if(r=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||r=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,t=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",r=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",t||r)){for(var i=n.startTime,a=n.endTime,u=null,l=0,p,g=w(n.eventNode.children),v=g.next();!v.done;v=g.next())if(v=v.value,v.tagName=="AlternativeMPD"){if(v=v.attributes.uri){p=v;break}}else if(v.tagName=="InsertPresentation"||v.tagName=="ReplacePresentation"){var y=v.attributes.url;if(y){p=y,(g=st(v,"maxDuration",Fr))&&(u=g/n.timescale),(g=st(v,"returnOffset",Fr))&&(l=g/n.timescale),t&&l&&(a=i+l);break}}p&&Dh(e,[{id:n.id,groupId:null,startTime:i,endTime:a,uri:p,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:r?l:null,playoutLimit:u,once:!1,pre:!1,post:!1,timelineRange:t&&!r,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else(r=="urn:mpeg:dash:event:2012"||r=="urn:scte:dash:scte214-events")&&n.eventNode&&Nn(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&iO(this.g,n))}},f.addCustomInterstitial=function(e){if(!this.g)throw new $(1,10,10006);Dh(this.g,[e])},f.addAdUrlInterstitial=function(e){if(!this.g)throw new $(1,10,10006);return this.g.addAdUrlInterstitial(e)},f.getInterstitialPlayer=function(){if(!this.g)throw new $(1,10,10006);return this.g.If()};function uv(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;var n=t.ad;n&&!n.isLinear()&&e.m.j++;break;case"ad-complete":e.m.l++;break;case"ad-skipped":e.m.m++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}Ee("shaka.ads.AdManager",Oe),Oe.prototype.getInterstitialPlayer=Oe.prototype.getInterstitialPlayer,Oe.prototype.addAdUrlInterstitial=Oe.prototype.addAdUrlInterstitial,Oe.prototype.addCustomInterstitial=Oe.prototype.addCustomInterstitial,Oe.prototype.onDASHInterstitialMetadata=Oe.prototype.onDASHInterstitialMetadata,Oe.prototype.onHLSInterstitialMetadata=Oe.prototype.onHLSInterstitialMetadata,Oe.prototype.onCueMetadataChange=Oe.prototype.onCueMetadataChange,Oe.prototype.onHlsTimedMetadata=Oe.prototype.onHlsTimedMetadata,Oe.prototype.onDashTimedMetadata=Oe.prototype.onDashTimedMetadata,Oe.prototype.onManifestUpdated=Oe.prototype.onManifestUpdated,Oe.prototype.getStats=Oe.prototype.getStats,Oe.prototype.getCuePoints=Oe.prototype.getCuePoints,Oe.prototype.getServerSideCuePoints=Oe.prototype.getServerSideCuePoints,Oe.prototype.replaceServerSideAdTagParameters=Oe.prototype.replaceServerSideAdTagParameters,Oe.prototype.requestServerSideStream=Oe.prototype.requestServerSideStream,Oe.prototype.initServerSide=Oe.prototype.initServerSide,Oe.prototype.addMediaTailorTrackingUrl=Oe.prototype.addMediaTailorTrackingUrl,Oe.prototype.requestMediaTailorStream=Oe.prototype.requestMediaTailorStream,Oe.prototype.initMediaTailor=Oe.prototype.initMediaTailor,Oe.prototype.updateClientSideAdsRenderingSettings=Oe.prototype.updateClientSideAdsRenderingSettings,Oe.prototype.requestClientSideAds=Oe.prototype.requestClientSideAds,Oe.prototype.onAssetUnload=Oe.prototype.onAssetUnload,Oe.prototype.release=Oe.prototype.release,Oe.prototype.initClientSide=Oe.prototype.initClientSide,Oe.prototype.initInterstitial=Oe.prototype.initInterstitial,Oe.prototype.configure=Oe.prototype.configure,Oe.prototype.setLocale=Oe.prototype.setLocale,Oe.ADS_LOADED="ads-loaded",Oe.AD_STARTED="ad-started",Oe.AD_FIRST_QUARTILE="ad-first-quartile",Oe.AD_MIDPOINT="ad-midpoint",Oe.AD_THIRD_QUARTILE="ad-third-quartile",Oe.AD_COMPLETE="ad-complete",Oe.AD_STOPPED="ad-stopped",Oe.AD_SKIPPED="ad-skipped",Oe.AD_VOLUME_CHANGED="ad-volume-changed",Oe.AD_MUTED="ad-muted",Oe.AD_PAUSED="ad-paused",Oe.AD_RESUMED="ad-resumed",Oe.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Oe.CUEPOINTS_CHANGED="ad-cue-points-changed",Oe.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Oe.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Oe.AD_CLICKED="ad-clicked",Oe.AD_PROGRESS="ad-progress",Oe.AD_BUFFERING="ad-buffering",Oe.AD_IMPRESSION="ad-impression",Oe.AD_DURATION_CHANGED="ad-duration-changed",Oe.AD_CLOSED="ad-closed",Oe.AD_LOADED="ad-loaded",Oe.ALL_ADS_COMPLETED="all-ads-completed",Oe.AD_LINEAR_CHANGED="ad-linear-changed",Oe.AD_METADATA="ad-metadata",Oe.AD_RECOVERABLE_ERROR="ad-recoverable-error",Oe.AD_ERROR="ad-error",Oe.AD_BREAK_READY="ad-break-ready",Oe.AD_INTERACTION="ad-interaction",Oe.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",Oe.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",Oe.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",nv=function(){return new Oe};function AE(e){return JSON.stringify(e,function(t,n){if(typeof n!="function"){if(n instanceof Event||n instanceof Ae){var r={};for(i in n)(t=n[i])&&typeof t=="object"?i=="detail"&&(r[i]=t):i in Event||(r[i]=t);return r}if(n instanceof Error){var i=new Set(["name","message","stack"]);for(r in n)i.add(r);for(r=w(Object.getOwnPropertyNames(n)),t=r.next();!t.done;t=r.next())i.add(t.value);for(r={},i=w(i),t=i.next();!t.done;t=i.next())t=t.value,r[t]=n[t];n={__type__:"Error",contents:r}}else if(n instanceof TimeRanges){for(i={__type__:"TimeRanges",length:n.length,start:[],end:[]},n=w($o(n)),r=n.next();!r.done;r=n.next())r=r.value,t=r.end,i.start.push(r.start),i.end.push(t);n=i}else n=ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(n)}:typeof n=="number"?isNaN(n)?"NaN":isFinite(n)?n:0>n?"-Infinity":"Infinity":n;return n}})}function O2(e){return JSON.parse(e,function(t,n){if(n=="NaN")var r=NaN;else if(n=="-Infinity")r=-1/0;else if(n=="Infinity")r=1/0;else if(n&&typeof n=="object"&&n.__type__=="TimeRanges")r=hO(n);else if(n&&typeof n=="object"&&n.__type__=="Uint8Array")r=new Uint8Array(n.entries);else if(n&&typeof n=="object"&&n.__type__=="Error"){t=n.contents,n=Error(t.message);for(r in t)n[r]=t[r];r=n}else r=n;return r})}function hO(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}var EE="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),fO="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),U2=["loop","playbackRate"],gO=["pause","play"],F2=new Map().set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("getImageTracks",2).set("getThumbnails",2).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),j2=new Map().set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getTextTracks",2).set("getVariantTracks",2),CE=new Map().set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),IE=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],ME=[["isTextTrackVisible","setTextTrackVisibility"]],mO="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),vO=["attach","attachCanvas","detach","load","unload"];function B2(e,t,n,r,i,a,u){var l=this;this.G=e,this.K=u,this.l=new Tt(t),this.L=n,this.u=!1,this.A=r,this.F=i,this.M=a,this.i=this.m=!1,this.I="",this.o=null,this.B=function(){return V2(l)},this.C=function(p,g){switch(p=O2(g),p.type){case"event":var v=p.targetName,y=K5(p.event);l.A(v,y);break;case"update":v=p.update;for(y in v){p=l.g[y]||{};for(var x in v[y])p[x]=v[y][x]}l.u&&(l.L(),l.u=!1);break;case"asyncComplete":if(y=p.id,x=p.error,p=l.h.get(y),l.h.delete(y),p)if(x){y=new $(x.severity,x.category,x.code);for(v in x)y[v]=x[v];p.reject(y)}else p.resolve()}},this.g={video:{},player:{}},this.H=0,this.h=new Map,this.j=null,Nh.add(this)}f=B2.prototype,f.destroy=function(){return Nh.delete(this),$2(this),ma&&DE(this),this.l&&(this.l.stop(),this.l=null),this.F=this.A=null,this.i=this.m=!1,this.C=this.B=this.j=this.h=this.g=this.o=null,Promise.resolve()},f.qb=function(){return this.i},f.ag=function(){return this.I},f.init=function(){if(this.G.length)if(d.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.sb();var e=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=w(Nh),r=n.next();!r.done;r=n.next()){r=r.value;var i=t;r.j=new Wt,r.u=!0,lv(r,i)}},function(t){for(var n=w(Nh),r=n.next();!r.done;r=n.next())r=r.value,cv=t=="available",r.l.sb()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),cv&&this.l.da(bO),(e=ma)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Wt,this.u=!0,lv(this,e)):ma=null}else d.__onGCastApiAvailable!==PE&&(dv=d.__onGCastApiAvailable||null,d.__onGCastApiAvailable=PE)},f.ig=function(e){this.o=e,this.i&&Rh(this,{type:"appData",appData:this.o})},f.cast=function(){var e=this;return P(function(t){if(!e.m)throw new $(1,8,8e3);if(!cv)throw new $(1,8,8001);if(e.i)throw new $(1,8,8002);return e.j=new Wt,chrome.cast.requestSession(function(n){return lv(e,n)},function(n){return _E(e,n)}),T(t,e.j,0)})};function yO(e){e.i&&chrome.cast.requestSession(function(t){return lv(e,t)},function(t){return _E(e,t)})}f.Pc=function(){if(this.i){if($2(this),ma){DE(this);try{ma.stop(function(){},function(){})}catch{}ma=null}V2(this)}},f.get=function(e,t){var n=this;if(e=="video"){if(gO.includes(t))return function(){return n.oh.apply(n,[e,t].concat(U(Re.apply(0,arguments))))}}else if(e=="player"){if(CE.has(t)&&!this.get("player","isLive")())return function(){};if(mO.includes(t))return function(){return n.oh.apply(n,[e,t].concat(U(Re.apply(0,arguments))))};if(vO.includes(t))return function(){return n.pj.apply(n,[e,t].concat(U(Re.apply(0,arguments))))};if(F2.has(t)||j2.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},f.set=function(e,t,n){this.g[e][t]=n,Rh(this,{type:"set",targetName:e,property:t,value:n})};function lv(e,t){var n=e.M();ma=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),V2(e),Rh(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function _E(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new $(2,8,n,t))}f.oh=function(e,t){Rh(this,{type:"call",targetName:e,methodName:t,args:Re.apply(2,arguments)})},f.pj=function(e,t){var n=Re.apply(2,arguments),r=new Wt,i=this.H.toString();this.H++,this.h.set(i,r);try{Rh(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:i})}catch(a){r.reject(a)}return r};function DE(e){var t=ma;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function V2(e){var t=ma?ma.status=="connected":!1;if(e.i&&!t){e.F();for(var n in e.g)e.g[n]={};$2(e)}e.i=t,e.I=t?ma.receiver.friendlyName:"",e.l.sb()}function $2(e){if(e.h)for(var t=w(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var r=e.h.get(n);e.h.delete(n),r.reject(new $(1,7,7e3))}}function Rh(e,t){t=AE(t);var n=ma;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},de)}catch(r){throw t=new $(2,8,8005,r),n=new Ae("error",new Map().set("detail",t)),e.A("player",n),e.Pc(),t}}var bO=.02,cv=!1,ma=null,dv=null,Nh=new Set;function PE(e){if(dv?d.__onGCastApiAvailable=dv:delete d.__onGCastApiAvailable,dv=null,e)for(var t=w(Nh),n=t.next();!n.done;n=t.next())n.value.init();typeof d.__onGCastApiAvailable=="function"&&d.__onGCastApiAvailable(e)}function Bn(e,t,n,r){r=r===void 0?!1:r,Xt.call(this);var i=this;this.i=e,this.h=t,this.m=this.o=this.l=this.u=this.j=null,this.C=n,this.B=r,this.A=new Map,this.g=null,d.chrome?(this.g=new B2(n,function(){return NE(i)},function(){return OE(i)},function(a,u){return FE(i,a,u)},function(){return UE(i)},function(){return RE(i)},r),wO(this)):(this.j=this.i,this.u=this.h)}Te(Bn,Xt),f=Bn.prototype,f.destroy=function(e){return this.g&&e&&this.g.Pc(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.j=this.i=null,Xt.prototype.release.call(this),Promise.all(e)},f.Li=function(){return this.j},f.If=function(){return this.u},f.Xh=function(){return this.g?this.g.m&&cv:!1},f.qb=function(){return this.g?this.g.qb():!1},f.ag=function(){return this.g?this.g.ag():""},f.cast=function(){var e=this;return P(function(t){return t.g==1?e.g?T(t,e.g.cast(),2):t.return():e.h?T(t,e.h.kc(),0):t.return()})},f.ig=function(e){this.g&&this.g.ig(e)},f.Ej=function(){this.g&&yO(this.g)},f.Pc=function(){this.g&&this.g.Pc()},f.Yh=function(e,t){t=t===void 0?!1:t;var n=this;return P(function(r){if(r.g==1)return e==n.C&&t==n.B||(n.C=e,n.B=t,!n.g)?r.return():(n.g.Pc(),T(r,n.g.destroy(),2));n.g=null,n.g=new B2(e,function(){return NE(n)},function(){return OE(n)},function(i,a){return FE(n,i,a)},function(){return UE(n)},function(){return RE(n)},t),n.g.init(),oe(r)})};function wO(e){e.g.init(),e.m=new Ce;for(var t=w(EE),n=t.next();!n.done;n=t.next())e.m.D(e.i,n.value,function(a){e.g.qb()||(a=K5(a),e.l.dispatchEvent(a))});for(var r in sm)e.m.D(e.h,sm[r],function(a){e.g.qb()||e.o.dispatchEvent(a)});e.j={},t={};for(var i in e.i)t={wd:t.wd},t.wd=i,Object.defineProperty(e.j,t.wd,{configurable:!1,enumerable:!0,get:function(a){return function(){return SO(e,a.wd)}}(t),set:function(a){return function(u){var l=a.wd;e.g.qb()?e.g.set("video",l,u):e.i[l]=u}}(t)});e.u={},LE(e,function(a){Object.defineProperty(e.u,a,{configurable:!1,enumerable:!0,get:function(){return kO(e,a)}})}),xO(e),e.l=new Xt,e.l.Ge=e.j,e.o=new Xt,e.o.Ge=e.u}function xO(e){var t=new Map;LE(e,function(n,r){t.has(r)?(r=t.get(r),n.length<r.length?e.A.set(n,r):e.A.set(r,n)):t.set(r,n)})}function LE(e,t){function n(p){return p=="constructor"||typeof r[p]!="function"?!1:!i.has(p)}var r=e.h,i=new Set,a;for(a in r)n(a)&&(i.add(a),t(a,r[a]));for(e=Object.getPrototypeOf(r),a=Object.getPrototypeOf({});e&&e!=a;){for(var u=w(Object.getOwnPropertyNames(e)),l=u.next();!l.done;l=u.next())l=l.value,n(l)&&(i.add(l),t(l,r[l]));e=Object.getPrototypeOf(e)}}function RE(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Qc(),startTime:null};e.i.pause();for(var n=w(U2),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.i[r];for(e.i.ended||(t.startTime=e.i.currentTime),n=w(IE),r=n.next();!r.done;r=n.next()){var i=r.value;r=i[1],i=e.h[i[0]](),t.player[r]=i}for(n=w(ME),r=n.next();!r.done;r=n.next())i=r.value,r=i[1],i=e.h[i[0]](),t.playerAfterLoad[r]=i;return t}function NE(e){var t=new Ae("caststatuschanged");e.dispatchEvent(t)}function OE(e){var t=new Ae(e.j.paused?"pause":"play");e.l.dispatchEvent(t)}function UE(e){for(var t=w(IE),n=t.next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.h[n](r)}var i=e.g.get("player","getAssetUri")();r=e.g.get("video","ended"),t=Promise.resolve();var a=e.i.autoplay;n=null,r||(n=e.g.get("video","currentTime"));var u;(r=e.g.get("player","getTextTracks")())&&r.length&&(u=r.find(function(g){return g.active}));var l=e.g.get("player","isTextTrackVisible")();i&&(e.i.autoplay=!1,t=e.h.load(i,n));var p={};for(n=w(U2),r=n.next();!r.done;r=n.next())r=r.value,p[r]=e.g.get("video",r);t.then(function(){if(e.i){for(var g=w(U2),v=g.next();!v.done;v=g.next())v=v.value,e.i[v]=p[v];for(g=w(ME),v=g.next();!v.done;v=g.next()){var y=v.value;v=y[1],y=e.g.get("player",y[0])(),e.h[v](y)}e.h.zh(l),u&&e.h.hg(u.language,u.roles,u.forced),e.i.autoplay=a,i&&e.i.play()}},function(g){g=new Map().set("detail",g),g=new Ae("error",g),e.h.dispatchEvent(g)})}function SO(e,t){if(t=="addEventListener")return function(r,i,a){return e.l.addEventListener(r,i,a)};if(t=="removeEventListener")return function(r,i,a){return e.l.removeEventListener(r,i,a)};if(e.g.qb()&&Object.keys(e.g.g.video).length==0){var n=e.i[t];if(typeof n!="function")return n}return e.g.qb()?e.g.get("video",t):(t=e.i[t],typeof t=="function"&&(t=t.bind(e.i)),t)}function kO(e,t){if(e.A.has(t)&&(t=e.A.get(t)),t=="addEventListener")return function(n,r,i){return e.o.addEventListener(n,r,i)};if(t=="removeEventListener")return function(n,r,i){return e.o.removeEventListener(n,r,i)};if(t=="getMediaElement")return function(){return e.j};if(t=="getSharedConfiguration")return e.g.get("player","getConfiguration");if(t=="getNetworkingEngine")return function(){return e.h.xb()};if(t=="getDrmEngine")return function(){return e.h.C};if(t=="getAdManager")return function(){return e.h.Pg()};if(t=="setVideoContainer")return function(n){return e.h.Ch(n)};if(e.g.qb()){if(t=="getManifest"||t=="drmInfo")return function(){return Be(t+"() does not work while casting!"),null};if(t=="attach"||t=="detach")return function(){return Be(t+"() does not work while casting!"),Promise.resolve()}}return e.g.qb()&&Object.keys(e.g.g.video).length==0&&(F2.has(t)||j2.has(t))||!e.g.qb()?e.h[t].bind(e.h):e.g.get("player",t)}function FE(e,t,n){e.g.qb()&&(t=="video"?e.l.dispatchEvent(n):t=="player"&&e.o.dispatchEvent(n))}Ee("shaka.cast.CastProxy",Bn),Bn.prototype.changeReceiverId=Bn.prototype.Yh,Bn.prototype.forceDisconnect=Bn.prototype.Pc,Bn.prototype.suggestDisconnect=Bn.prototype.Ej,Bn.prototype.setAppData=Bn.prototype.ig,Bn.prototype.cast=Bn.prototype.cast,Bn.prototype.receiverName=Bn.prototype.ag,Bn.prototype.isCasting=Bn.prototype.qb,Bn.prototype.canCast=Bn.prototype.Xh,Bn.prototype.getPlayer=Bn.prototype.If,Bn.prototype.getVideo=Bn.prototype.Li,Bn.prototype.destroy=Bn.prototype.destroy;function Sr(e,t,n,r){Xt.call(this);var i=this;this.g=e,this.h=t,this.j=new Ce,this.H={video:e,player:t},this.F=n||function(){},this.I=r||function(a){return a},this.i=null,this.G=!1,this.o=!0,this.m=0,this.B=!1,this.A=!0,this.u=this.l=null,this.C=new Tt(function(){z2(i)}),TO(this)}Te(Sr,Xt),f=Sr.prototype,f.isConnected=function(){return this.G},f.Si=function(){return this.o},f.Bj=function(e){this.i=e},f.bi=function(){this.i=null},f.Cj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},f.Aj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},f.zj=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},f.destroy=function(){var e=this,t,n;return P(function(r){if(r.g==1)return e.j&&(e.j.release(),e.j=null),t=[],e.h&&(t.push(e.h.destroy()),e.h=null),e.C&&(e.C.stop(),e.C=null),e.g=null,e.H=null,e.F=null,e.G=!1,e.o=!0,e.l=null,e.u=null,Xt.prototype.release.call(e),T(r,Promise.all(t),2);n=cast.receiver.CastReceiverManager.getInstance(),n.stop(),oe(r)})};function TO(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return jE(e)},t.onSenderDisconnected=function(){return jE(e)},t.onSystemVolumeChanged=function(){var i=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();i&&Ko(e,{type:"update",update:{video:{volume:i.level,muted:i.muted}}},e.l),Ko(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.u=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.u.onMessage=function(i){return CO(e,i)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(i){return EO(e,i)},t.start(),t=w(EE);for(var n=t.next();!n.done;n=t.next())e.j.D(e.g,n.value,function(i){return BE(e,"video",i)});for(var r in sm)e.j.D(e.h,sm[r],function(i){return BE(e,"player",i)});e.j.D(e.g,"loadeddata",function(){e.B=!0}),e.j.D(e.h,"loading",function(){e.o=!1,od(e)}),e.j.D(e.g,"playing",function(){e.o=!1,od(e)}),e.j.D(e.g,"pause",function(){od(e)}),e.j.D(e.h,"unloading",function(){e.o=!0,od(e)}),e.j.D(e.g,"ended",function(){new Tt(function(){e.g&&e.g.ended&&(e.o=!0,od(e))}).da(MO)})}function jE(e){e.m=0,e.A=!0,e.G=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0,od(e)}function od(e){var t;P(function(n){if(n.g==1)return T(n,Promise.resolve(),2);if(!e.h)return n.return();t=new Ae("caststatuschanged"),e.dispatchEvent(t),VE(e)||Wo(e),oe(n)})}function AO(e,t,n){var r,i,a,u,l,p,g,v,y,x;P(function(S){switch(S.g){case 1:for(r in t.player)i=t.player[r],e.h[r](i);return e.F(n),a=e.g.autoplay,t.manifest?(e.g.autoplay=!1,ve(S,5),T(S,e.h.load(t.manifest,t.startTime),7)):T(S,Promise.resolve(),3);case 7:V(S,3);break;case 5:return u=W(S),l=new Map().set("detail",u),p=new Ae("error",l),e.h&&e.h.dispatchEvent(p),S.return();case 3:if(!e.h)return S.return();for(g in t.video)v=t.video[g],e.g[g]=v;for(y in t.playerAfterLoad)x=t.playerAfterLoad[y],e.h[y](x);e.g.autoplay=a,t.manifest&&(e.g.play(),Wo(e)),oe(S)}})}function BE(e,t,n){e.h&&(z2(e),Ko(e,{type:"event",targetName:t,event:n},e.l))}function z2(e){e.C.da(IO);for(var t={video:{},player:{}},n=w(fO),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.g[r];e.h.U()&&CE.forEach(function(i,a){e.m%i==0&&(t.player[a]=e.h[a]())}),F2.forEach(function(i,a){e.m%i==0&&(t.player[a]=e.h[a]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),Ko(e,{type:"update",update:t},e.l),j2.forEach(function(i,a){e.m%i==0&&(i={player:{}},i.player[a]=e.h[a](),Ko(e,{type:"update",update:i},e.l))}),e.B&&(e.m+=1),VE(e)}function VE(e){return e.A&&(e.g.duration||e.h.U())?(H2(e),e.A=!1,!0):!1}function H2(e,t){var n={contentId:e.h.Qc(),streamType:e.h.U()?"LIVE":"BUFFERED",contentType:""};e.h.U()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),Wo(e,t===void 0?0:t,n)}function EO(e,t){var n=O2(t.data);switch(n.type){case"init":e.m=0,e.B=!1,e.A=!0,AO(e,n.initState,n.appData),z2(e);break;case"appData":e.F(n.appData);break;case"set":var r=n.targetName,i=n.property;if(n=n.value,r=="video"){if(t=cast.receiver.CastReceiverManager.getInstance(),i=="volume"){t.setSystemVolumeLevel(n);break}else if(i=="muted"){t.setSystemVolumeMuted(n);break}}e.H[r][i]=n;break;case"call":r=e.H[n.targetName],r[n.methodName].apply(r,n.args);break;case"asyncCall":r=n.targetName,i=n.methodName,r=="player"&&i=="load"&&(e.m=0,e.B=!1);var a=n.id,u=t.senderId;t=e.H[r],n=t[i].apply(t,n.args),r=="player"&&i=="load"&&(n=n.then(function(){e.A=!0})),n.then(function(){return $E(e,u,a,null)},function(l){return $E(e,u,a,l)})}}function CO(e,t){var n=O2(t.data);switch(n.type){case"PLAY":e.g.play(),Wo(e);break;case"PAUSE":e.g.pause(),Wo(e);break;case"SEEK":t=n.currentTime;var r=n.resumeState;t!=null&&(e.g.currentTime=Number(t)),r&&r=="PLAYBACK_START"?(e.g.play(),Wo(e)):r&&r=="PLAYBACK_PAUSE"&&(e.g.pause(),Wo(e));break;case"STOP":e.h.kc().then(function(){e.h&&Wo(e)});break;case"GET_STATUS":H2(e,Number(n.requestId));break;case"VOLUME":r=n.volume,t=r.level,r=r.muted;var i=e.g.volume,a=e.g.muted;t!=null&&(e.g.volume=Number(t)),r!=null&&(e.g.muted=r),i==e.g.volume&&a==e.g.muted||Wo(e);break;case"LOAD":e.m=0,e.B=!1,e.A=!1,t=n.media,r=n.currentTime,i=e.I(t.contentId),a=n.autoplay||!0,e.F(t.customData),a&&(e.g.autoplay=!0),e.h.load(i,r).then(function(){e.h&&H2(e)}).catch(function(u){var l="LOAD_FAILED";u.category==7&&u.code==7e3&&(l="LOAD_CANCELLED"),Ko(e,{requestId:Number(n.requestId),type:l},e.u)});break;default:Ko(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}}function $E(e,t,n,r){e.h&&Ko(e,{type:"asyncComplete",id:n,error:r},e.l,t)}function Ko(e,t,n,r){e.G&&(e=AE(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function Wo(e,t,n){n=n===void 0?null:n;var r={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?_O:e.h.Of()?PO:e.g.paused?LO:DO,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(r.media=n),Ko(e,{requestId:t===void 0?0:t,type:"MEDIA_STATUS",status:[r]},e.u)}Ee("shaka.cast.CastReceiver",Sr),Sr.prototype.destroy=Sr.prototype.destroy,Sr.prototype.setContentArtist=Sr.prototype.zj,Sr.prototype.setContentImage=Sr.prototype.Aj,Sr.prototype.setContentTitle=Sr.prototype.Cj,Sr.prototype.clearContentMetadata=Sr.prototype.bi,Sr.prototype.setContentMetadata=Sr.prototype.Bj,Sr.prototype.isIdle=Sr.prototype.Si,Sr.prototype.isConnected=Sr.prototype.isConnected;var IO=.5,MO=5,_O="IDLE",DO="PLAYING",PO="BUFFERING",LO="PAUSED";function zE(e,t,n,r,i){if(r>=i)return null;for(var a=-1,u=-1,l=0;l<n.length;l++)if(n[l].some(function(B){return B!=null&&B.g.trim()!=""})){a=l;break}for(l=n.length-1;0<=l;l--)if(n[l].some(function(B){return B!=null&&B.g.trim()!=""})){u=l;break}if(a===-1||u===-1)return null;for(var p=l=!1,g="white",v="black",y=q2(r,i,l,p,g,v);a<=u;a++){for(var x=n[a],S=-1,k=-1,C=0;C<x.length;C++)if(x[C]!=null&&x[C].g.trim()!==""){S=C;break}for(C=x.length-1;0<=C;C--)if(x[C]!=null&&x[C].g.trim()!==""){k=C;break}if(S===-1||k===-1)x=HE(r,i),e.nestedCues.push(x);else{for(;S<=k;S++)if(C=x[S]){var E=C.l,I=C.i,_=C.j,j=C.h;(E!=l||I!=p||_!=g||j!=v)&&(y.payload&&e.nestedCues.push(y),y=q2(r,i,E,I,_,j),l=E,p=I,g=_,v=j),y.payload+=C.g}else y.payload+=" ";y.payload&&e.nestedCues.push(y),a!==u&&(y=HE(r,i),e.nestedCues.push(y)),y=q2(r,i,l,p,g,v)}}return e.nestedCues.length?{cue:e,stream:t}:null}function q2(e,t,n,r,i,a){return e=new un(e,t,""),n&&e.textDecoration.push(No),r&&(e.fontStyle=_c),e.color=i,e.backgroundColor=a,e}function HE(e,t){return e=new un(e,t,""),e.lineBreak=!0,e}function qE(e,t,n,r,i){this.g=e,this.l=t,this.i=n,this.h=r,this.j=i}function G2(e,t){this.i=[],this.g=1,this.h=0,this.C=e,this.B=t,this.j=this.m=!1,this.l="white",this.o="black",this.u=this.A=null,Oh(this)}function pv(e,t,n){var r="CC"+((e.C<<1|e.B)+1),i=new un(t,n,"");i.lineInterpretation=1;var a=WE.get(e.g);return a&&(i.line=a),e.u!=null&&e.A!=null&&(i.position=10+Math.min(70,10*e.u)+2.5*e.A),(t=zE(i,r,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(a=WE.get(e.g+3-t.cue.nestedCues.length))&&(i.line=a),t}function Oh(e){Xo(e,0,15),e.g=1}function sd(e,t,n){if(!(32>n||127<n)){var r="";switch(t){case 0:r=KE.has(n)?KE.get(n):String.fromCharCode(n);break;case 1:r=RO.get(n);break;case 2:e.i[e.g].pop(),r=NO.get(n);break;case 3:e.i[e.g].pop(),r=OO.get(n)}r&&e.i[e.g].push(new qE(r,e.m,e.j,e.o,e.l))}}function GE(e,t,n,r){if(!(0>n||0>t))if(t>=n)for(--r;0<=r;r--)e.i[t+r]=e.i[n+r].map(function(a){return a});else for(var i=0;i<r;i++)e.i[t+i]=e.i[n+i].map(function(a){return a})}function Xo(e,t,n){for(var r=0;r<=n;r++)e.i[t+r]=[]}var KE=new Map([[39,"\u2019"],[42,"\xE1"],[92,"\xE9"],[92,"\xE9"],[94,"\xED"],[95,"\xF3"],[96,"\xFA"],[123,"\xE7"],[124,"\xF7"],[125,"\xD1"],[126,"\xF1"],[127,"\u2588"]]),RO=new Map([[48,"\xAE"],[49,"\xB0"],[50,"\xBD"],[51,"\xBF"],[52,"\u2122"],[53,"\xA2"],[54,"\xA3"],[55,"\u266A"],[56,"\xE0"],[57," "],[58,"\xE8"],[59,"\xE2"],[60,"\xEA"],[61,"\xEE"],[62,"\xF4"],[63,"\xFB"]]),NO=new Map([[32,"\xC1"],[33,"\xC9"],[34,"\xD3"],[35,"\xDA"],[36,"\xDC"],[37,"\xFC"],[38,"\u2018"],[39,"\xA1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\xA9"],[44,"\u2120"],[45,"\xB7"],[46,"\u201C"],[47,"\u201D"],[48,"\xC0"],[49,"\xC2"],[50,"\xC7"],[51,"\xC8"],[52,"\xCA"],[53,"\xCB"],[54,"\xEB"],[55,"\xCE"],[56,"\xCF"],[57,"\xEF"],[58,"\xD4"],[59,"\xD9"],[60,"\xF9"],[61,"\xDB"],[62,"\xAB"],[63,"\xBB"]]),OO=new Map([[32,"\xC3"],[33,"\xE3"],[34,"\xCD"],[35,"\xCC"],[36,"\xEC"],[37,"\xD2"],[38,"\xF2"],[39,"\xD5"],[40,"\xF5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\xC4"],[49,"\xE4"],[50,"\xD6"],[51,"\xF6"],[52,"\xDF"],[53,"\xA5"],[54,"\xA4"],[55,"\u2502"],[56,"\xC5"],[57,"\xE5"],[58,"\xD8"],[59,"\xF8"],[60,"\u250C"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),WE=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function hv(e,t){this.h=0,this.o=new G2(e,t),this.i=new G2(e,t),this.g=this.j=new G2(e,t),this.l=0,this.m=null}function K2(e,t,n){e.g=e.i;var r=e.g,i=null;return e.h!==3&&e.h!==4&&(i=pv(r,e.l,n),n=e.i,n.g=0<n.h?n.h:0,Xo(n,0,15),n=e.j,n.g=0<n.h?n.h:0,Xo(n,0,15),r.g=15),e.h=3,r.h=t,i}function XE(e){e.h=1,e.g=e.j,e.g.h=0}function YE(e){$t("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var UO="black green blue cyan red yellow magenta black".split(" "),JE="white green blue cyan red yellow magenta white_italics".split(" ");function W2(e,t){this.I=t,this.M=e,this.K=this.l=!1,this.m=this.o=this.G=this.L=this.H=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.C=this.A=!1,this.B="white",this.u="black",X2(this)}function X2(e){e.i=[];for(var t=0;16>t;t++)e.i.push(Y2())}function Y2(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function $s(e,t){QE(e)&&(e.i[e.h][e.g]=new qE(t,e.C,e.A,e.u,e.B),e.g++)}function QE(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}W2.prototype.isVisible=function(){return this.l};function FO(e){for(var t=0,n=1;16>n;n++,t++)e.i[t]=e.i[n];for(n=0;1>n;n++,t++)e.i[t]=Y2()}function cl(e,t,n){var r=new un(e.j,t,"");r.textAlign=e.F===0?"left":e.F===1?"right":ro;var i=r.region;switch(e.I&&(i.id+="svc"+e.I),i.id+="win"+e.M,i.height=e.o,i.width=e.m,i.heightUnits=2,i.widthUnits=2,i.viewportAnchorX=e.H,i.viewportAnchorY=e.L,i.viewportAnchorUnits=e.K?ci:2,e.G){case 0:i.regionAnchorX=0,i.regionAnchorY=0;break;case 1:i.regionAnchorX=50,i.regionAnchorY=0;break;case 2:i.regionAnchorX=100,i.regionAnchorY=0;break;case 3:i.regionAnchorX=0,i.regionAnchorY=50;break;case 4:i.regionAnchorX=50,i.regionAnchorY=50;break;case 5:i.regionAnchorX=100,i.regionAnchorY=50;break;case 6:i.regionAnchorX=0,i.regionAnchorY=100;break;case 7:i.regionAnchorX=50,i.regionAnchorY=100;break;case 8:i.regionAnchorX=100,i.regionAnchorY=100}return(n=zE(r,"svc"+n,e.i,e.j,t))&&(e.j=t),n}W2.prototype.display=function(){this.l=!0};function jO(){this.i=[],this.h=null,this.g=0}function BO(e,t){t.type===3?(e.g=2*(t.value&63)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),e.g===0&&(e.i.push(new Uh(e.h)),e.h=null,e.g=0))}function Uh(e){this.g=0,this.h=e}Uh.prototype.ta=function(){return this.g<this.h.length},Uh.prototype.Ba=function(){return this.g};function Gn(e){if(!e.ta())throw new $(2,2,3e3);return e.h[e.g++]}Uh.prototype.skip=function(e){if(this.g+e>this.h.length)throw new $(2,2,3e3);this.g+=e},Uh.prototype.qh=function(e){if(0>this.g-e)throw new $(2,2,3e3);this.g-=e};function VO(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function $O(e,t,n,r){if(!e.g)return[];if(n==24)return n=Gn(t).value,r=Gn(t).value,n=function(a){return a.map(function(u){return("0"+(u&255).toString(16)).slice(-2)}).join("")}([n,r]),$s(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var i=null;switch(n){case 8:!QE(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(i=cl(t,r,e.i)),t.h+1>=t.o?FO(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(i=cl(t,r,e.i)),t.i[t.h]=Y2(),t.g=0;break;case 12:t.isVisible()&&(i=cl(t,r,e.i)),X2(t),t.h=0,t.g=0}return i?[i]:[]}function zO(e,t,n,r){if(128<=n&&135>=n)r=n&7,e.h[r]&&(e.g=e.h[r]);else{if(n===136){n=Gn(t).value,t=[],n=w(Fh(e,n));for(var i=n.next();!i.done;i=n.next()){if(i=e.h[i.value],i.isVisible()){var a=cl(i,r,e.i);a&&t.push(a)}X2(i)}return t}if(n===137)for(t=Gn(t).value,t=w(Fh(e,t)),n=t.next();!n.done;n=t.next())n=e.h[n.value],n.isVisible()||(n.j=r),n.display();else{if(n===138){for(n=Gn(t).value,t=null,n=w(Fh(e,n)),i=n.next();!i.done;i=n.next())i=e.h[i.value],i.isVisible()&&(t=cl(i,r,e.i)),i.l=!1;return t?[t]:[]}if(n===139){for(n=Gn(t).value,t=null,n=w(Fh(e,n)),i=n.next();!i.done;i=n.next())i=e.h[i.value],i.isVisible()?t=cl(i,r,e.i):i.j=r,i.l=!i.l;return t?[t]:[]}if(n===140)return t=Gn(t).value,ZE(e,t,r);if(n===143)return r=ZE(e,255,r),eC(e),r;if(n===144)t.skip(1),r=Gn(t).value,e.g&&(e.g.A=0<(r&128),e.g.C=0<(r&64));else if(n===145)r=Gn(t).value,n=Gn(t).value,t.skip(1),e.g&&(t=tC((n&48)>>4,(n&12)>>2,n&3),e.g.B=tC((r&48)>>4,(r&12)>>2,r&3),e.g.u=t);else if(n===146)r=Gn(t).value,t=Gn(t).value,e.g&&(e=e.g,e.h=r&15,e.g=t&63);else if(n===151)t.skip(1),t.skip(1),r=Gn(t).value,t.skip(1),e.g&&(e.g.F=r&3);else if(152<=n&&159>=n){n=(n&15)-8,i=e.h[n]!==null,i||(a=new W2(n,e.i),a.j=r,e.h[n]=a),r=Gn(t).value,a=Gn(t).value;var u=Gn(t).value,l=Gn(t).value,p=Gn(t).value;t=Gn(t).value,i&&!(t&7)||(t=e.h[n],t.h=0,t.g=0,t.C=!1,t.A=!1,t.B="white",t.u="black"),t=e.h[n],t.l=0<(r&32),t.L=a&127,t.H=u,t.G=(l&240)>>4,t.K=0<(a&128),t.o=(l&15)+1,t.m=(p&63)+1,e.g=e.h[n]}}}return[]}function Fh(e,t){for(var n=[],r=0;8>r;r++)(t&1)===1&&e.h[r]&&n.push(r),t>>=1;return n}function ZE(e,t,n){var r=[];t=w(Fh(e,t));for(var i=t.next();!i.done;i=t.next()){i=i.value;var a=e.h[i];a.isVisible()&&(a=cl(a,n,e.i))&&r.push(a),e.h[i]=null}return r}function eC(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function tC(e,t,n){var r={0:0,1:0,2:1,3:1};return e=r[e],t=r[t],n=r[n],HO[e<<2|t<<1|n]}var nC=new Map([[32," "],[33,"\xA0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201C"],[52,"\u201D"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215B"],[119,"\u215C"],[120,"\u215D"],[121,"\u215E"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250C"]]),HO="black blue green cyan red magenta yellow white".split(" ");function ud(){this.h=[],this.g=[],this.i=new jO,this.l=0,this.m=new Map([["CC1",new hv(0,0)],["CC2",new hv(0,1)],["CC3",new hv(1,0)],["CC4",new hv(1,1)]]),this.u=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,J2(this)}ud.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,J2(this),e=w(this.j.values());for(var t=e.next();!t.done;t=e.next())eC(t.value)};function J2(e){e.o=0,e.u=0;for(var t=w(e.m.values()),n=t.next();!n.done;n=t.next())n=n.value,n.h=0,n.g=n.j,n.m=null,Oh(n.i),Oh(n.j),Oh(n.o);e.B=!0}ud.prototype.extract=function(e,t){if(this.B){for(var n=w(this.m.values()),r=n.next();!r.done;r=n.next())r.value.l=t;this.B=!1}if(e=new ln(e,0),!(8>e.getLength())&&e.X()===181&&e.na()===49&&e.S()===1195456820&&e.X()===3&&(n=e.X(),(n&64)!==0))for(n&=31,e.skip(1),r=0;r<n;r++){var i=e.X(),a=(i&4)>>2,u=e.X(),l=e.X();a&&(i&=3,i===0||i===1?this.h.push({pts:t,type:i,mb:u,Mb:l,order:this.h.length}):(this.g.push({pts:t,type:i,value:u,order:this.g.length}),this.g.push({pts:t,type:2,value:l,order:this.g.length})))}},ud.prototype.decode=function(){function e(i,a){return i.pts-a.pts||i.order-a.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=w(this.h),r=n.next();!r.done;r=n.next())(r=qO(this,r.value))&&t.push(r);for(n=w(this.g),r=n.next();!r.done;r=n.next())BO(this.i,r.value);for(n=w(this.i.i),r=n.next();!r.done;r=n.next())r=GO(this,r.value),t.push.apply(t,U(r));return this.i.i=[],this.h=[],this.g=[],t};function qO(e,t){var n=t.type;if((t.mb&112)===16){var r=t.mb>>3&1;n===0?e.o=r:e.u=r}if(r="CC"+((n<<1|(n?e.u:e.o))+1),n=e.m.get(r),t.mb===255&&t.Mb===255||!t.mb&&!t.Mb||!rC(t.mb)||!rC(t.Mb))return 45<=++e.l&&J2(e),null;e.l=0,t.mb&=127,t.Mb&=127;var i=t.mb;if(1<=i&&15>=i||!t.mb&&!t.Mb)return null;if(i=null,(t.mb&112)===16)e:{if(e.A.add(r),r=t.mb,e=t.Mb,n.m===(r<<8|e))n.m=null;else if(n.m=r<<8|e,(r&240)===16&&(e&192)===64){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(r&7)<<1|e>>5&1],r="white",i=!1;var a=null,u=95<e?e-96:e-64;13>=u?r=JE[Math.floor(u/2)]:15>=u?i=!0:a=Math.floor((u-16)/2),e=(e&1)===1,n.h!==4&&(u=n.g,n.h===3&&t!==u.g&&(n=1+t-u.h,GE(u,n,1+u.g-u.h,u.h),Xo(u,0,n-1),Xo(u,t+1,15-t)),u.g=t,u.m=e,u.j=i,u.l=r,u.u=a,u.o="black")}else if((r&247)===17&&(e&240)===32)n.g.m=!1,n.g.j=!1,n.g.l="white",sd(n.g,0,32),r=!1,t=JE[(e&14)>>1],t==="white_italics"&&(t="white",r=!0),n.g.m=(e&1)===1,n.g.j=r,n.g.l=t;else if((r&247)===16&&(e&240)===32||(r&247)===23&&(e&255)===45)t="black",!(r&7)&&(t=UO[(e&14)>>1]),n.g.o=t;else if((r&247)===17&&(e&240)===48)sd(n.g,1,e);else if((r&246)===18&&(e&224)===32)sd(n.g,r&1?3:2,e);else{if((r&246)===20&&(e&240)===32){switch(e=t.pts,r=null,t.Mb){case 32:XE(n);break;case 33:n=n.g,n.i[n.g].pop();break;case 37:r=K2(n,2,e);break;case 38:r=K2(n,3,e);break;case 39:r=K2(n,4,e);break;case 40:sd(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:Oh(n.o),YE(n);break;case 43:YE(n);break;case 44:t=n.i,r=null,n.h!==4&&(r=pv(t,n.l,e)),Xo(t,0,15);break;case 45:t=n.g,n.h!==3?r=null:(r=pv(t,n.l,e),i=t.g-t.h+1,GE(t,i-1,i,t.h),Xo(t,0,i-1),Xo(t,t.g,15-t.g),n.l=e);break;case 46:Xo(n.j,0,15);break;case 47:t=null,n.h!==4&&(t=pv(n.i,n.l,e)),r=n.j,n.j=n.i,n.i=r,XE(n),n.l=e,r=t}i=r;break e}(r==23||r==31)&&33<=e&&35>=e&&(n.g.A=e-32)}i=null}else e=t.Mb,sd(n.g,0,t.mb),sd(n.g,0,e);return i}function GO(e,t){var n=[];try{for(;t.ta();){var r=Gn(t).value,i=(r&224)>>5,a=r&31;if(i===7&&a!=0&&(i=Gn(t).value&63),i!=0){e.A.add("svc"+i),e.j.has(i)||e.j.set(i,new VO(i));for(var u=e.j.get(i),l=t.Ba();t.Ba()-l<a;){i=u;var p=t,g=Gn(p),v=g.value,y=g.pts;if(v===16){var x=Gn(p);v=v<<16|x.value}if(0<=v&&31>=v)var S=$O(i,p,v,y);else if(128<=v&&159>=v)S=zO(i,p,v,y);else{if(4096<=v&&4127>=v)i=p,p=v&255,8<=p&&15>=p?i.skip(1):16<=p&&23>=p?i.skip(2):24<=p&&31>=p&&i.skip(3);else if(4224<=v&&4255>=v)i=p,p=v&255,128<=p&&135>=p?i.skip(4):136<=p&&143>=p&&i.skip(5);else if(32<=v&&127>=v)p=v,i.g&&(p===127?$s(i.g,"\u266A"):$s(i.g,String.fromCharCode(p)));else if(160<=v&&255>=v)i.g&&$s(i.g,String.fromCharCode(v));else if(4128<=v&&4223>=v){if(p=v&255,i.g)if(nC.has(p)){var k=nC.get(p);$s(i.g,k)}else $s(i.g,"_")}else 4256<=v&&4351>=v&&i.g&&((v&255)!=160?$s(i.g,"_"):$s(i.g,"[CC]"));S=[]}n.push.apply(n,U(S))}}}}catch(C){if(C instanceof $&&C.code===3e3)$t("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C}return n}function rC(e){for(var t=0;e;)t^=e&1,e>>=1;return t===1}ud.prototype.getStreams=function(){return Array.from(this.A)},Ee("shaka.cea.CeaDecoder",ud),Tc=function(){return new ud};function iC(e){for(var t=[],n=e,r=e=0;r<n.length;)e==2&&n[r]==3?(e=0,n=[].concat(U(n)),n.splice(r,1),n=new Uint8Array(n)):n[r]==0?e++:e=0,r++;for(e=n,r=0;r<e.length;){for(n=0;e[r]==255;)n+=255,r++;n+=e[r++];for(var i=0;e[r]==255;)i+=255,r++;i+=e[r++],n==4&&t.push(e.subarray(r,r+i)),r+=i}return t}function fv(){this.j=new Map,this.i=this.h=0,this.g=Q2}fv.prototype.init=function(e){function t(a){a=a.name,gv.has(a)&&(n.g=gv.get(a))}var n=this,r=[],i=[];if(new Qt().box("moov",xt).box("mvex",xt).R("trex",function(a){var u=a.reader;u.skip(4),u.skip(4),a=u.S(),u=u.S(),n.h=a,n.i=u}).box("trak",xt).R("tkhd",function(a){var u=a.reader;a=a.version,a==1?(u.skip(8),u.skip(8)):(u.skip(4),u.skip(4));var l=u.S();a==1?u.skip(8):u.skip(4),u.skip(4),u.skip(8),u.skip(2),u.skip(2),u.skip(2),u.skip(2),u.skip(36),u.na(),u.na(),u.na(),u.na(),r.push(l)}).box("mdia",xt).R("mdhd",function(a){a=mm(a.reader,a.version),i.push(a.timescale)}).box("minf",xt).box("stbl",xt).R("stsd",Os).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",hi).box("sinf",xt).box("frma",function(a){a=k4(a.reader).codec,gv.has(a)&&(n.g=gv.get(a))}).parse(e,!0),!r.length||!i.length||r.length!=i.length)throw new $(2,2,2010);this.g==Q2&&Be("Unable to determine bitstream format for CEA parsing!"),r.forEach(function(a,u){n.j.set(a,i[u])})},fv.prototype.parse=function(e){var t=this;if(this.g==Q2)return[];var n=[],r=0,i=[];return new Qt().box("moof",function(a){r=a.start,i=[],xt(a)}).box("traf",function(a){i.push({baseMediaDecodeTime:null,ld:t.h,md:t.i,lh:[],timescale:9e4}),xt(a)}).R("trun",function(a){var u=i[i.length-1];a=vm(a.reader,a.version,a.flags),u.lh.push(a)}).R("tfhd",function(a){var u=i[i.length-1];a=fm(a.reader,a.flags),u.ld=a.ld||t.h,u.md=a.md||t.i,a=a.trackId,t.j.has(a)&&(u.timescale=t.j.get(a))}).R("tfdt",function(a){var u=i[i.length-1];a=gm(a.reader,a.version),u.baseMediaDecodeTime=a.baseMediaDecodeTime}).box("mdat",function(a){for(var u=r-a.start-8,l=a.reader.Ba(),p=w(i),g=p.next();!g.done;g=p.next()){if(g=g.value,g.baseMediaDecodeTime===null)throw Be("Unable to find base media decode time for CEA captions!"),new $(2,2,2010);a.reader.seek(l),KO(t,a.reader,g.baseMediaDecodeTime,g.timescale,g.ld,g.md,u,g.lh,n)}}).parse(e,!1),n};function KO(e,t,n,r,i,a,u,l,p){var g=0,v=a,y=l.map(function(k){return k.fg});for(y=[].concat.apply([],U(y)),y.length&&(v=y[0].sampleSize||a),t.skip(u+l[0].nf);t.ta();){u=t.S();var x=t.X(),S=null;switch(S=!1,l=1,e.g){case jh:S=x&31,S=S==6;break;case Bh:l=2,t.skip(1),S=x>>1&63,S=S==39||S==40;break;case Vh:l=2,t.skip(1),S=x>>1&63,S=S==23||S==24;break;default:return}if(S)for(x=0,g<y.length&&(x=y[g].ye||0),x=(n+x)/r,l=w(iC(t.Cb(u-l))),S=l.next();!S.done;S=l.next())p.push({packet:S.value,pts:x});else try{t.skip(u-l)}catch{break}v-=u+4,v==0&&(n=g<y.length?n+(y[g].gg||i):n+i,g++,g<y.length?v=y[g].sampleSize||a:v=a)}}Ee("shaka.cea.Mp4CeaParser",fv);var Q2=0,jh=1,Bh=2,Vh=3,gv=new Map().set("avc1",jh).set("avc3",jh).set("dvav",jh).set("dva1",jh).set("hev1",Bh).set("hvc1",Bh).set("dvh1",Bh).set("dvhe",Bh).set("vvc1",Vh).set("vvi1",Vh).set("dvc1",Vh).set("dvi1",Vh);W1("video/mp4",function(){return new fv});function mv(){this.g=null}mv.prototype.init=function(){},mv.prototype.parse=function(e){this.g?this.g.clearData():this.g=new hn;var t=[];if(e=Ye(e),!Hc(e))return t;e=this.g.parse(e);var n=e.od(),r=e.be();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(n=w(r),r=n.next();!r.done;r=n.next())if(r=r.value,e.includes(r.type)&&r.time!=null)for(var i=w(iC(r.data)),a=i.next();!a.done;a=i.next())t.push({packet:a.value,pts:r.time});return t},Ee("shaka.cea.TsCeaParser",mv),W1("video/mp2t",function(){return new mv});function WO(e){var t=0,n=pn(e),r=n.getUint32(t,!0);if(r!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){r=n.getUint16(e,!0),e+=2;var i=n.getUint16(e,!0);if(e+=2,i&1||i+e>n.byteLength){n=[];break e}var a=Ye(n,e,i);t.push({type:r,value:a}),e+=i}n=t}return n}function aC(e){return e=Gi(jn(e)),e=WO(e).filter(function(t){return t.type===XO})[0],e?(e=Is(e.value,!0),(e=qu(e,"WRMHEADER"))?e:null):null}function vv(e){try{var t=aC(e);if(t)e:{for(var n=w(Fa(t,"DATA")),r=n.next();!r.done;r=n.next()){var i=r.value;if(i.children)for(var a=w(i.children),u=a.next();!u.done;u=a.next()){var l=u.value;if(l.tagName=="LA_URL"){var p=jn(l);break e}}}p=""}else p="";return p}catch{return""}}var XO=1;function oC(e,t,n){var r=QO(e),i=null;e=[];var a=[],u=null,l=new Set(r.map(function(g){return g.keyId}));l.delete(null);var p="cenc";if(1<l.size)throw new $(2,4,4010);if(!t){if(a=r.filter(function(g){return g.cd=="urn:mpeg:dash:sea:2012"}),1<a.length)throw new $(2,4,4050);a.length&&(u=eU(a[0])),(a=r.find(function(g){return g.cd=="urn:mpeg:dash:mp4protection:2011"}))&&a.encryptionScheme&&(p=a.encryptionScheme),a=r.filter(function(g){return g.cd=="urn:mpeg:dash:mp4protection:2011"?(i=g.init||i,!1):g.cd!="urn:mpeg:dash:sea:2012"}),a.length&&(e=JO(i,p,a,n,l),e.length==0&&(e=[Ms("",p,i)]))}if(r.length&&!u&&(t||!a.length))for(e=[],t=w(Object.values(n)),n=t.next();!n.done;n=t.next())n=n.value,n!="org.w3.clearkey"&&e.push(Ms(n,p,i));if(l=Array.from(l)[0]||null)for(p=w(e),t=p.next();!t.done;t=p.next())for(t=w(t.value.initData),n=t.next();!n.done;n=t.next())n.value.keyId=l;return{Jg:l,Pk:i,drmInfos:e,cf:u,Og:!0}}function YO(e,t,n,r){var i=oC(e,n,r);if(t.Og)e=t.drmInfos.length==1&&!t.drmInfos[0].keySystem,n=i.drmInfos.length==0,(t.drmInfos.length==0||e&&!n)&&(t.drmInfos=i.drmInfos),t.Og=!1;else if(0<i.drmInfos.length&&(t.drmInfos=t.drmInfos.filter(function(a){return i.drmInfos.some(function(u){return u.keySystem==a.keySystem})}),t.drmInfos.length==0))throw new $(2,4,4008);return i.Jg||t.Jg}function yv(e){var t=pa(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=jn(t)))return t;if((t=pa(e.node,"urn:microsoft:playready","pro"))&&jn(t))return vv(t);if((e=pa(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=jn(e))){t=Gi(e),e=8,t=pn(t);var n=t.getUint8(e);return e+=20,0<n&&(e+=4+16*t.getUint32(e)),e=Ye(t,e+4),e=Gg(e),e=qu("<pro>"+e+"</pro>"),vv(e)}return""}function JO(e,t,n,r,i){var a=[];n=w(n);for(var u=n.next();!u.done;u=n.next()){u=u.value;var l=r[u.cd];if(l){var p;if((p=pa(u.node,"urn:microsoft:playready","pro"))&&jn(p)){p=jn(p),p=Gi(p);var g=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);p=[{initData:dm(p,g,new Set,0),initDataType:"cenc",keyId:u.keyId}]}else p=null;if(g=null,u.cd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){g=u;var v=i;if(v.size==0)g=null;else{var y=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),x=new Uint8Array([]);g=[{initData:dm(x,y,v,1),initDataType:"cenc",keyId:g.keyId}]}}p=Ms(l,t,u.init||e||p||g),(l=tU.get(l))&&(p.licenseServerUri=l(u)),a.push(p)}}return a}function QO(e){var t=[];e=w(e);for(var n=e.next();!n.done;n=e.next())(n=ZO(n.value))&&t.push(n);return t}function ZO(e){var t=e.attributes.schemeIdUri,n=Lo(e,"urn:mpeg:cenc:2013","default_KID"),r=p5(e,"urn:mpeg:cenc:2013","pssh").map(Ii),i=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase(),n.includes(" ")))throw new $(2,4,4009);var a=[];try{a=r.map(function(u){return{initDataType:"cenc",initData:Gi(u),keyId:null}})}catch{throw new $(2,4,4007)}return{node:e,cd:t,keyId:n,init:0<a.length?a:null,encryptionScheme:i}}function eU(e){if(!d.crypto||!d.crypto.subtle)throw Be("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new $(2,4,4042);var t=pa(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new $(2,4,4051);if(t.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new $(2,4,4051);if(t=pa(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!t)throw new $(2,4,4051);if(e=t.attributes.IV,t=Wr(t.attributes.keyUriTemplate),!e||!t)throw new $(2,4,4051);if(e=ju(e.substr(2)),e.byteLength!=16)throw new $(2,4,4048);return{Xi:t,iv:e}}var tU=new Map().set("com.apple.fps",function(e){if(d.shakaMediaKeysPolyfill==="apple")throw new $(2,4,4054);return(e=pa(e.node,"https://dashif.org/CPS","Laurl"))&&(e=jn(e))?e:""}).set("com.widevine.alpha",function(e){var t=pa(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=jn(t))?t:(e=pa(e.node,"urn:microsoft","laurl"))&&Wr(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",yv).set("com.microsoft.playready.recommendation",yv).set("com.microsoft.playready.software",yv).set("com.microsoft.playready.hardware",yv).set("org.w3.clearkey",function(e){var t=pa(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=jn(t))?t:(e=pa(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&e.attributes.Lic_type==="EME-1.0"&&e&&(e=jn(e))?e:""});function $h(e,t,n,r,i,a){var u=new Map().set("RepresentationID",t).set("Number",n).set("SubNumber",r).set("Bandwidth",i).set("Time",a);return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(l,p,g,v){if(l=="$$")return"$";var y=u.get(p);if(y==null)return l;switch(p=="RepresentationID"&&g&&(g=void 0),p=="Time"&&typeof y!="bigint"&&(.2<=Math.abs(y-Math.round(y))&&Be("Calculated $Time$ values must be close to integers"),y=Math.round(y)),v){case void 0:case"d":case"i":case"u":l=y.toString();break;case"o":l=y.toString(8);break;case"x":l=y.toString(16);break;case"X":l=y.toString(16).toUpperCase();break;default:l=y.toString()}return g=d.parseInt(g,10)||1,Array(Math.max(0,g-l.length)+1).join("0")+l})}function sC(e,t){var n=va(e,t,"timescale"),r=1;n&&(r=Ro(n)||1),n=va(e,t,"duration");var i=(n=Ro(n||""))?n/r:null,a=va(e,t,"startNumber"),u=Number(va(e,t,"presentationTimeOffset"))||0,l=_r(a||"");if((a==null||l==null)&&(l=1),a=null,t=ld(e,t,"SegmentTimeline")){t=Gt(t,"S"),a=r,e=e.ha.duration||1/0;for(var p=l,g=[],v=-u,y=0;y<t.length;++y){var x=t[y],S=t[y+1],k=st(x,"t",_r),C=st(x,"d",_r),E=st(x,"r",Fr);if(x=st(x,"k",Fr)||0,k!=null&&(k-=u),C){if(k=k??v,E=E||0,0>E)if(S){if(S=st(S,"t",_r),S==null||k>=S)break;E=Math.ceil((S-k)/C)-1}else{if(e==1/0||k/a>=e)break;E=Math.ceil((e*a-k)/C)-1}for(0<g.length&&k!=v&&(g[g.length-1].end=k/a),S=0;S<=E;++S)v=k+C,g.push({start:k/a,end:v/a,xg:k,Jb:x,wj:g.length+p}),k=v}}a=g}return{timescale:r,He:n,Wa:i,Ld:l,hc:u/r||0,wg:u,timeline:a}}function uC(e,t){return[t(e.J),t(e.ga),t(e.qa)].filter(Ns)}function va(e,t,n){t=uC(e,t),e=null,t=w(t);for(var r=t.next();!r.done&&!(e=r.value.attributes[n]);r=t.next());return e}function ld(e,t,n){t=uC(e,t),e=null,t=w(t);for(var r=t.next();!r.done&&!(e=Nn(r.value,n));r=t.next());return e}function nU(e,t,n,r,i,a){for(var u=Lo(e,"http://www.w3.org/1999/xlink","href"),l=Lo(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",p=w(Object.keys(e.attributes)),g=p.next();!g.done;g=p.next()){g=g.value;var v=g.split(":"),y=Q1("http://www.w3.org/1999/xlink");v[0]==y&&delete e.attributes[g]}if(5<=a)return Yu(new $(2,4,4028));if(l!="onLoad")return Yu(new $(2,4,4027));var x=Qn([r],[u]);return i.request(0,qn(x,t)).Ha(function(S){if(S=Gp(S.data,e.tagName),!S)return Yu(new $(2,4,4001,u));for(e.children=[];S.children.length;){var k=S.children.shift();e.children.push(k)}k=w(Object.keys(S.attributes));for(var C=k.next();!C.done;C=k.next())C=C.value,e.attributes[C]=S.attributes[C];return bv(e,t,n,x[0],i,a+1)})}function bv(e,t,n,r,i,a){if(a=a===void 0?0:a,Lo(e,"http://www.w3.org/1999/xlink","href")){var u=nU(e,t,n,r,i,a);return n&&(u=u.Ha(void 0,function(){return bv(e,t,n,r,i,a)})),u}u=[];for(var l=w(d5(e)),p=l.next(),g={};!p.done;g={hd:void 0},p=l.next())g.hd=p.value,Lo(g.hd,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?e.children=e.children.filter(function(v){return function(y){return y!==v.hd}}(g)):g.hd.tagName!="SegmentTimeline"&&u.push(bv(g.hd,t,n,r,i,a));return G5(u).Ha(function(){return e})}function rU(e,t,n,r,i,a,u){var l,p=new Qt().R("sidx",function(g){l=iU(t,r,i,a,u,n,g)});if(e&&p.parse(e),l)return l;throw new $(2,3,3004)}function iU(e,t,n,r,i,a,u){var l=[];u.reader.skip(4);var p=u.reader.S();if(p==0)throw new $(2,3,3005);if(u.version==0)var g=u.reader.S(),v=u.reader.S();else g=u.reader.bd(),v=u.reader.bd();u.reader.skip(2);var y=u.reader.na();for(e=e+u.size+v,v=0;v<y;v++){var x=u.reader.S(),S=(x&2147483648)>>>31;x&=2147483647;var k=u.reader.S();if(u.reader.skip(4),S==1)throw new $(2,3,3006);l.push(new Ge(g/p+n,(g+k)/p+n,function(){return a},e,e+x-1,t,n,r,i)),g+=k,e+=x}return u.parser.stop(),l}function zs(e){this.h=pn(e),this.g=new ln(this.h,0)}zs.prototype.ta=function(){return this.g.ta()};function Yo(e){var t=lC(e);if(7<t.length)throw new $(2,3,3002);var n=0;t=w(t);for(var r=t.next();!r.done;r=t.next())n=256*n+r.value;t=lC(e);e:{r=w(aU);for(var i=r.next();!i.done;i=r.next())if(ui(t,new Uint8Array(i.value))){r=!0;break e}r=!1}if(r)t=e.h.byteLength-e.g.Ba();else{if(t.length==8&&t[1]&224)throw new $(2,3,3001);for(i=r=0;i<t.length;i++){var a=t[i];r=i==0?a&(1<<8-t.length)-1:256*r+a}t=r}return t=e.g.Ba()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Ba(),r=pn(e.h,e.g.Ba(),t),e.g.skip(t),new oU(n,r)}function lC(e){var t=e.g.Ba(),n=e.g.X();if(n==0)throw new $(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),Ye(e.h,t,n)}var aU=[[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 oU(e,t){this.id=e,this.g=t}function Z2(e){if(8<e.g.byteLength)throw new $(2,3,3002);if(e.g.byteLength==8&&e.g.getUint8(0)&224)throw new $(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){var r=e.g.getUint8(n);t=256*t+r}return t}function sU(e,t,n,r,i,a,u,l,p){function g(){return i}var v=[];e=new zs(e.g);for(var y=null,x=null;e.ta();){var S=Yo(e);if(S.id==187){var k=uU(S);k&&(S=n*k.Jj,k=t+k.nj,y!=null&&v.push(new Ge(y+u,S+u,g,x,k-1,a,u,l,p)),y=S,x=k)}}return y!=null&&v.push(new Ge(y+u,r+u,g,x,null,a,u,l,p)),v}function uU(e){var t=new zs(e.g);if(e=Yo(t),e.id!=179)throw new $(2,3,3013);if(e=Z2(e),t=Yo(t),t.id!=183)throw new $(2,3,3012);t=new zs(t.g);for(var n=0;t.ta();){var r=Yo(t);if(r.id==241){n=Z2(r);break}}return{Jj:e,nj:n}}function cC(e,t,n){if(t=ld(e,t,"Initialization"),!t)return null;var r=e.J.Ua(),i=t.attributes.sourceURL;i&&(r=Qn(r,[Wr(i)],e.vb())),i=0;var a=null;return(t=st(t,"range",Wg))&&(i=t.start,a=t.end),n=new Yr(function(){return r},i,a,fC(e),null,null,n,e.ga.encrypted),n.codecs=e.J.codecs,n.mimeType=e.J.mimeType,e.ha&&(n.g=e.ha.start+e.ha.duration),n}function lU(e,t,n){var r=Number(va(e,cd,"presentationTimeOffset"))||0,i=va(e,cd,"timescale"),a=1;i&&(a=Ro(i)||1);var u=r/a||0,l=cC(e,cd,n);cU(e,l);var p=Hu(e);return{rc:function(){var g=ld(p,cd,"RepresentationIndex"),v=p.J.Ua();return g&&(g=Wr(g.attributes.sourceURL))&&(v=Qn(v,[g],p.vb())),g=pC(p),dC(p,t,l,v,g.start,g.end,u)}}}function dC(e,t,n,r,i,a,u){var l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H;return P(function(z){if(z.g==1)return l=e.presentationTimeline,p=!e.Ob||!e.ha.$g,g=e.ha.start,v=e.ha.duration,y=e.J.mimeType.split("/")[1],x=t,S=null,k=[x(r,i,a,!1),y=="webm"?x(n.N(),n.Sa,n.wa,!0):null],x=null,T(z,Promise.all(k),2);if(C=z.h,E=C[0],I=C[1]||null,_=null,j=g-u,B=g,q=v?g+v:1/0,y=="mp4")var Y=rU(E,i,r,n,j,B,q);else{Y=E;var K=new zs(I);if(Yo(K).id!=440786851)throw new $(2,3,3008);var J=Yo(K);if(J.id!=408125543)throw new $(2,3,3009);K=J.g.byteOffset,J=new zs(J.g);for(var ae=null;J.ta();){var ne=Yo(J);if(ne.id==357149030){ae=ne;break}}if(!ae)throw new $(2,3,3010);for(ae=new zs(ae.g),ne=1e6,J=null;ae.ta();){var ue=Yo(ae);if(ue.id==2807729)ne=Z2(ue);else if(ue.id==17545)if(ue.g.byteLength==4)J=ue.g.getFloat32(0);else if(ue.g.byteLength==8)J=ue.g.getFloat64(0);else throw new $(2,3,3003)}if(J==null)throw new $(2,3,3011);if(ae=ne/1e9,J*=ae,Y=Yo(new zs(Y)),Y.id!=475249515)throw new $(2,3,3007);Y=sU(Y,K,ae,J,r,n,j,B,q)}for(_=Y,O=w(_),R=O.next();!R.done;R=O.next())H=R.value,H.codecs=e.J.codecs,H.mimeType=e.J.mimeType,H.bandwidth=e.bandwidth;return l.Ed(_),S=new jt(_),p&&S.Oc(B,q,!0),z.return(S)})}function cd(e){return e.dd}function pC(e){var t=ld(e,cd,"RepresentationIndex");return e=va(e,cd,"indexRange"),e=Wg(e||""),t&&(e=st(t,"range",Wg,e)),e}function cU(e,t){if(hC(e,t),!pC(e))throw new $(2,4,4002)}function hC(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=wt&&n!="mp4"&&n!="webm")throw new $(2,4,4006);if(n=="webm"&&!t)throw new $(2,4,4005)}function fC(e){var t=e.J;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.oe,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.ga.label||null,roles:e.roles||null,language:e.ga.language||null}}function dU(e,t,n){var r=cC(e,gC,n),i=pU(e);if(!i.Wa&&!i.timeline&&1<i.Xc.length)throw new $(2,4,4002);if(!i.Wa&&!e.ha.duration&&!i.timeline&&i.Xc.length==1)throw new $(2,4,4002);if(i.timeline&&i.timeline.length==0)throw new $(2,4,4002);var a=null,u=null;e.qa.id&&e.J.id&&(u=t.get(e.qa.id+","+e.J.id))&&(a=u.segmentIndex);var l=hU(e.ha.start,e.ha.duration,e.J.Ua,i,r,n,e.J.mimeType,e.J.codecs,e.bandwidth,e.vb);return t=!a,a?a.Bd(l,e.presentationTimeline.pb()):a=new jt(l),e.presentationTimeline.Ed(l),e.Ob&&e.ha.$g||a.Oc(e.ha.start,e.ha.duration?e.ha.start+e.ha.duration:1/0,t),u&&(u.segmentIndex=a),{rc:function(){return a&&a.getNumReferences()!=0||a.ke(l),Promise.resolve(a)}}}function gC(e){return e.Zb}function pU(e){var t=fU(e);e=sC(e,gC);var n=e.Ld;n==0&&(n=1);var r=0;return e.Wa?r=e.Wa*(n-1):e.timeline&&0<e.timeline.length&&(r=e.timeline[0].start),{Wa:e.Wa,startTime:r,Ld:n,hc:e.hc,timeline:e.timeline,Xc:t}}function hU(e,t,n,r,i,a,u,l,p,g){var v=r.Xc.length;r.timeline&&r.timeline.length!=r.Xc.length&&(v=Math.min(r.timeline.length,r.Xc.length));for(var y=e-r.hc,x=t?e+t:1/0,S=[],k=r.startTime,C={},E=0;E<v;C={Je:void 0,ze:void 0},E++){C.ze=r.Xc[E];var I=k;k=void 0,k=r.Wa!=null?I+r.Wa:r.timeline?r.timeline[E].end:I+t,C.Je=null,C=new Ge(e+I,e+k,function(_){return function(){return _.Je==null&&(_.Je=Qn(n(),[_.ze.cj],g())),_.Je}}(C),C.ze.start,C.ze.end,i,y,e,x,[],"",null,null,Vo,a),C.codecs=l,C.mimeType=u,C.bandwidth=p,S.push(C)}return S}function fU(e){return[e.J.Zb,e.ga.Zb,e.qa.Zb].filter(Ns).map(function(t){return Gt(t,"SegmentURL")}).reduce(function(t,n){return 0<t.length?t:n}).map(function(t){t.attributes.indexRange&&!e.Lf&&(e.Lf=!0);var n=Wr(t.attributes.media);return t=st(t,"mediaRange",Wg,{start:0,end:null}),{cj:n,start:t.start,end:t.end}})}function mC(e,t,n,r,i,a,u,l,p){p||e.J.de||(e.J.de=va(e,Hs,"initialization"));var g=e.J.de?yU(e,u):null,v=gU(e);mU(v);var y=Hu(e);if(v.vd)return hC(e,g),{rc:function(){var C=$h(v.vd,y.J.originalId,null,null,y.bandwidth||null,null);return C=Qn(y.J.Ua(),[C]),dC(y,t,g,C,0,null,v.hc)}};if(v.Wa)return r||e.ga.contentType==="image"||e.ga.contentType==="text"||(n=e.ha.start,r=e.qa.id,p=e.ha.duration,r=(r=r!=null&&a.get(r)||p)?n+r:1/0,e.presentationTimeline.Tf(v.Wa),e.presentationTimeline.jh(n,r)),{rc:function(){return vU(y,v,i,g,a,u,l,e.J.Ae)}};var x=null;r=r=null,e.qa.id&&e.J.id&&(r=e.qa.id+","+e.J.id,r=n.get(r))&&(x=r.segmentIndex);var S=e.ha.start,k=e.ha.duration?S+e.ha.duration:1/0;return x?(n=x,vC(n,v,S,k,g),n.Oa(e.presentationTimeline.pb())):x=new wv(v,e.J.originalId,e.bandwidth,e.J.Ua,e.vb,S,k,g,u,e.J.Ae),v.timeline&&e.ga.contentType!=="image"&&e.ga.contentType!=="text"&&e.presentationTimeline.kh(x.h?x.h.timeline:[],S),r&&e.Ob&&(r.segmentIndex=x),{rc:function(){return x instanceof wv&&x.getNumReferences()==0&&vC(x,v,S,k,g),Promise.resolve(x)}}}function Hs(e){return e.ic}function gU(e){var t=sC(e,Hs),n=va(e,Hs,"media"),r=va(e,Hs,"index"),i=va(e,Hs,"k"),a=0;return i&&(a=parseInt(i,10)),{He:t.He,Wa:t.Wa,timescale:t.timescale,Ld:t.Ld,hc:t.hc,wg:t.wg,timeline:t.timeline,ec:n&&Wr(n),vd:r,mimeType:e.J.mimeType,codecs:e.J.codecs,bandwidth:e.bandwidth,dj:a}}function mU(e){var t=e.vd?1:0;if(t+=e.timeline?1:0,t+=e.Wa?1:0,t==0)throw new $(2,4,4002);if(t!=1&&(e.vd&&(e.timeline=null),e.He=null,e.Wa=null),!e.vd&&!e.ec)throw new $(2,4,4002)}function vU(e,t,n,r,i,a,u,l){function p(J){var ae=J-E,ne=ae*C,ue=t.He,se=ae*ue;"BigInt"in d&&se>Number.MAX_SAFE_INTEGER&&(se=BigInt(ae)*BigInt(ue)),ne+=x,ae=ne+C,ue=Math.min(ae,v());var he=[],xe=t.dj;if(xe)for(var tt=(ue-ne)/xe,Fe={},Vt=0;Vt<xe;Fe={Eh:void 0},Vt++){var At=ne+tt*Vt,gt=At+tt;Fe.Eh=Vt+1,Fe=new Ge(At,gt,function(vt){return function(){var Rt=$h(I,j,J,vt.Eh,_,se);return Qn(B(),[Rt],q())}}(Fe),0,null,r,O,x,v(),[],"",null,null,Vo,a),Fe.codecs=e.J.codecs,Fe.mimeType=e.J.mimeType,l==0?0<Vt&&Fe.Vc():Vt%l!=0&&Fe.Vc(),he.push(Fe)}return ne=new Ge(ne,ue,function(){if(xe)return[];var vt=$h(I,j,J,null,_,se);return Qn(B(),[vt],q())},0,null,r,O,x,v(),he,"",null,null,Vo,a,0<he.length),ne.codecs=e.J.codecs,ne.mimeType=e.J.mimeType,ne.bandwidth=e.bandwidth,ne.j=ae,ne}function g(){var J=[Math.max(y.pb(),x),Math.min(y.cc(),v())].map(function(ae){return ae-x});return J=[Math.ceil(J[0]/C),Math.ceil(J[1]/C)-1],e.J.cb&&J[1]++,J.map(function(ae){return ae+E})}function v(){var J=S!=null&&i.get(S)||k;return J?x+J:1/0}var y=e.presentationTimeline,x=e.ha.start,S=e.qa.id,k=e.ha.duration,C=t.Wa,E=t.Ld,I=t.ec,_=e.bandwidth||null,j=e.J.id,B=e.J.Ua,q=e.vb,O=x-t.hc,R=g();n=e.Ob?Math.max(R[0],R[1]-n+1):R[0],u=u||R[1],R=[];for(var H=n;H<=u;++H){var z=p(H);R.push(z)}var Y=new jt(R);if(R=y.cc()<v(),H=y.U(),R||H){var K=Math.max(n,u+1);n=C,e.J.cb&&(n=.1),Y.Ie(n,function(){var J=y.pb();Y.Oa(J);var ae=w(g());ae.next(),ae=ae.next().value;for(var ne=[];K<=ae;){var ue=p(K);ne.push(ue),K++}return J>v()&&!ne.length?null:ne})}return Promise.resolve(Y)}function yU(e,t){var n=e.J.de;if(n||(n=va(e,Hs,"initialization")),!n)return null;n=Wr(n);var r=e.J.originalId,i=e.bandwidth||null,a=e.J.Ua,u=e.vb;return t=new Yr(function(){var l=$h(n,r,null,null,i,null);return Qn(a(),[l],u())},0,null,fC(e),null,null,t,e.ga.encrypted),t.codecs=e.J.codecs,t.mimeType=e.J.mimeType,e.ha&&(t.g=e.ha.start+e.ha.duration),t}function wv(e,t,n,r,i,a,u,l,p,g){jt.call(this,[]),this.h=e,this.F=t,this.B=n,this.C=r,this.H=i,this.j=a,this.l=u,this.u=l,this.A=p,this.G=g,ew(this)}Te(wv,jt),f=wv.prototype,f.getNumReferences=function(){return this.h?this.h.timeline.length:0},f.release=function(){jt.prototype.release.call(this),this.h=null},f.Oa=function(e){if(this.h){for(var t=0,n=this.h.timeline,r=0;r<n.length&&n[r].end+this.j<=e;r+=1)t+=1;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,this.getNumReferences()===0&&this.release())}};function vC(e,t,n,r,i){if(bU(e,i),e.h){if(n=e.h.timeline,e.h.ec!==t.ec&&(e.h.ec=t.ec),n.length){var a=n[n.length-1];t=t.timeline.filter(function(u){return u.end>a.end})}else t=t.timeline.slice();0<t.length&&e.h.timeline.push.apply(e.h.timeline,U(t)),e.l!==r&&(e.l=r)}else e.h=t,e.j=n,e.l=r;ew(e)}function bU(e,t){if(e.u!==t){e.u=t,e=w(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&_4(n,t)}}function ew(e){if(e.h&&!e.o){for(var t=[],n=w(e.h.timeline),r=n.next();!r.done;r=n.next())r=r.value,r.start>=e.l||0>=r.end||t.push(r);e.h.timeline=t,e.Oa(e.j)}}f.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>=this.l)return null;for(var n=t.length-1,r=0;r<t.length;r++){var i=t[r],a=i.start+this.j;if(i=r<n?t[r+1].start+this.j:this.l===1/0?i.end+this.j:this.l,e>=a&&e<i)return r+this.i}return null},f.get=function(e){var t=this;if(e-=this.i,0>e||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var r=this.h.timeline[e],i=r.wj,a=r.xg+this.h.wg;n=this.j-this.h.hc;var u=this.j+r.end,l=u;e===this.getNumReferences()-1&&this.l!==1/0&&(l=this.l);for(var p=this.h.codecs,g=this.h.mimeType,v=this.h.bandwidth,y=[],x=(r.end-r.start)/r.Jb,S={},k=0;k<r.Jb;S={Ke:void 0,Fh:void 0},k++){var C=r.start+x*k,E=C+x;S.Fh=k+1,S.Ke=null,S=new Ge(this.j+C,this.j+E,function(I){return function(){return t.h?(I.Ke==null&&(I.Ke=yC(t.h.ec,t.F,i,t.B,a,I.Fh,t.C,t.H)),I.Ke):[]}}(S),0,null,this.u,n,this.j,this.l,[],"",null,null,Vo,this.A),S.codecs=p,S.mimeType=g,S.bandwidth=v,this.G==0?0<k&&S.Vc():k%this.G!=0&&S.Vc(),y.push(S)}n=new Ge(this.j+r.start,l,function(){return 0<r.Jb||!t.h?[]:yC(t.h.ec,t.F,i,t.B,a,null,t.C,t.H)},0,null,this.u,n,this.j,this.l,y,"",null,null,Vo,this.A,0<r.Jb),n.codecs=p,n.mimeType=g,n.j=u,n.bandwidth=v,this.g[e]=n}return n},f.Eb=function(e){ew(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}};function yC(e,t,n,r,i,a,u,l){return e=$h(e,t,n,a,r||null,i),Qn(u(),[e],l()).map(function(p){return p.toString()})}function dd(e){this.o=null,this.A=e,this.G=new Oc,this.i=[],this.h=null,this.m=[],this.B=null,this.F=[],this.C=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}dd.prototype.configure=function(e){this.o=e},dd.prototype.destroy=function(){return this.A=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),this.g!=null&&(this.g.stop(),this.g=null),this.G.destroy()},dd.prototype.setManifestType=function(e){this.u=e};function zh(e,t){var n,r,i,a,u,l,p;return P(function(g){if(g.g==1)return n=Qn(e.i,[wU(e,t)]),r=qn(n,e.o.retryParameters),i=e.A.networkingEngine.request(8,r),Ju(e.G,i),ve(g,2),T(g,i.promise,4);if(g.g!=2)return a=g.h,u=yn(a.data),l=JSON.parse(u),l.VERSION==1&&xU(e,l,a.uri),V(g,0);if((p=W(g))&&p.code==7001)return g.return();e.g!=null&&(e.g.stop(),e.g=null),e.g=new Tt(function(){zh(e,t)}),e.g.da(e.C),oe(g)})}function wU(e,t){if(!e.m.length)return t;t=new ee(t);var n=e.B||e.m[0],r=Math.round(e.A.getBandwidthEstimate()),i=t.g;return e.u=="DASH"?(i.add("_DASH_pathway",n),i.add("_DASH_throughput",String(r))):e.u=="HLS"&&(i.add("_HLS_pathway",n),i.add("_HLS_throughput",String(r))),Uu(i)&&kt(t,i),t.toString()}function xU(e,t,n){e.g!=null&&(e.g.stop(),e.g=null);var r=t["RELOAD-URI"]||n;e.g=new Tt(function(){zh(e,r)}),(n=t.TTL)&&(e.C=n),e.g.da(e.C),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}function pd(e,t,n,r){var i=e.l.get(t);i||(i=new Map),i.set(n,r),e.l.set(t,i)}dd.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)};function Hh(e,t,n){n=n===void 0?!1:n,t=e.l.get(t)||new Map;for(var r=[],i=w(e.m),a=i.next(),u={};!a.done;u={Zc:void 0},a=i.next())if(u.Zc=a.value,a=t.get(u.Zc))r.push({Yf:u.Zc,location:a});else if(a=e.F.find(function(p){return function(g){return g.ek==p.Zc}}(u))){var l=t.get(a["BASE-ID"]);l&&(a["URI-REPLACEMENT"].Oh?(l=new ee(l),qe(l,a["URI-REPLACEMENT"].Oh),r.push({Yf:u.Zc,location:l.toString()})):r.push({Yf:u.Zc,location:l}))}for(i=Date.now(),u=w(e.j.keys()),a=u.next();!a.done;a=u.next())a=a.value,l=e.j.get(a),i>l&&e.j.delete(a);if(r=r.filter(function(p){for(var g=w(e.j.keys()),v=g.next();!v.done;v=g.next())if(v.value.includes(new ee(p.location).nb))return!1;return!0}),r.length&&(e.B=r[0].Yf),r=r.map(function(p){return p.location}),!r.length&&e.h)for(i=w(e.h.split(",")),u=i.next();!u.done;u=i.next())(u=t.get(u.value))&&(e.B=e.h,r.push(u));if(!r.length)for(t=w(t.values()),i=t.next();!i.done;i=t.next())r.push(i.value);return n?r:Qn(e.i,r)}function Pr(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.u=this.o=!1,this.m=new Set}f=Pr.prototype,f.release=function(){for(var e=w(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.u=this.o=!1,this.m.clear()},f.Ki=function(){return this.l},f.Jf=function(){return this.j.slice()},f.oi=function(){return this.i},f.Kg=function(e,t){if(e){if(e.type=="audio")for(var n=w(this.h),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});else if(e.type=="video")for(n=w(this.g),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e}),r.trickModeVideo&&(r.trickModeVideo.matchedStreams=r.trickModeVideo.matchedStreams.filter(function(i){return i!==e})),r.dependencyStream&&(r.dependencyStream.matchedStreams=r.dependencyStream.matchedStreams.filter(function(i){return i!==e}));else if(e.type==wt)for(n=w(this.j),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});else if(e.type=="image")for(n=w(this.i),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}};function bC(e,t){var n=[],r=[],i=[],a=[];e=w(e);for(var u=e.next();!u.done;u=e.next()){var l=u.value;u=new Map(l.audioStreams.map(function(y){return[iw(y),y]}));var p=new Map(l.videoStreams.map(function(y){return[rw(y),y]})),g=new Map(l.textStreams.map(function(y){return[Kh(y),y]}));if(l=new Map(l.imageStreams.map(function(y){return[Wh(y),y]})),t){var v=AC(wt);g.set(Kh(v),v),v=AC("image"),l.set(Wh(v),v)}n.push(u),r.push(p),i.push(g),a.push(l)}return{Dg:n,Mh:r,Ih:i,Yg:a}}f.gf=function(e,t,n){n=n===void 0?!1:n;var r=this,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne,ue,se,he,xe,tt;return P(function(Fe){if(Fe.g==1){if(i=zn,!t&&e.length==1)return a=bC(e,!1),u=a.Dg,l=a.Mh,p=a.Ih,g=a.Yg,r.h=Array.from(u[0].values()),r.g=Array.from(l[0].values()),r.j=Array.from(p[0].values()),r.i=Array.from(g[0].values()),Fe.s(2);for(v=n?r.m.size:0,y=-1,x=0;x<e.length;x++)S=e[x],r.m.has(S.id)||(r.m.add(S.id),y==-1&&(y=x));return y==-1?Fe.return():(k=bC(e,!0),C=k.Dg,E=k.Mh,I=k.Ih,_=k.Yg,T(Fe,Promise.all([qs(r,r.h,C,y,hd,Gs,v),qs(r,r.g,E,y,hd,Gs,v),qs(r,r.j,I,y,hd,Gs,v),qs(r,r.i,_,y,hd,Gs,v)]),2))}if(j=0,B=[],r.g.length&&r.h.length)for(K=w(r.h),J=K.next();!J.done;J=K.next())for(ae=J.value,ne=w(r.g),ue=ne.next();!ue.done;ue=ne.next())se=ue.value,he=O1(ae.drmInfos,se.drmInfos),ae.drmInfos.length&&se.drmInfos.length&&!he.length||(xe=(ae.bandwidth||0)+(se.bandwidth||0),ae.dependencyStream&&(xe+=ae.dependencyStream.bandwidth||0),se.dependencyStream&&(xe+=se.dependencyStream.bandwidth||0),tt=j++,B.push({id:tt,language:ae.language,disabledUntilTime:0,primary:ae.primary,audio:ae,video:se,bandwidth:xe,drmInfos:he,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(q=r.g.length?r.g:r.h,O=w(q),R=O.next();!R.done;R=O.next())H=R.value,z=j++,Y=H.bandwidth||0,H.dependencyStream&&(Y+=H.dependencyStream.bandwidth||0),B.push({id:z,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H.type==i.V?H:null,video:H.type==i.la?H:null,bandwidth:Y,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});r.l=B,oe(Fe)})};function wC(e){var t,n,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne;return P(function(ue){switch(ue.g){case 1:if(t=zn,e.length==1)return ue.return(e[0]);for(n=e.map(function(se){return new Map(se.filter(function(he){return he.type===t.V}).map(function(he){return[iw(he),he]}))}),r=e.map(function(se){return new Map(se.filter(function(he){return he.type===t.la}).map(function(he){return[rw(he),he]}))}),i=e.map(function(se){return new Map(se.filter(function(he){return he.type===t.za}).map(function(he){return[Kh(he),he]}))}),a=e.map(function(se){return new Map(se.filter(function(he){return he.type===t.$e}).map(function(he){return[Wh(he),he]}))}),u=w(i),l=u.next();!l.done;l=u.next())p=l.value,g=TC(t.za),p.set(Kh(g),g);for(v=w(a),y=v.next();!y.done;y=v.next())x=y.value,S=TC(t.$e),x.set(Wh(S),S);return k=new Pr,T(ue,qs(k,[],n,0,xv,Sv,0),2);case 2:return C=ue.h,T(ue,qs(k,[],r,0,xv,Sv,0),3);case 3:return E=ue.h,T(ue,qs(k,[],i,0,xv,Sv,0),4);case 4:return I=ue.h,T(ue,qs(k,[],a,0,xv,Sv,0),5);case 5:if(_=ue.h,j=0,E.length&&C.length)for(H=w(C),z=H.next();!z.done;z=H.next())for(Y=z.value,K=w(E),J=K.next();!J.done;J=K.next())ae=J.value,ne=j++,ae.variantIds.push(ne),Y.variantIds.push(ne);else for(B=E.concat(C),q=w(B),O=q.next();!O.done;O=q.next())R=O.value,R.variantIds=[j++];return ue.return(E.concat(C).concat(I).concat(_))}})}function qs(e,t,n,r,i,a,u){var l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z;return P(function(Y){switch(Y.g){case 1:for(l=[],p=0;p<n.length;p++)p>=r?l.push(new Set(n[p].values())):l.push(new Set);g=w(t),v=g.next();case 2:if(v.done){Y.s(4);break}return y=v.value,T(Y,SU(e,y,n,r,a,l,u),5);case 5:if(x=Y.h,!x)throw new $(2,4,4037);v=g.next(),Y.s(2);break;case 4:for(S=w(l),k=S.next();!k.done;k=S.next())for(C=k.value,E=w(C),I=E.next();!I.done;I=E.next())_=I.value,(j=kU(e,_,n,i,a,l))&&t.push(j);for(B=w(l),q=B.next();!q.done;q=B.next())for(O=q.value,R=w(O),H=R.next(),z={};!H.done;z={ng:void 0},H=R.next())if(z.ng=H.value,!nw(z.ng)&&t.some(function(K){return function(J){return tw(e,K.ng,J)}}(z)))throw new $(2,4,4037);return Y.return(t)}})}function SU(e,t,n,r,i,a,u){return P(function(l){return l.g==1?(kC(e,n,t,0<u),t.matchedStreams?t.segmentIndex?T(l,xC(t,r+u),2):l.s(2):l.return(!1)):(SC(t,r,i,a,u),l.return(!0))})}function xC(e,t){var n,r,i,a,u,l;return P(function(p){if(p.g==1){for(n=[],r=e.matchedStreams,i=t;i<r.length;i++)a=r[i],n.push(a.createSegmentIndex()),a.trickModeVideo&&!a.trickModeVideo.segmentIndex&&n.push(a.trickModeVideo.createSegmentIndex()),a.dependencyStream&&!a.dependencyStream.segmentIndex&&n.push(a.dependencyStream.createSegmentIndex());return T(p,Promise.all(n),2)}if(e.segmentIndex instanceof kn)for(u=t;u<r.length;u++)l=r[u],l.segmentIndex&&e.segmentIndex.h.push(l.segmentIndex);oe(p)})}function kU(e,t,n,r,i,a){if(nw(t))return null;var u=r(t);return kC(e,n,u),u.createSegmentIndex&&(u.createSegmentIndex=function(){return P(function(l){return u.segmentIndex?l.s(0):(u.segmentIndex=new kn,T(l,xC(u,0),0))})}),!u.matchedStreams||!u.matchedStreams.length?null:(SC(u,0,i,a,0),u)}function SC(e,t,n,r,i){var a=e.matchedStreams;for(t+=i;t<a.length;t++){var u=a[t];n(e,u);var l=!0;if(e.type=="audio"&&Wu(e.language,u.language)==0&&(l=!1),l&&(r[t-i].delete(u),u.fullMimeTypes))for(u=w(u.fullMimeTypes.values()),l=u.next();!l.done;l=u.next())e.fullMimeTypes.add(l.value)}}function hd(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var n=w(t.matchedStreams),r=n.next();!r.done;r=n.next())r=r.value,r.segmentIndex&&(r.segmentIndex.release(),r.segmentIndex=null)},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream=null,t}function xv(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function Gs(e,t){function n(u,l){u||(u=[]),l=w(l);for(var p=l.next();!p.done;p=l.next())p=p.value,u.includes(p)||u.push(p);return u}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var r=w(t.keyIds),i=r.next();!i.done;i=r.next())e.keyIds.add(i.value);if(e.originalId==null?e.originalId=t.originalId:(r=t.originalId||"")&&!e.originalId.endsWith(r)&&(e.originalId+=","+r),r=O1(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!r.length)throw new $(2,4,4038);if(e.drmInfos=r,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=w(t.closedCaptions),i=r.next();!i.done;i=r.next()){var a=w(i.value);i=a.next().value,a=a.next().value,e.closedCaptions.set(i,a)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=hd(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var u=new kn,l=w(e.trickModeVideo.matchedStreams),p=l.next();!p.done;p=l.next())u.h.push(p.value.segmentIndex);return e.trickModeVideo.segmentIndex=u,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),Gs(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),Gs(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=hd(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var u=new kn,l=w(e.dependencyStream.matchedStreams),p=l.next();!p.done;p=l.next())u.h.push(p.value.segmentIndex);return e.dependencyStream.segmentIndex=u,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),Gs(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),Gs(e.dependencyStream,t))}function Sv(e,t){var n=e.roles;n||(n=[]);for(var r=w(t.roles),i=r.next();!i.done;i=r.next())i=i.value,n.includes(i)||n.push(i);for(e.roles=n,n=w(t.keyIds),r=n.next();!r.done;r=n.next())e.keyIds.add(r.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,U(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),t=w(t.closedCaptions),n=t.next();!n.done;n=t.next())r=w(n.value),n=r.next().value,r=r.next().value,e.closedCaptions.set(n,r)}function kC(e,t,n,r){r=r!==void 0&&r?n.matchedStreams:[],t=w(t);for(var i=t.next();!i.done;i=t.next()){if(i=TU(e,i.value,n),!i)return;r.push(i)}n.matchedStreams=r}function TU(e,t,n){var r={audio:iw,video:rw,text:Kh,image:Wh}[n.type],i=null,a=r(n);if(t.has(a))i=t.get(a);else{a={audio:function(g,v){return tw(e,g,v)},video:function(g,v){return tw(e,g,v)},text:AU,image:EU}[n.type];for(var u={audio:CU,video:IU,text:MU,image:_U}[n.type],l=w(t.values()),p=l.next();!p.done;p=l.next())p=p.value,!a(n,p)||n.fastSwitching!=p.fastSwitching||i&&!u(n,i,p)||(i=p)}return e.u&&!nw(i)&&t.delete(r(i)),i}function qh(e,t){return e.mimeType!=t.mimeType?!1:kv(e.codecs)===kv(t.codecs)}f.uh=function(e){this.o=e},f.Ah=function(e){this.u=e};function tw(e,t,n){return!(!qh(t,n)&&!e.o||t.drmInfos&&!J3(t.drmInfos,n.drmInfos))}function AU(e,t){return t.language?!(e.forced!==t.forced||Wu(e.language,t.language)==0||t.kind!=e.kind):!0}function EU(){return!0}function CU(e,t,n){var r=qh(e,t),i=qh(e,n);if(r&&!i)return!1;if(!r&&i||(r=Wu(e.language,t.language),i=Wu(e.language,n.language),i>r))return!0;if(i<r)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter(function(a){return e.roles.includes(a)}),i=n.roles.filter(function(a){return e.roles.includes(a)}),i.length>r.length)return!0;if(i.length<r.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&n.primary?!0:t.primary&&!n.primary?!1:(r=Gh(e.channelsCount,t.channelsCount,n.channelsCount),r==$a?!0:r==Jo?!1:(r=Gh(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate),r==$a?!0:r==Jo?!1:!!(e.bandwidth&&EC(e.bandwidth,t.bandwidth,n.bandwidth)==$a)))}function IU(e,t,n){var r=qh(e,t),i=qh(e,n);if(r&&!i)return!1;if(!r&&i||(r=Gh(e.width*e.height,t.width*t.height,n.width*n.height),r==$a))return!0;if(r==Jo)return!1;if(e.frameRate){if(r=Gh(e.frameRate,t.frameRate,n.frameRate),r==$a)return!0;if(r==Jo)return!1}return!!(e.bandwidth&&EC(e.bandwidth,t.bandwidth,n.bandwidth)==$a)}function MU(e,t,n){var r=Wu(e.language,t.language),i=Wu(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter(function(a){return e.roles.includes(a)}),i=n.roles.filter(function(a){return e.roles.includes(a)}),i.length>r.length)return!0;if(i.length<r.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!(n.mimeType!=e.mimeType||n.codecs!=e.codecs||t.mimeType==e.mimeType&&t.codecs==e.codecs)}function _U(e,t,n){return Gh(e.width*e.height,t.width*t.height,n.width*n.height)==$a}function TC(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,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,isAudioMuxedInVideo:!1,baseOriginalId:null}}function AC(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new jt([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}}function Gh(e,t,n){if(t==e&&e!=n)return Jo;if(n==e&&e!=t)return $a;if(t>e){if(n<=e||n-e<t-e)return $a;if(n-e>t-e)return Jo}else{if(n>e)return Jo;if(e-n<e-t)return $a;if(e-n>e-t)return Jo}return CC}function EC(e,t,n){return t=Math.abs(e-t),e=Math.abs(e-n),e<t?$a:t<e?Jo:CC}function nw(e){switch(e.type){case wt:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function rw(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,kv(e.codecs),e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function iw(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,kv(e.codecs),e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Kh(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Wh(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function kv(e){if(!aw.has(e)){var t=yr(e);aw.set(e,t)}return aw.get(e)}Ee("shaka.util.PeriodCombiner",Pr),Pr.prototype.setUseStreamOnce=Pr.prototype.Ah,Pr.prototype.setAllowMultiTypeVariants=Pr.prototype.uh,Pr.prototype.combinePeriods=Pr.prototype.gf,Pr.prototype.deleteStream=Pr.prototype.Kg,Pr.prototype.getImageStreams=Pr.prototype.oi,Pr.prototype.getTextStreams=Pr.prototype.Jf,Pr.prototype.getVariants=Pr.prototype.Ki;var $a=1,CC=0,Jo=-1,aw=new Map;function DU(e,t){var n=new DOMParser,r=PU.value()(e);e=null;try{e=n.parseFromString(r,"text/xml")}catch{return null}if(n=e.documentElement,!n||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function IC(e,t){try{var n=eo(e);return DU(n,t)}catch{return null}}var PU=new Up(function(){if(typeof trustedTypes<"u"){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(t){return t}});return function(t){return e.createHTML(t)}}return function(t){return t}});function Tv(){var e=this;this.j=this.g=null,this.A=[],this.i=null,this.pa=1,this.F=[],this.l={me:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0},this.u=new Map,this.o=new Map,this.B=new Map,this.ka=new Map,this.m=new Pr,this.I=0,this.oa=new me(5),this.K=new Tt(function(){if(e.H&&!e.g.continueLoadingWhenPaused&&(e.G.Ja(e.H,"timeupdate"),e.H.paused)){e.G.ma(e.H,"timeupdate",function(){return NC(e)});return}NC(e)}),this.O=new Oc,this.M=null,this.C=[],this.Z=1/0,this.fa=!1,this.h=null,this.L=0,this.P=!1,this.G=new Ce,this.H=null,this.T=!1,this.Y="",this.ea=function(){return!1},this.W=[]}f=Tv.prototype,f.configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.ea=t),n&&this.i&&this.i.presentationTimeline.U()&&this.K.sb(),this.h&&this.h.configure(this.g),this.m&&(this.m.uh(this.g.dash.multiTypeVariantsAllowed&&Bu()),this.m.Ah(this.g.dash.useStreamOnceInPeriodFlattening))},f.start=function(e,t){var n=this,r;return P(function(i){if(i.g==1)return n.fa=t.isLowLatencyMode(),n.A=[e],n.j=t,T(i,ow(n),2);if(r=i.h,n.j&&sw(n,r),!n.j)throw new $(2,7,7001);return i.return(n.i)})},f.stop=function(){for(var e=w(this.o.values()),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.A=[],this.i=null,this.o.clear(),this.B.clear(),this.u.clear(),this.l={me:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0},this.m=null,this.K!=null&&(this.K.stop(),this.K=null),this.h&&this.h.destroy(),this.G&&(this.G.release(),this.G=null),this.O.destroy()},f.update=function(){var e=this,t;return P(function(n){if(n.g==1)return ve(n,2),T(n,ow(e),4);if(n.g!=2)return V(n,0);if(t=W(n),!e.j||!t)return n.return();e.j.onError(t),oe(n)})},f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(e){if(this.i&&this.i.presentationTimeline.U()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.i.presentationTimeline.cc();var n=t.segmentIndex.find(e);n!=null&&(t=t.segmentIndex.get(n))&&(this.I=t.endTime-e,sw(this,0))}}},f.banLocation=function(e){this.h&&this.h.banLocation(e)},f.setMediaElement=function(e){this.H=e};function ow(e){var t,n,r,i,a,u,l,p,g,v,y;return P(function(x){return x.g==1?(t=4,n="MPD",r=WU(e),i=e.A,r.length?(i=r,n="Patch",t=6):1<e.A.length&&e.h&&(a=Hh(e.h,"Location",!0),a.length&&(i=a)),u=qn(i,e.g.retryParameters),l=Date.now(),T(x,lw(e,u,0,{type:t}),2)):x.g!=3?(p=x.h,e.j?(p.uri&&p.uri!=p.originalUri&&!e.A.includes(p.uri)&&e.A.unshift(p.uri),g=new ee(p.uri),e.Y=g.g.toString(),T(x,LU(e,p.data,p.uri,n),3)):x.return(0)):(v=Date.now(),y=(v-l)/1e3,e.oa.sample(1,y),x.return(y))})}function LU(e,t,n,r){var i,a,u,l,p,g,v,y,x,S;return P(function(k){if(k.g==1){if(i=t,a=e.g.dash.manifestPreprocessor,u=Bm,a!=u){if(ut("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),l=IC(i,r),!l)throw new $(2,4,4001,n);a(l),i=ca(l.outerHTML)}if(p=Gp(i,r),!p)throw new $(2,4,4001,n);return g=e.g.dash.manifestPreprocessorTXml,v=Vm,g!=v&&g(p),r==="Patch"?k.return(RU(e,p)):e.g.dash.disableXlinkProcessing?k.return(MC(e,p,n)):(y=e.g.dash.xlinkFailGracefully,x=bv(p,e.g.retryParameters,y,n,e.j.networkingEngine),Ju(e.O,x),T(k,x.promise,2))}return S=k.h,k.return(MC(e,S,n))})}function MC(e,t,n){var r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne,ue,se,he,xe,tt,Fe,Vt,At,gt,vt,Rt,pt,Et,ot,ht,Zt,Wn,Sn,Tn,Vn,er,fl,Zo,Ws;return P(function(na){switch(na.g){case 1:for(e.h&&e.h.l.clear(),r=[n],i=[],a=new Map,u=Gt(t,"Location"),l=w(u),p=l.next();!p.done;p=l.next())g=p.value,v=g.attributes.serviceLocation,(y=Ii(g))&&(x=Qn(r,[y])[0],v&&(e.h?pd(e.h,"Location",v,x):a.set(v,x)),i.push(x));if(e.h?(S=Hh(e.h,"Location",!0),0<S.length&&(r=e.A=S)):i.length&&(r=e.A=i),e.l.me=t.attributes.id||"",e.l.Id=st(t,"publishTime",_s)||0,e.F=Gt(t,"PatchLocation"),k=Promise.resolve(),(C=Nn(t,"ContentSteering"))&&e.j)for(E=C.attributes.defaultServiceLocation,e.h?(e.h.i=r,e.h.h=E):(e.h=new dd(e.j),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=r,e.h.h=E,(I=Ii(C))&&(st(C,"queryBeforeStart",Xg,!1)?k=zh(e.h,I):zh(e.h,I))),_=w(a.keys()),j=_.next();!j.done;j=_.next())B=j.value,q=a.get(B),pd(e.h,"Location",B,q);if(O=Gt(t,"BaseURL"),R=!1,e.h)for(H=w(O),z=H.next();!z.done;z=H.next())Y=z.value,K=Y.attributes.serviceLocation,J=Ii(Y),K&&J&&(pd(e.h,"BaseURL",K,J),R=!0);if(e.W=null,R&&e.h||(ae=O.map(Ii),e.W=Qn(r,ae)),ne=function(){return e.h&&R?Hh(e.h,"BaseURL"):e.W?e.W:[]},e.l.Ua=ne,ue=0,O&&O.length&&(ue=st(O[0],"availabilityTimeOffset",Kp)||0),e.l.cb=ue,e.I=st(t,"minimumUpdatePeriod",no,-1),se=st(t,"availabilityStartTime",_s),he=st(t,"timeShiftBufferDepth",no),xe=e.g.dash.ignoreSuggestedPresentationDelay,tt=null,xe||(tt=st(t,"suggestedPresentationDelay",no)),Fe=e.g.dash.ignoreMaxSegmentDuration,Vt=null,Fe||(Vt=st(t,"maxSegmentDuration",no)),At=t.attributes.type||"static",e.i&&e.i.presentationTimeline&&(e.T=e.i.presentationTimeline.U()&&At=="static"),e.l.type=At,e.i)for(gt=e.i.presentationTimeline,vt=gt.pb(),Rt=w(e.o.values()),pt=Rt.next();!pt.done;pt=Rt.next())Et=pt.value,Et.segmentIndex&&Et.segmentIndex.Oa(vt);else ot=e.g.dash.ignoreMinBufferTime,ht=0,ot||(ht=st(t,"minBufferTime",no)||0),Zt=0,Zt=tt!=null?Math.min(tt,he||1/0):0<e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:Math.min(1.5*ht,he||1/0),gt=new Ke(se,Zt,e.g.dash.autoCorrectDrift);return gt.Gc(At=="static"),gt.U()&&!isNaN(e.g.availabilityWindowOverride)&&(he=e.g.availabilityWindowOverride),he==null&&(he=1/0),gt.Ce(he),Wn=t.attributes.profiles||"",e.l.profiles=Wn.split(","),Sn={Ob:At!="static",presentationTimeline:gt,qa:null,ha:null,ga:null,J:null,bandwidth:0,Lf:!1,cb:ue,Wb:null,profiles:Wn.split(","),roles:null,vb:function(){return""}},T(na,k,2);case 2:return e.L=0,Tn=LC(e,Sn,ne,t,!1),Vn=Tn.duration,er=Tn.periods,(At!="static"||e.T)&&Tn.Mg||gt.bb(Vn||1/0),e.P&&e.fa&&gt.vh(e.Z),gt.Tf(Vt||1),e.P&&e.fa&&(fl=tt??e.g.defaultPresentationDelay,gt.jg(fl)),e.i?(e.i.periodCount=er.length,e.i.gapCount=e.L,T(na,_C(e,er,!1),4)):T(na,e.m.gf(er,Sn.Ob),6);case 6:if(e.i={presentationTimeline:gt,variants:e.m.l,textStreams:e.m.Jf(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:UU(t),nextUrl:FU(t),periodCount:er.length,gapCount:e.L,isLowLatency:e.P,startTime:null},!gt.Kh()){na.s(7);break}return Zo=Gt(t,"UTCTiming"),T(na,GU(e,ne,Zo),8);case 8:if(Ws=na.h,!e.j)return na.return();gt.wh(Ws);case 7:gt.ie();case 4:e.j.makeTextStreamsForClosedCaptions(e.i),jU(e),oe(na)}})}function _C(e,t,n){var r;return P(function(i){if(i.g==1)return T(i,e.m.gf(t,!0,n),2);e.i.variants=e.m.l,r=e.m.Jf(),0<r.length&&(e.i.textStreams=r),e.i.imageStreams=e.m.i,e.j.filter(e.i),oe(i)})}function RU(e,t){var n,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J;return P(function(ae){if(ae.g==1){if(n=t.attributes.mpdId,r=st(t,"originalPublishTime",_s),!n||n!==e.l.me||r!==e.l.Id)throw e.F=[],new $(1,4,4052);for(i=[],a=[],u=new Set,l=w(d5(t)),p=l.next();!p.done;p=l.next())if(g=p.value,v=Yg(g.attributes.sel||""),y=v[v.length-1],x=Ii(g)||"",y.name==="MPD")if(y.ac==="mediaPresentationDuration"){S=Ii(g)||"";var ne=no(S);if(ne!=null){e.l.Wb=ne;for(var ue=w(e.u.values()),se=ue.next();!se.done;se=ue.next())se.value.Wb=ne}}else if(y.ac==="type"){for(e.i.presentationTimeline.Gc(x=="static"),e.l.type=x,ne=w(e.u.values()),ue=ne.next();!ue.done;ue=ne.next())ue.value.Ob=x=="dynamic";x=="static"&&(e.I=-1)}else y.ac==="publishTime"?e.l.Id=_s(x)||0:y.ac===null&&g.tagName==="add"&&a.push(g);else if(y.name==="PatchLocation")h5(e.F,g);else if(y.name==="Period")g.tagName==="add"?a.push(g):g.tagName==="remove"&&y.id&&OU(e,y.id);else if(y.name==="SegmentTemplate"){if(ue=Yg(g.attributes.sel||""),ne=ue[ue.length-1],ne.ac){ue=DC(e,ue),se=Ii(g)||"";for(var he=w(ue),xe=he.next();!xe.done;xe=he.next())xe=e.u.get(xe.value),g5(xe.J.ic,g.tagName,ne.ac,se);ne=ue}else ne=[];for(k=ne,C=w(k),E=C.next();!E.done;E=C.next())I=E.value,u.add(I)}else if(y.name==="SegmentTimeline"||y.name==="S"){for(ne=Yg(g.attributes.sel||""),ne=DC(e,ne),ue=w(ne),se=ue.next();!se.done;se=ue.next())se=e.u.get(se.value),se=ld(se,Hs,"SegmentTimeline"),he=Gt(se,"S"),h5(he,g),se.children=he;for(_=ne,j=w(_),B=j.next();!B.done;B=j.next())q=B.value,u.add(q)}for(O=w(u),R=O.next();!R.done;R=O.next())H=R.value,PC(e,H);for(z=w(a),Y=z.next();!Y.done;Y=z.next())K=Y.value,i.push.apply(i,U(NU(e,K)));return i.length?(e.i.periodCount+=i.length,e.i.gapCount=e.L,T(ae,_C(e,i,!0),2)):ae.s(2)}e.l.type=="static"&&(J=e.l.Wb,e.i.presentationTimeline.bb(J||1/0)),oe(ae)})}function NU(e,t){return LC(e,{Ob:e.l.type=="dynamic",presentationTimeline:e.i.presentationTimeline,qa:null,ha:null,ga:null,J:null,bandwidth:0,Lf:!1,cb:e.l.cb,profiles:e.l.profiles,Wb:e.l.Wb,roles:null,vb:function(){return""}},e.l.Ua,t,!0).periods}function OU(e,t){e.i.periodCount--;for(var n=w(e.u.keys()),r=n.next();!r.done;r=n.next())if(r=r.value,r.startsWith(t)){var i=e.u.get(r);ld(i,Hs,"SegmentTimeline").children=[],PC(e,r),e.u.delete(r)}e.C=e.C.filter(function(a){return a!==t})}function DC(e,t){var n="",r="",i=-1,a="";t=w(t);for(var u=t.next();!u.done;u=t.next())u=u.value,u.name==="Period"?n=u.id:u.name==="AdaptationSet"?(r=u.id,u.position!==null&&(i=u.position)):u.name==="Representation"&&(a=u.id);if(t=[],a)t.push(n+","+a);else if(r)for(i=w(e.u.values()),e=i.next();!e.done;e=i.next())e=e.value,e.qa.id===n&&e.ga.id===r&&e.J.id&&t.push(n+","+e.J.id);else if(-1<i)for(r=w(e.u.values()),e=r.next();!e.done;e=r.next())e=e.value,e.qa.id===n&&e.ga.position===i&&e.J.id&&t.push(n+","+e.J.id);return t}function PC(e,t){var n=e.u.get(t),r=e.o.get(t);r.segmentIndex&&r.segmentIndex.Oa(e.i.presentationTimeline.pb());try{var i=mC(n,function(a,u,l,p){return UC(e,a,u,l,p)},e.o,!0,e.g.dash.initialSegmentLimit,e.ka,n.J.aesKey,null,!0);r.createSegmentIndex=function(){return P(function(a){if(a.g==1)return r.segmentIndex?a.s(0):T(a,i.rc(),3);r.segmentIndex=a.h,oe(a)})}}catch(a){if(t=n.J.contentType,t!=wt&&t!="application"&&t!="image"||a.code!=4002)throw a}}function UU(e){var t=Nn(e,"ServiceDescription");if(!t||(e=Nn(t,"Latency"),t=Nn(t,"PlaybackRate"),!e&&!t))return null;var n={};return e&&("target"in e.attributes&&(n.targetLatency=parseInt(e.attributes.target,10)/1e3),"max"in e.attributes&&(n.maxLatency=parseInt(e.attributes.max,10)/1e3),"min"in e.attributes&&(n.minLatency=parseInt(e.attributes.min,10)/1e3)),t&&("max"in t.attributes&&(n.maxPlaybackRate=parseFloat(t.attributes.max)),"min"in t.attributes&&(n.minPlaybackRate=parseFloat(t.attributes.min))),n}function FU(e){if(e=Gt(e,"SupplementalProperty"),!e.length)return null;e=w(e);for(var t=e.next();!t.done;t=e.next())if(t=t.value,t.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016")return t.attributes.value;return null}function LC(e,t,n,r,i){var a=t.Wb;a||(a=st(r,"mediaPresentationDuration",no),e.l.Wb=a);var u=0;e.i&&e.i.presentationTimeline&&e.T&&(u=e.i.presentationTimeline.Hb());var l=[],p=u;r=Gt(r,"Period");for(var g=0;g<r.length;g++){var v=r[g],y=r[g+1],x=st(v,"start",no,p),S=v.attributes.id,k=st(v,"duration",no);x=g==0&&x==0&&e.T?u:x;var C=null;if(y){var E=st(y,"start",no);E!=null&&(C=E-x+u)}else a!=null&&(C=a-x+u);if(E=L7,C&&k&&Math.abs(C-k)>E&&C>k&&e.L++,C==null&&(C=k),!(e.M!==null&&S!==null&&x!==null&&x<e.M)||e.C.includes(S)||g+1==r.length){if(x!==null&&(e.M===null||x>e.M)&&(e.M=x),p=BU(e,t,n,{start:x,duration:C,node:v,$g:C==null||!y}),l.push(p),t.qa.id&&C&&e.ka.set(t.qa.id,C),C==null){p=null;break}p=x+C}}if(i)for(t=w(l),n=t.next();!n.done;n=t.next())n=n.value.id,e.C.includes(n)||e.C.push(n);else e.C=l.map(function(I){return I.id});return a!=null?{periods:l,duration:a+u,Mg:!1}:{periods:l,duration:p,Mg:!0}}function jU(e){var t=Array.from(e.B.keys()).filter(function(l){return!e.C.includes(l)});t=w(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var r=!0,i=w(e.B.get(n)),a=i.next();!a.done;a=i.next()){a=a.value;var u=e.o.get(a);u&&(u.segmentIndex&&u.segmentIndex.getNumReferences()!=0?r=!1:(e.m&&e.m.Kg(u,n),e.o.delete(a)))}r&&e.B.delete(n)}}function BU(e,t,n,r){t.qa=uw(e,r.node,null,n),t.ha=r,t.qa.cb=t.cb,t.qa.id||(t.qa.id="__shaka_period_"+r.start);var i=Gt(r.node,"EventStream");n=t.presentationTimeline.pb(),i=w(i);for(var a=i.next();!a.done;a=i.next())KU(e,r.start,r.duration,a.value,n);for(n=Gt(r.node,"SupplementalProperty"),n=w(n),i=n.next();!i.done;i=n.next())i=i.value,i.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(i=Ev(e,i))&&(t.vb=i);if(n=Gt(r.node,"AdaptationSet").map(function(S,k){return RC(e,t,k,S)}).filter(Ns),t.Ob){i=[],a=w(n);for(var u=a.next();!u.done;u=a.next()){u=w(u.value.rj);for(var l=u.next();!l.done;l=u.next())i.push(l.value)}if(i.length!=new Set(i).size)throw new $(2,4,4018)}for(i=new Map,a=w(n),u=a.next();!u.done;u=a.next())for(u=w(u.value.ei),l=u.next();!l.done;l=u.next()){var p=w(l.value);l=p.next().value,p=p.next().value,i.set(l,p)}if(i.size)for(a=null,u=w(n),l=u.next();!l.done;l=u.next()){l=l.value,p=[];for(var g=w(l.streams),v=g.next(),y={};!v.done;y={og:void 0},v=g.next())if(y.og=v.value,i.has(y.og.originalId)){a||(a=Gt(r.node,"AdaptationSet").map(function(S,k){return RC(e,t,k,S)}).filter(Ns)),v=w(a);for(var x=v.next();!x.done;x=v.next())(x=x.value.streams.find(function(S){return function(k){return k.originalId==S.og.originalId}}(y)))&&(x.dependencyStream=i.get(x.originalId),p.push(x))}p.length&&l.streams.push.apply(l.streams,U(p))}if(r=n.filter(function(S){return!S.vg}),n=n.filter(function(S){return S.vg}),!e.g.disableIFrames){for(n=w(n),i=n.next();!i.done;i=n.next())for(i=i.value,a=i.vg.split(" "),u=w(r),l=u.next();!l.done;l=u.next())if(l=l.value,a.includes(l.id))for(l=w(l.streams),p=l.next();!p.done;p=l.next())j5(p.value,i.streams)}if(n=Av(e.g.disableAudio,r,"audio"),i=Av(e.g.disableVideo,r,"video"),a=Av(e.g.disableText,r,wt),r=Av(e.g.disableThumbnails,r,"image"),i.length===0&&n.length===0)throw new $(2,4,4004);return{id:t.qa.id,audioStreams:n,videoStreams:i,textStreams:a,imageStreams:r}}function Av(e,t,n){return e||!t.length?[]:t.reduce(function(r,i){return i.contentType!=n||r.push.apply(r,U(i.streams)),r},[])}function RC(e,t,n,r){function i(J){var ae=J.attributes["dvb:fontFamily"];J=J.attributes["dvb:url"],ae&&J&&(J=Qn(t.ga.Ua(),[J],t.vb()),e.j.addFont(ae,J[0]))}function a(J){switch(J){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function u(J){switch(J){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.ga=uw(e,r,t.qa,null),t.ga.position=n;var l=!1;n=Gt(r,"Role");var p=n.map(function(J){return J.attributes.value}).filter(Ns),g=void 0,v=t.ga.contentType==wt;v&&(g="subtitle"),n=w(n);for(var y=n.next();!y.done;y=n.next()){y=y.value;var x=y.attributes.schemeIdUri;if(x==null||x=="urn:mpeg:dash:role:2011")switch(y=y.attributes.value,y){case"main":l=!0;break;case"caption":case"subtitle":g=y}}var S=Gt(r,"EssentialProperty");n=null;var k=!1;y=null,x=!1,S=w(S);for(var C=S.next();!C.done;C=S.next()){C=C.value;var E=C.attributes.schemeIdUri;if(E=="http://dashif.org/guidelines/trickmode")n=C.attributes.value;else if(E=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var I=u(parseInt(C.attributes.value,10));else if(E=="urn:mpeg:mpegB:cicp:ColourPrimaries")var _=a(parseInt(C.attributes.value,10));else E!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(E=="urn:mpeg:dash:ssr:2023"&&e.g.dash.enableFastSwitching?k=!0:E=="urn:dvb:dash:fontdownload:2014"?i(C):E=="urn:mpeg:dash:urlparam:2014"&&(y=Ev(e,C))||(x=!0))}if(x)return null;var j=null;for(x=Gt(r,"SupplementalProperty"),x=w(x),S=x.next();!S.done;S=x.next())S=S.value,C=S.attributes.schemeIdUri,C=="http://dashif.org/guidelines/last-segment-number"?j=parseInt(S.attributes.value,10)-1:C=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?I=u(parseInt(S.attributes.value,10)):C=="urn:mpeg:mpegB:cicp:ColourPrimaries"?_=a(parseInt(S.attributes.value,10)):C=="urn:dvb:dash:fontdownload:2014"?i(S):C=="urn:mpeg:dash:urlparam:2014"&&(y=Ev(e,S));y&&(t.vb=y),y=Gt(r,"Accessibility");var B=new Map,q;for(y=w(y),x=y.next();!x.done;x=y.next())if(S=x.value,x=S.attributes.schemeIdUri,S=S.attributes.value,x!="urn:scte:dash:cc:cea-608:2015"||e.g.disableText)if(x!="urn:scte:dash:cc:cea-708:2015"||e.g.disableText)x=="urn:mpeg:dash:role:2011"?S!=null&&(p.push(S),S=="captions"&&(g="caption")):x=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(S=="1"?q="visually impaired":S=="2"&&(q="hard of hearing"));else if(x=1,S!=null)for(S=w(S.split(";")),C=S.next();!C.done;C=S.next()){E=C.value;var O=C=void 0;E.includes("=")?(E=E.split("="),C="svc"+E[0],O=E[1].split(",")[0].split(":").pop()):(C="svc"+x,x++,O=E),B.set(C,Jt(O))}else B.set("svc1","und");else if(x=1,S!=null)for(S=S.split(";"),C=w(S),E=C.next();!E.done;E=C.next()){O=E.value;var R=E=void 0;O.includes("=")?(O=O.split("="),E=O[0].startsWith("CC")?O[0]:"CC"+O[0],R=O[1]||"und"):(E="CC"+x,S.length==2?x+=2:x++,R=O),B.set(E,Jt(R))}else B.set("CC1","und");y=Gt(r,"ContentProtection");var H=oC(y,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI);t.ga.encrypted=0<y.length;var z=Jt(t.ga.language||"und"),Y=t.ga.label,K=new Map;if(r=Gt(r,"Representation"),!e.g.ignoreSupplementalCodecs){for(y=[],x=w(r),S=x.next();!S.done;S=x.next())C=S.value,(S=Lo(C,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&(C=Ua(C),C.attributes.codecs=S.split(" ").join(","),C.attributes.id&&(C.attributes.supplementalId=C.attributes.id+"_supplementalCodecs"),y.push(C));r.push.apply(r,U(y))}if(y=r.map(function(J){var ae=VU(e,t,H,g,z,Y,l,p,B,J,q,j);return ae&&(ae.hdr=ae.hdr||I,ae.colorGamut=ae.colorGamut||_,ae.fastSwitching=k,J=J.attributes.dependencyId)?(ae.baseOriginalId=J,K.set(J,ae),null):ae}).filter(function(J){return!!J}),y.length==0&&K.size==0){if(n=t.ga.contentType=="image",e.g.dash.ignoreEmptyAdaptationSet||v||n)return null;throw new $(2,4,4003)}if(!t.ga.contentType||t.ga.contentType=="application")for(t.ga.contentType=FC(y[0].mimeType,y[0].codecs),v=w(y),x=v.next();!x.done;x=v.next())x.value.type=t.ga.contentType;for(v=t.ga.id||"__fake__"+e.pa++,x=w(y),S=x.next();!S.done;S=x.next()){for(S=S.value,C=w(H.drmInfos),E=C.next();!E.done;E=C.next())E=E.value,E.keyIds=E.keyIds&&S.keyIds?new Set([].concat(U(E.keyIds),U(S.keyIds))):E.keyIds||S.keyIds;S.groupId=v}return r=r.map(function(J){return J.attributes.supplementalId||J.attributes.id}).filter(Ns),{id:v,contentType:t.ga.contentType,language:z,Qk:l,streams:y,drmInfos:H.drmInfos,vg:n,rj:r,ei:K}}function Ev(e,t){if((t=pa(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&st(t,"useMPDUrlQuery",Xg,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return n=="$querypart$"?e.Y:n.split("&").map(function(r){if(r=="$querypart$")return e.Y;var i=/\$query:(.*?)\$/g.exec(r);if(i&&i.length==2){i=i[1];var a=new Es(e.Y).get(i);if(a.length)return i+"="+a[0]}return r}).join("&")}}return null}function VU(e,t,n,r,i,a,u,l,p,g,v,y){t.J=uw(e,g,t.ga,null);var x=t.J.id;if(e.Z=Math.min(e.Z,t.J.cb),e.P=0<e.Z,!qU(t.J))return null;var S=t.ha.start;t.bandwidth=st(g,"bandwidth",Ro)||0,t.roles=l;var k=Gt(g,"SupplementalProperty"),C=Gt(g,"EssentialProperty"),E=Gt(g,"ContentProtection");g=null;var I=C.find(function(ue){return ue.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});(I||(I=k.find(function(ue){return ue.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"})))&&(g=Ev(e,I)),g&&(t.vb=g),I=t.J.contentType,g=I==wt||I=="application",I=I=="image",E.length&&(t.ga.encrypted=!0);try{var _=void 0;if(n.cf){var j=t.J.Ua,B=t.vb,q=Qn(j(),[n.cf.Xi],B()),O=qn(q,e.g.retryParameters);_={bitsKey:128,blockCipherMode:"CBC",iv:n.cf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var ue,se,he;return P(function(xe){if(xe.g==1)return T(xe,lw(e,O,6),2);if(xe.g!=3){if(ue=xe.h,!ue.data||ue.data.byteLength!=16)throw new $(2,4,4049);return se={name:"AES-CBC"},he=_,T(xe,d.crypto.subtle.importKey("raw",ue.data,se,!0,["decrypt"]),3)}he.cryptoKey=xe.h,_.fetchKey=void 0,oe(xe)})}}}if(t.J.aesKey=_,j=function(ue,se,he,xe){return UC(e,ue,se,he,xe)},t.J.dd)var R=lU(t,j,_);else if(t.J.Zb)R=dU(t,e.o,_);else if(t.J.ic)R=mC(t,j,e.o,!!e.i,e.g.dash.initialSegmentLimit,e.ka,_,y,!1);else{var H=t.ha.duration||0,z=t.J.Ua,Y=t.J.mimeType,K=t.J.codecs;R={rc:function(){var ue=Em(S,H,z());return ue.Eb(function(se){se.mimeType=Y,se.codecs=K}),Promise.resolve(ue)}}}}catch(ue){if((g||I)&&ue.code==4002)return null;throw ue}y=YO(E,n,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI),y=new Set(y?[y]:[]),E=!1,k.some(function(ue){return ue.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&ue.attributes.value=="JOC"})&&(E=!0),k=!1,g&&(k=l.includes("forced_subtitle")||l.includes("forced-subtitle"));var J;if(I&&((C=C.find(function(ue){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(ue.attributes.schemeIdUri)}))&&(J=C.attributes.value),!J))return null;var ae;g=t.J.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(g.includes("hvc1.2.4.L153.B0")||g.includes("hev1.2.4.L153.B0"))&&(ae="PQ"),C=t.J.id?t.qa.id+","+t.J.id:"",e.F.length&&x&&e.u.set(t.qa.id+","+x,$U(t));var ne=C&&e.o.has(C)?e.o.get(C):{id:e.pa++,originalId:t.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){ne.segmentIndex&&(ne.segmentIndex.release(),ne.segmentIndex=null)},segmentIndex:null,mimeType:t.J.mimeType,codecs:g,frameRate:t.J.frameRate,pixelAspectRatio:t.J.pixelAspectRatio,bandwidth:t.bandwidth,width:t.J.width,height:t.J.height,kind:r,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:y,language:i,originalLanguage:t.ga.language,label:a,type:t.ga.contentType,primary:u,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:t.J.emsgSchemeIdUris,roles:l,forced:k,channelsCount:t.J.oe,audioSamplingRate:t.J.audioSamplingRate,spatialAudio:E,closedCaptions:p,hdr:ae,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:v,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Dn(t.J.mimeType,t.J.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return ne.createSegmentIndex=function(){var ue;return P(function(se){if(se.g==1)return ne.segmentIndex?se.s(0):(ue=ne,T(se,R.rc(),3));ue.segmentIndex=se.h,oe(se)})},C&&t.Ob&&!e.o.has(C)&&(t=t.qa.id||"",e.B.has(t)||e.B.set(t,[]),e.o.set(C,ne),e.B.get(t).push(C)),ne}function $U(e){function t(n){return n?(n=Hu(n),n.dd=null,n.Zb=null,n.ic=Z1(n.ic),n):null}return e=Hu(e),e.qa=t(e.qa),e.ga=t(e.ga),e.J=t(e.J),e.ha&&(e.ha=Hu(e.ha),e.ha.node=null),e}function NC(e){var t,n;return P(function(r){switch(r.g){case 1:return t=0,ve(r,2),T(r,ow(e),4);case 4:t=r.h,V(r,3);break;case 2:if(n=W(r),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),r.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return r.return();e.j.onManifestUpdated(),sw(e,t),oe(r)}})}function sw(e,t){if(!(0>e.I)){var n=e.I;0<=e.g.updatePeriod&&(n=e.g.updatePeriod),e.K.da(Math.max(n-t,$e(e.oa)))}}function uw(e,t,n,r){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,oe:null,audioSamplingRate:null,cb:0,Ae:0,encrypted:!1},r=r||n.Ua;var i=t.attributes.id,a=t.attributes.supplementalId,u=Gt(t,"BaseURL"),l,p=!1;if(e.h)for(var g=w(u),v=g.next();!v.done;v=g.next()){var y=v.value;v=y.attributes.serviceLocation,y=Ii(y),v&&y&&(pd(e.h,i,v,y),p=!0)}p&&e.h||(l=u.map(Ii)),g=t.attributes.contentType||n.contentType,v=t.attributes.mimeType||n.mimeType,y=Jb([t.attributes.codecs||n.codecs]).join(",");var x=st(t,"frameRate",O7)||n.frameRate,S=t.attributes.sar||n.pixelAspectRatio,k=zU(Gt(t,"InbandEventStream"),n.emsgSchemeIdUris),C=Gt(t,"AudioChannelConfiguration");C=HU(C)||n.oe;var E=st(t,"audioSamplingRate",_r)||n.audioSamplingRate;g||(g=FC(v,y));var I=Nn(t,"SegmentBase"),_=Nn(t,"SegmentTemplate"),j=I&&st(I,"availabilityTimeOffset",Kp)||0,B=_&&st(_,"availabilityTimeOffset",Kp)||0,q=u&&u.length&&st(u[0],"availabilityTimeOffset",Kp)||0;j=n.cb+q+j+B,B=null,(q=Nn(t,"SegmentSequenceProperties"))&&(q=Nn(q,"SAP"))&&(B=st(q,"cadence",Fr)),q=t.attributes.label;var O=Gt(t,"Label");return O&&O.length&&(O=O[0],jn(O)&&(q=jn(O))),{Ua:function(){return Qn(r(),u.length?e.h&&p?Hh(e.h,i):l||[]:[])},dd:I||n.dd,Zb:Nn(t,"SegmentList")||n.Zb,ic:_||n.ic,width:st(t,"width",_r)||n.width,height:st(t,"height",_r)||n.height,contentType:g,mimeType:v,codecs:y,frameRate:x,pixelAspectRatio:S,emsgSchemeIdUris:k,id:a||i,originalId:i,language:t.attributes.lang,oe:C,audioSamplingRate:E,cb:j,de:null,Ae:B||n.Ae,label:q||null,encrypted:!1}}function zU(e,t){t=t.slice(),e=w(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}function HU(e){e=w(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=t.attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(t=parseInt(t,10),!t)continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],t=parseInt(t,16),!t)continue;for(var r=0,i=0;i<n.length;i++)t&1<<i&&(r+=n[i]);if(r)return r;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),t=parseInt(t,16),!t)continue;for(i=r=0;i<n.length;i++)t&1<<i&&(r+=n[i]);if(r)return r;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&0<t&&t<n.length)return n[t]}}return null}function qU(e){var t=e.dd?1:0;return t+=e.Zb?1:0,t+=e.ic?1:0,t==0?e.contentType==wt||e.contentType=="application":(t!=1&&(e.dd&&(e.Zb=null),e.ic=null),!0)}function OC(e,t,n,r){var i,a,u,l,p,g,v;return P(function(y){if(y.g==1)return i=[Wr(n)],a=Qn(t(),i),u=qn(a,e.g.retryParameters),u.method=r,l=e.j.networkingEngine.request(4,u,{isPreload:e.ea()}),Ju(e.O,l),T(y,l.promise,2);if(p=y.h,r=="HEAD"){if(!p.headers||!p.headers.date)return y.return(0);g=p.headers.date}else g=yn(p.data);return v=Date.parse(g),isNaN(v)?y.return(0):y.return(v-Date.now())})}function GU(e,t,n){var r,i,a,u,l,p,g,v;return P(function(y){switch(y.g){case 1:r=n.map(function(x){return{scheme:x.attributes.schemeIdUri,value:x.attributes.value}}),i=e.g.dash.clockSyncUri,!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),a=w(r),u=a.next();case 2:if(u.done){y.s(4);break}switch(l=u.value,ve(y,5),p=l.scheme,g=l.value,p){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return y.s(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 y.s(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return v=Date.parse(g),y.return(isNaN(v)?0:v-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":Be("NTP UTCTiming scheme is not supported");break;default:Be("Unrecognized scheme in UTCTiming element",p)}y.s(9);break;case 7:return T(y,OC(e,t,g,"HEAD"),10);case 10:return y.return(y.h);case 8:return T(y,OC(e,t,g,"GET"),11);case 11:return y.return(y.h);case 9:V(y,3);break;case 5:W(y);case 3:u=a.next(),y.s(2);break;case 4:return Be("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),y.return(0)}})}function KU(e,t,n,r,i){var a=r.attributes.schemeIdUri||"",u=r.attributes.value||"",l=st(r,"timescale",_r)||1,p=st(r,"presentationTimeOffset",_r)||0;r=w(Gt(r,"Event"));for(var g=r.next();!g.done;g=r.next()){g=g.value;var v=st(g,"presentationTime",_r)||0,y=st(g,"duration",_r)||0;v=Math.max((v-p)/l+t,t),y=v+y/l,n!=null&&(v=Math.min(v,t+n),y=Math.min(y,t+n)),y<i||(g={schemeIdUri:a,value:u,startTime:v,endTime:y,id:g.attributes.id||"",timescale:l,eventElement:m5(g),eventNode:Z1(g)},e.j.onTimelineRegionAdded(g))}}function UC(e,t,n,r,i){var a,u,l,p;return P(function(g){return g.g==1?(a=fa,u=i?0:1,l=bh(t,n,r,e.g.retryParameters),T(g,lw(e,l,a,{type:u}),2)):(p=g.h,g.return(p.data))})}function FC(e,t){return t=Dn(e,t),Pc(t)?wt:e.split("/")[0]}function lw(e,t,n,r){return r||(r={}),r.isPreload=e.ea(),t=e.j.networkingEngine.request(n,t,r),Ju(e.O,t),t.promise}function WU(e){var t=e.l.Id;if(!e.l.me||!t||!e.F.length)return[];var n=Date.now()/1e3,r=e.F.filter(function(i){return i=_r(i.attributes.ttl),!i||t+i>n}).map(Ii).filter(Ns);return r.length?Qn(e.A,r):[]}Ee("shaka.dash.DashParser",Tv),Zu("application/dash+xml",function(){return new Tv}),Zu("video/vnd.mpeg.dash.mpd",function(){return new Tv});function Cv(){}Ee("shaka.dependencies",Cv),Cv.has=function(e){return cw.has(e)},Cv.add=function(e,t){if(!BC[e])throw Error(e+" is not supported");e==jC?ut("mux.js","mux.js is no longer used in Shaka Player."):cw.set(e,function(){return t})};var jC="muxjs",BC={Rk:jC,ISOBoxer:"ISOBoxer"};Cv.Allowed=BC;var cw=new Map([["ISOBoxer",function(){return d.ISOBoxer}]]);function VC(e,t,n){this.type=e,this.ca=t,this.segments=n||null}function Iv(e,t,n,r){this.id=e,this.name=t,this.attributes=n,this.value=r===void 0?null:r}Iv.prototype.toString=function(e){function t(i){return i.name+"="+(isNaN(Number(i.value))?'"'+i.value+'"':i.value)}var n="#"+this.name,r=this.attributes?this.attributes.filter(function(i){return e?!e.has(i.name):!0}).map(t):[];return this.value&&r.unshift(this.value),0<r.length&&(n+=":"+r.join(",")),n};function $C(e,t){return t?e.toString():(t=new Set().add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function fd(e,t){return e=e.attributes.filter(function(n){return n.name==t}),e.length?e[0]:null}function Ve(e,t,n){return(e=fd(e,t))?e.value:n||null}function Kt(e,t){if(e=fd(e,t),!e)throw new $(2,4,4023,t);return e.value}function zC(e,t,n){n=n===void 0?[]:n,this.ca=t,this.g=e,this.Jb=n}function Mv(e,t){this.name=e,this.value=t}function Yi(e,t){return e.filter(function(n){return n.name==t})}function HC(e,t){return e.filter(function(n){return Kt(n,"TYPE")==t})}function ar(e,t){e=w(e);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.name===t)return n;return null}function gd(e,t,n){return n=n===void 0?0:n,(e=ar(e,t))?Number(e.value):n}function Ks(e,t,n){return t?qC(e,[t],n):[]}function qC(e,t,n){if(!t.length)return[];var r=t;return n&&n.size&&(r=t.map(function(i){return GC(i,n)})),Qn(e,r)}function GC(e,t){if(!t||!t.size)return e;e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}");var n=e.match(/{\$\w*}/g);if(n){n=w(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;var i=r.slice(2,r.length-1),a=t.get(i);if(a)e=e.replace(r,a);else throw new $(2,4,4039,i)}}return e}function XU(){this.g=0}function dw(e,t){t=yn(t),t=t.replace(/\r\n|\r(?=[^\n]|$)/gm,`
`).trim();var n=t.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new $(2,4,4015);t=0;for(var r=!0,i=w(n),a=i.next();!a.done;a=i.next())if(a=a.value,/^#(?!EXT)/m.test(a)||r)r=!1;else if(a=pw(e,a),--e.g,KC.includes(a.name)){t=1;break}else a.name=="EXT-X-STREAM-INF"&&(r=!0);for(i=[],r=!0,a=0;a<n.length;a++){var u=n[a],l=n[a+1];if(/^#(?!EXT)/m.test(u)||r)r=!1;else{if(u=pw(e,u),YU.includes(u.name)){if(t!=1)throw new $(2,4,4017);u=n.splice(a,n.length-a),n=[],r=[],a=[],l=null,u=w(u);for(var p=u.next();!p.done;p=u.next())p=p.value,/^(#EXT)/.test(p)?(p=pw(e,p),KC.includes(p.name)?i.push(p):p.name=="EXT-X-MAP"?l=p:p.name=="EXT-X-PART"?a.push(p):p.name=="EXT-X-PRELOAD-HINT"?Ve(p,"TYPE")=="PART"?a.push(p):Ve(p,"TYPE")=="MAP"&&(p.name="EXT-X-MAP",l=p):r.push(p)):/^#(?!EXT)/m.test(p)||(p=p.trim(),l&&r.push(l),n.push(new zC(p,r,a)),r=[],a=[]);return a.length&&(l&&r.push(l),n.push(new zC("",r,a))),new VC(t,i,n)}i.push(u),u.name=="EXT-X-STREAM-INF"&&(u.attributes.push(new Mv("URI",l)),r=!0)}}return new VC(t,i)}function pw(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new $(2,4,4016,t);t=n[1];var r=n[2];n=[];var i;if(r){r=new Ec(r);var a;(a=$u(r,/^([^,=]+)(?:,|$)/g))&&(i=a[1]);for(var u=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;a=$u(r,u);)n.push(new Mv(a[1],a[2]||a[3])),Cc(r)}return new Iv(e,t,n,i)}var KC="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),YU="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function WC(){}function XC(e,t){try{var n=_v(e);return Nc({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(r){return Yu(r)}}function _v(e){var t=e.split(":");if(2>t.length||t[0]!="data")throw new $(2,1,1004,e);if(t=t.slice(1).join(":").split(","),2>t.length)throw new $(2,1,1004,e);var n=t[0];e=d.decodeURIComponent(t.slice(1).join(",")),t=n.split(";"),n=t[0];var r=!1;1<t.length&&t[t.length-1]=="base64"&&(r=!0,t.pop());var i;return r?i=Gi(e):i=ca(e),{data:i,contentType:n}}Ee("shaka.net.DataUriPlugin",WC),WC.parse=XC,jo("data",XC);function Dv(){var e=this;this.g=this.h=null,this.F=1,this.A=new Map,this.I=new Map,this.M=new Map,this.M.set("video",new Map),this.M.set("audio",new Map),this.M.set(wt,new Map),this.M.set("image",new Map),this.Sb=new Map().set("com.apple.streamingkeydelivery",function(t,n,r){return wF(e,t,n,r)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(t){var n=Kt(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var r="cenc";n=="SAMPLE-AES"&&(r="cbcs"),n=Kt(t,"URI"),n=_v(n.split("?")[0]),n=Ye(n.data),r=Ms("com.widevine.alpha",r,[{initDataType:"cenc",initData:n}]),(t=Ve(t,"KEYID"))&&r.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(r)}else t=Promise.resolve(null);return t}).set("com.microsoft.playready",function(t){var n=Kt(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var r="cenc";n=="SAMPLE-AES"&&(r="cbcs"),t=Kt(t,"URI"),t=_v(t.split("?")[0]),t=Ye(t.data),n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),n=dm(t,n,new Set,0),r=Ms("com.microsoft.playready",r,[{initDataType:"cenc",initData:n}]),(t=qu(["<PLAYREADY>",Do(t),"</PLAYREADY>"].join(`
`)))&&(r.licenseServerUri=vv(t)),r=Promise.resolve(r)}else r=Promise.resolve(null);return r}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(t){var n=Kt(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var r="cenc";n=="SAMPLE-AES"&&(r="cbcs"),n=Kt(t,"URI"),n=_v(n.split("?")[0]),n=Ye(n.data),r=Ms("com.huawei.wiseplay",r,[{initDataType:"cenc",initData:n}]),(t=Ve(t,"KEYID"))&&r.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(r)}else t=Promise.resolve(null);return t}),this.Na=new Set,this.i=new Map,this.l=null,this.C="",this.Ga=new XU,this.K=-1,this.ea=1/0,this.Z=this.Ub=this.Ma=!1,this.B=new Tt(function(){if(e.W&&!e.g.continueLoadingWhenPaused&&(e.T.Ja(e.W,"timeupdate"),e.W.paused)){e.T.ma(e.W,"timeupdate",function(){return mI(e)});return}mI(e)}),this.Ea=Ov,this.m=null,this.La=0,this.o=1/0,this.Fa=this.Aa=this.P=0,this.Y=new Oc,this.G=new Map,this.H=new Map,this.sa=new Map,this.ka=new Map,this.L=new Map,this.oa=new Map,this.pa=new Map,this.Tb=this.fa=!1,this.Pb=new me(5),this.j=null,this.O=!0,this.ya=new Set,this.T=new Ce,this.u=this.W=null,this.Qb=function(){return!1}}f=Dv.prototype,f.configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.Qb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.U()&&this.B.sb()},f.start=function(e,t){var n=this,r;return P(function(i){return i.g==1?(n.h=t,n.fa=t.isLowLatencyMode(),T(i,ww(n,[e]).promise,2)):i.g!=3?(r=i.h,n.C=r.uri,T(i,ZU(n,r.data),3)):i.return(n.m)})},f.stop=function(){this.B&&(this.B.stop(),this.B=null);var e=[];return this.Y&&(e.push(this.Y.destroy()),this.Y=null),this.g=this.h=null,this.Na.clear(),this.m=null,this.i.clear(),this.I.clear(),this.H.clear(),this.A.clear(),this.sa.clear(),this.ka.clear(),this.L.clear(),this.oa.clear(),this.pa.clear(),this.ya.clear(),this.j&&this.j.destroy(),this.T&&(this.T.release(),this.T=null),Promise.all(e)},f.update=function(){var e=this,t,n,r,i,a,u,l,p,g,v,y,x;return P(function(S){if(S.g==1){if(!Vr(e))return S.return();for(t=[],n=Array.from(e.i.values()),e.o=1/0,e.m.gapCount=0,r=n.filter(function(k){return k.stream.segmentIndex}),i=w(r),a=i.next();!a.done;a=i.next())u=a.value,t.push(JU(e,u));return T(S,Promise.all(t),2)}for(rI(e,r.map(function(k){return k.stream})),l=r.some(function(k){return k.rd==0}),r.length&&!l&&(p=AF,Rv(e,p.Ph),g=r.map(function(k){return k.Vb}),e.l.bb(Math.min.apply(Math,U(g))),e.h.updateDuration()),l&&fw(e),v=w(r),y=v.next();!y.done;y=v.next())x=y.value,x.stream.isAudioMuxedInVideo||!x.stream.segmentIndex||Ba(x.stream.segmentIndex)||e.h.disableStream(x.stream);oe(S)})};function hw(e,t){return Vr(e)?e.M.get(t.type):t.je}function JU(e,t){var n,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne,ue,se,he,xe,tt,Fe,Vt;return P(function(At){switch(At.g){case 1:if(t.stream.isAudioMuxedInVideo)return At.return();for(n=[],r=w(t.N()),i=r.next();!i.done;i=r.next())a=i.value,u=new ee(a),l=u.g,t.Td&&(0<=t.Ab&&l.add("_HLS_msn",String(t.Ab)),0<=t.Bb&&l.add("_HLS_part",String(t.Bb))),t.Ud&&l.add("_HLS_skip","YES"),Uu(l)&&kt(u,bt(l.toString())),n.push(u.toString());return ve(At,2),T(At,ww(e,n,!0).promise,4);case 4:p=At.h,V(At,3);break;case 2:throw g=W(At),e.h&&e.h.disableStream(t.stream),g;case 3:if(!t.stream.segmentIndex)return At.return();if(v=dw(e.Ga,p.data),v.type!=1)throw new $(2,4,4017);return y=p.uri,y==p.originalUri||t.N().includes(y)||t.ve.push(y),x=Yi(v.ca,"EXT-X-DEFINE"),S=gw(e,x,y),k=t.stream,C=hw(e,t),T(At,sI(e,v,k.mimeType,t.N,S),5);case 5:for(E=At.h,I=E.keyIds,_=E.drmInfos,j=E.encrypted,B=E.Bg,k.encrypted||!j||B||(k.encrypted=!0),q=function(gt,vt){return gt.size===vt.size&&[].concat(U(gt)).every(function(Rt){return vt.has(Rt)})},q(k.keyIds,I)||(k.keyIds=I,k.drmInfos=_,e.h.newDrmInfo(k)),O=hI(e,v,C,S,t.N,t.type),R=O.segments,(H=O.bandwidth)&&(k.bandwidth=H),z=Im(k),Y=w(R),K=Y.next();!K.done;K=Y.next())J=K.value,J.$&&(J.$.Wc=z);k.segmentIndex.Bd(R,e.l.pb()),R.length&&(ae=gd(v.ca,"EXT-X-MEDIA-SEQUENCE",0),ue=(ne=ar(v.ca,"EXT-X-SKIP"))?Number(Ve(ne,"SKIPPED-SEGMENTS")):0,se=aI(ae,R),he=se.Ab,xe=se.Bb,t.Ab=he+ue,t.Bb=xe,tt=C.get(ae),k.segmentIndex.Oa(tt)),(Fe=Ba(k.segmentIndex))&&(t.Bc=Fe.startTime,Vt=R[R.length-1],t.Vb=Vt.endTime),ar(v.ca,"EXT-X-ENDLIST")&&(t.rd=!0),vw(e,v),yw(e,v.ca,k.type,S,t.N),oe(At)}})}f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(){},f.banLocation=function(e){this.j&&this.j.banLocation(e)},f.setMediaElement=function(e){this.W=e};function YC(e,t,n){n=n===void 0?!1:n;for(var r=e.K==-1,i=w(t),a=i.next();!a.done;a=i.next()){a=a.value;var u=a.stream.segmentIndex,l=hw(e,a);if(u=Ba(u)){l=w(l);for(var p=l.next();!p.done;p=l.next()){p=w(p.value);var g=p.next().value;if(p.next().value==u.startTime){r&&(e.K=Math.max(e.K,g)),a.qf=g;break}}}}if(!(0>e.K))for(t=w(t),r=t.next();!r.done;r=t.next())r=r.value,(Xh(e,r.type)||n)&&(i=r.stream.segmentIndex)&&(a=e.K-r.qf,0<a&&(i.g.splice(0,a),i=Ba(i))&&(i=-i.startTime,r.stream.segmentIndex.offset(i),JC(e,r,i)))}function QU(e,t){if(e.ea==1/0){t=w(t);for(var n=t.next();!n.done;n=t.next())n=Ba(n.value.stream.segmentIndex),n!=null&&n.h!=null&&(e.ea=Math.min(e.ea,n.h))}if(t=e.ea,t!=1/0){n=w(e.i.values());for(var r=n.next();!r.done;r=n.next())if(r=r.value,!Xh(e,r.type)){var i=r.stream.segmentIndex;if(i!=null){var a=Ba(i);if(a)if(a.h==null)at("Missing EXT-X-PROGRAM-DATE-TIME for stream",r.N(),"Expect AV sync issues!");else for(JC(e,r,a.h-t-a.startTime),r=w(i),i=r.next();!i.done;i=r.next())i.value.qg(t)}}}}function JC(e,t,n){if(!(.001>Math.abs(n))){t.Bc+=n,t.Vb+=n,e=hw(e,t);for(var r=w(e),i=r.next();!i.done;i=r.next()){var a=w(i.value);i=a.next().value,a=a.next().value,e.set(i,a+n)}t.N()}}function ZU(e,t){var n,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne,ue,se,he,xe,tt,Fe,Vt,At,gt,vt,Rt,pt,Et;return P(function(ot){switch(ot.g){case 1:return n=zn,r=dw(e.Ga,t),i=Yi(r.ca,"EXT-X-DEFINE"),a=[],u=[],l=[],e.l=new Ke(null,0),e.l.Gc(!0),p=function(){return[e.C]},g=null,v=new Map,r.type==1?(e.O=!1,he=Yi(r.ca,"EXT-X-DEFINE"),v=gw(e,he,e.C),g=n.la,xe="",tt=new Map,T(ot,iI(e,e.F++,v,r,p,"",g,xe,!0,"Media Playlist",null,tt,null,!1,null,!1),7)):(tF(e,i),y=Yi(r.ca,"EXT-X-MEDIA"),x=Yi(r.ca,"EXT-X-STREAM-INF"),S=Yi(r.ca,"EXT-X-IMAGE-STREAM-INF"),k=Yi(r.ca,"EXT-X-I-FRAME-STREAM-INF"),C=Yi(r.ca,"EXT-X-SESSION-KEY"),E=Yi(r.ca,"EXT-X-SESSION-DATA"),I=Yi(r.ca,"EXT-X-CONTENT-STEERING"),rF(e,E),T(ot,iF(e,I),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(_=[],j=w(x),B=j.next(),q={};!B.done;q={Gh:void 0},B=j.next())O=B.value,(R=Ve(O,"SUPPLEMENTAL-CODECS"))&&(q.Gh=R.split(/\s*,\s*/).map(function(ht){return ht.split("/")[0]}),H=O.attributes.map(function(ht){return function(Zt){var Wn=Zt.name,Sn=Zt.value;return Wn=="CODECS"&&(Sn=ht.Gh.join(","),Zt=Zt.value.split(","),1<Zt.length&&(Zt=Xr("audio",Zt))&&(Sn+=","+Zt)),new Mv(Wn,Sn)}}(q)),_.push(new Iv(O.id,O.name,H,null)));for(x.push.apply(x,U(_)),z=[],Y=w(k),K=Y.next(),J={};!K.done;J={Hh:void 0},K=Y.next())ae=K.value,(ne=Ve(ae,"SUPPLEMENTAL-CODECS"))&&(J.Hh=ne.split(/\s*,\s*/).map(function(ht){return ht.split("/")[0]}),ue=ae.attributes.map(function(ht){return function(Zt){var Wn=Zt.name;return Zt=Zt.value,Wn=="CODECS"&&(Zt=ht.Hh.join(",")),new Mv(Wn,Zt)}}(J)),z.push(new Iv(ae.id,ae.name,ue,null)));k.push.apply(k,U(z))}return nF(e,x),pF(e,y),se=uF(e,k),T(ot,lF(e,x,C,y,p,e.A,se),5);case 5:return a=ot.h,u=aF(e,y),T(ot,oF(e,S,k),6);case 6:l=ot.h,ot.s(3);break;case 7:Fe=ot.h,e.i.set(e.C,Fe),Fe.stream&&(Vt=Im(Fe.stream),Fe.stream.segmentIndex.Eb(function(ht){ht.$&&(ht.$.Wc=Vt)})),g=Fe.stream.type,a.push({id:0,language:Jt(xe||"und"),disabledUntilTime:0,primary:!0,audio:g=="audio"?Fe.stream:null,video:g=="video"?Fe.stream:null,bandwidth:Fe.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new $(2,7,7001);if(lI(e,r),r.type==1&&(Vr(e)&&(cI(e,r),At=e.o,e.B.da(At)),gt=Array.from(e.i.values()),mw(e,gt),fw(e),yw(e,r.ca,g,v,p)),e.m={presentationTimeline:e.l,variants:a,textStreams:u,imageStreams:l,offlineSessionIds:[],sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:e.u},e.Z||!e.g.hls.disableCodecGuessing){ot.s(8);break}for(vt=[],Rt=w(e.m.variants),pt=Rt.next();!pt.done;pt=Rt.next())Et=pt.value,Et.audio&&Et.audio.codecs===""&&vt.push(Et.audio.createSegmentIndex()),Et.video&&Et.video.codecs===""&&vt.push(Et.video.createSegmentIndex());return T(ot,Promise.all(vt),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.m),oe(ot)}})}function eF(e,t){var n,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j;return P(function(B){if(B.g==1)return n=_m(e.g.hls.mediaPlaylistFullMimeType),t.length?(r=fI(e,t),i=r.segment,a=r.segmentIndex,u=i.N(),l=u[0],p=new ee(l),g=p.ab.split(".").pop(),(v=xw.get(g))?B.return(_m(v)):T(B,Promise.all([QC(e,i.$,0),QC(e,i,a)]),2)):B.return(n);if(y=B.h,x=y[0].mimeType,S=y[1].mimeType,k=y[0].data,C=y[1].data,E="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),I=["audio/mp4","video/mp4","video/iso.segment"],Hc(Ye(C))){var q=C,O=e.g.disableAudio,R=e.g.disableVideo,H=e.g.disableText,z=Ye(q),Y=new hn().parse(z),K=Y.od();z=Y.Kf();var J=[],ae=!1,ne=!1;if(!O)switch(K.audio){case"aac":case"aac-loas":Y.fb().length&&(J.push("mp4a.40.2"),ae=!0);break;case"mp3":Y.fb().length&&(J.push("mp4a.40.34"),ae=!0);break;case"ac3":Y.fb().length&&(J.push("ac-3"),ae=!0);break;case"ec3":Y.fb().length&&(J.push("ec-3"),ae=!0);break;case"opus":Y.fb().length&&(J.push("opus"),ae=!0)}if(!R)switch(K.video){case"avc":z.codec?J.push(z.codec):J.push("avc1.42E01E"),ne=!0;break;case"hvc":z.codec?J.push(z.codec):J.push("hvc1.1.6.L93.90"),ne=!0;break;case"av1":J.push("av01.0.01M.08"),ne=!0}if(J.length){if(O=ae&&!ne,R=new Map,ne&&!H){for(H=new Ci("video/mp2t"),H.i(q),q=w(H.j()),ne=q.next();!ne.done;ne=q.next())ne=ne.value,R.set(ne,ne);H.g()}z={type:O?"audio":"video",mimeType:"video/mp2t",codecs:J.join(", "),language:null,height:z.height,width:z.width,channelCount:null,sampleRate:null,closedCaptions:R,Nd:null,colorGamut:null,frameRate:z.frameRate}}else z=null;if(_=z)return B.return(_)}else if((E.includes(g)||I.includes(S)||x&&I.includes(x))&&(j=EN(k,C,e.g.disableText)))return B.return(j);return S?B.return(_m(S)):x?B.return(_m(x)):B.return(n)})}function QC(e,t,n){var r,i,a,u,l,p;return P(function(g){switch(g.g){case 1:return t?(r=fa,i=bh(t.N(),t.uc(),t.tc(),e.g.retryParameters),a=t instanceof Ge?1:0,T(g,Qo(e,i,r,{type:a}).promise,2)):g.return({mimeType:null,data:null});case 2:if(u=g.h,l=u.data,!t.aesKey){g.s(3);break}return T(g,Qb(l,t.aesKey,n),4);case 4:l=g.h;case 3:return t instanceof Ge?t.Kd(l,!0):t.Kd(l),(p=u.headers["content-type"])&&(p=p.split(";")[0].toLowerCase()),g.return({mimeType:p,data:l})}})}function fw(e){if(Vr(e)){if(e.Ea==Uv){for(var t=1/0,n=1/0,r=w(e.i.values()),i=r.next();!i.done;i=r.next())i=i.value,i.stream.segmentIndex&&i.stream.type!="text"&&!i.stream.isAudioMuxedInVideo&&(t=Math.min(t,i.Vb),n=Math.min(n,i.Bc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.Ce(t)}}else e.l.bb(nI(e));if(!e.l.u)for(t=w(e.i.values()),n=t.next();!n.done;n=t.next())n=n.value,!n.stream.segmentIndex||n.type!="audio"&&n.type!="video"||(n=Ba(n.stream.segmentIndex))&&n.h&&e.l.xh(n.h);e.l.ie()}function tF(e,t){var n=new ee(e.C).g;t=w(t);for(var r=t.next();!r.done;r=t.next()){var i=r.value;r=Ve(i,"NAME");var a=Ve(i,"VALUE");i=Ve(i,"QUERYPARAM"),r&&a&&(e.A.has(r)||e.A.set(r,a)),i&&(r=n.get(i)[0])&&!e.A.has(r)&&e.A.set(i,r)}}function gw(e,t,n){n=new ee(n).g;var r=new Map;t=w(t);for(var i=t.next();!i.done;i=t.next()){var a=i.value,u=Ve(a,"NAME"),l=Ve(a,"VALUE");i=Ve(a,"QUERYPARAM"),a=Ve(a,"IMPORT"),u&&l&&(r.has(u)||r.set(u,l)),i&&(u=n.get(i)[0])&&!r.has(u)&&r.set(i,u),a&&(i=e.A.get(a))&&r.set(a,i)}return r}function nF(e,t){t=w(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=Ve(r,"AUDIO");n=Ve(r,"VIDEO");var a=Ve(r,"SUBTITLES");if(r=ZC(e,r),a){var u=Xr(wt,r);e.H.set(a,u),da(r,u)}i&&(a=Xr("audio",r),a||(a=e.g.hls.defaultAudioCodec),e.H.set(i,a)),n&&(i=Xr("video",r),i||(i=e.g.hls.defaultVideoCodec),e.H.set(n,i))}}function rF(e,t){t=w(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=Ve(r,"DATA-ID");n=Ve(r,"URI");var a=Ve(r,"LANGUAGE");r=Ve(r,"VALUE"),i=new Map().set("id",i),n&&i.set("uri",Ks([e.C],n,e.A)[0]),a&&i.set("language",a),r&&i.set("value",r),n=new Ae("sessiondata",i),e.h&&e.h.onEvent(n)}}function iF(e,t){var n,r,i,a,u,l;return P(function(p){if(!e.h||!e.g)return p.return();for(r=w(t),i=r.next();!i.done;i=r.next())if(a=i.value,u=Ve(a,"PATHWAY-ID"),l=Ve(a,"SERVER-URI"),u&&l){e.j=new dd(e.h),e.j.configure(e.g),e.j.i=[e.C],e.j.setManifestType("HLS"),e.j.h=u,n=zh(e.j,l);break}return T(p,n,0)})}function aF(e,t){var n=HC(t,"SUBTITLES");t=n.map(function(u){if(e.g.disableText)return null;try{return eI(e,[u],new Map).stream}catch(l){if(e.g.hls.ignoreTextStreamFailures)return null;throw l}}),n=w(n);for(var r=n.next();!r.done;r=n.next()){var i=Kt(r.value,"GROUP-ID");if((r=e.H.get(i))&&(i=e.I.get(i))){i=w(i);for(var a=i.next();!a.done;a=i.next())a=a.value,a.stream.codecs=r,a.stream.mimeType=bw(wt,r)||Lv(wt),dl(a.stream)}}return t.filter(function(u){return u})}function dl(e){var t=new Set([Dn(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Eb(function(n){n.mimeType&&t.add(Dn(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function oF(e,t,n){var r,i;return P(function(a){return a.g==1?(r=t.map(function(u){var l,p;return P(function(g){if(g.g==1)return e.g.disableThumbnails?g.return(null):(ve(g,2),T(g,hF(e,u),4));if(g.g!=2)return l=g.h,g.return(l.stream);if(p=W(g),e.g.hls.ignoreImageStreamFailures)return g.return(null);throw p})}).concat(n.map(function(u){if(e.g.disableThumbnails)return null;try{var l=tI(e,u);return l.stream.type!=="image"?null:l.stream}catch(p){if(e.g.hls.ignoreImageStreamFailures)return null;throw p}})),T(a,Promise.all(r),2)):(i=a.h,a.return(i.filter(function(u){return u})))})}function sF(e,t,n){t=t.filter(function(l){var p=Ve(l,"URI")||"";return l=Ve(l,"TYPE"),l!="SUBTITLES"&&(p!=""||l=="AUDIO")});var r={};t=w(t);for(var i=t.next();!i.done;i=t.next()){i=i.value;var a=$C(i,!e.j);r[a]?r[a].push(i):r[a]=[i]}for(var u in r)eI(e,r[u],n,!1)}function uF(e,t){return t.map(function(n){return n=tI(e,n),n.stream.type!=="video"?null:n.stream}).filter(function(n){return n})}function lF(e,t,n,r,i,a,u){var l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne,ue,se,he,xe,tt,Fe,Vt,At,gt,vt,Rt,pt;return P(function(Et){switch(Et.g){case 1:if(l=[],p=new Set,e.g.ignoreDrmInfo||!(0<n.length)){Et.s(2);break}g=w(n),v=g.next();case 3:if(v.done){Et.s(2);break}if(y=v.value,x=Kt(y,"METHOD"),S=Ve(y,"KEYFORMAT")||"identity",k=null,x=="NONE"){Et.s(4);break}if(Nv(x)){C=Ks(i(),Kt(y,"URI"),a),E=C.sort().join(""),e.L.has(E)||(I=qn(C,e.g.retryParameters),_=Qo(e,I,6).promise,e.L.set(E,_)),Et.s(4);break}if(S=="identity")return T(Et,vI(e,y,"",i,null,a),12);if(j=e.Sb.get(S),!j){B=null,Et.s(10);break}return T(Et,j(y,"",null),11);case 11:B=Et.h;case 10:k=B,Et.s(6);break;case 12:k=Et.h;case 6:if(k){if(k.keyIds)for(q=w(k.keyIds),O=q.next();!O.done;O=q.next())R=O.value,p.add(R);l.push(k)}case 4:v=g.next(),Et.s(3);break;case 2:for(H={},z=w(t),Y=z.next();!Y.done;Y=z.next())K=Y.value,J=$C(K,!e.j),H[J]?H[J].push(K):H[J]=[K];ae=[];for(ne in H)ue=H[ne],se=ue[0],he=Ve(se,"FRAME-RATE"),xe=Number(Ve(se,"AVERAGE-BANDWIDTH"))||Number(Kt(se,"BANDWIDTH")),tt=Ve(se,"RESOLUTION"),Fe=w(tt?tt.split("x"):[null,null]),Vt=Fe.next().value,At=Fe.next().value,gt=Ve(se,"VIDEO-RANGE"),(vt=Ve(se,"REQ-VIDEO-LAYOUT"))&&vt.includes(",")&&(Rt=vt.split(",").filter(function(ot){return ot=="CH-STEREO"||ot=="CH-MONO"}),vt=Rt[0]),vt=vt||"CH-MONO",pt=cF(e,ue,r),ae.push.apply(ae,U(dF(e,pt.audio,pt.video,xe,Vt,At,he,gt,vt,l,p,u)));return Et.return(ae.filter(function(ot){return ot!=null}))}})}function cF(e,t,n){for(var r={audio:[],video:[]},i=new Map,a=[],u=!1,l=!1,p=w(t),g=p.next();!g.done;g=p.next()){var v=g.value;g=Ve(v,"AUDIO");var y=Ve(v,"VIDEO"),x=g||y;x&&(a.includes(x)||a.push(x),(v=Ve(v,"PATHWAY-ID"))&&i.set(x,v),g?u=!0:y&&(l=!0))}a.length&&n.length&&(n=n.filter(function(k){return a.includes(Kt(k,"GROUP-ID"))}),sF(e,n,i)),n=(i=a.sort().join(","))&&e.I.has(i)?e.I.get(i):[],u?r.audio.push.apply(r.audio,U(n)):l&&r.video.push.apply(r.video,U(n)),u=!1;var S=t.map(function(k){return Kt(k,"URI")});return g=r.audio.find(function(k){return k&&k.N().find(function(C){return S.includes(C)})}),l=ZC(e,t[0]),n=Xr("video",l),(p=Xr("audio",l))&&!n?(g="audio",u=0<r.audio.length):!r.audio.length&&!r.video.length&&p&&n?(g="video",l=[[n,p].join()]):r.audio.length&&g?(g="audio",u=!0):g=r.video.length&&!r.audio.length?"audio":"video",u||(e=fF(e,t,l,g),i&&(e.stream.groupId=i),r[e.stream.type]=[e]),r}function ZC(e,t){return t=Ve(t,"CODECS")||"",e.Z=0<t.length,e.Z||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),Jb(t.split(/\s*,\s*/))}function dF(e,t,n,r,i,a,u,l,p,g,v,y){for(var x=w(n),S=x.next();!S.done;S=x.next())gI(S.value.stream,i,a,u,l,p,null);for(i=e.g.disableAudio,(!t.length||i)&&(t=[null]),i=e.g.disableVideo,(!n.length||i)&&(n=[null]),i=[],t=w(t),a=t.next();!a.done;a=t.next())for(a=a.value,u=w(n),l=u.next();!l.done;l=u.next()){var k=l.value;(l=a?a.stream:null)&&(l.drmInfos=g,l.keyIds=v),(p=k?k.stream:null)&&(p.drmInfos=g,p.keyIds=v,e.g.disableIFrames||j5(p,y)),p&&!l&&(p.bandwidth=r),!p&&l&&(l.bandwidth=r),x=a?a.stream.drmInfos:null,S=k?k.stream.drmInfos:null,k=k?k.N().sort().join(","):"";var C=a?a.N().sort().join(","):"",E=[];l&&l.codecs&&E.push(l.codecs),p&&p.codecs&&E.push(p.codecs),k=[k,C,E.sort()].join("-"),l&&p&&!J3(x,S)||e.Na.has(k)||(l={id:e.F++,language:l?l.language:"und",disabledUntilTime:0,primary:!!l&&l.primary||!!p&&p.primary,audio:l,video:p,bandwidth:r,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},i.push(l),e.Na.add(k))}return i}function pF(e,t){t=HC(t,"CLOSED-CAPTIONS"),e.O=t.length==0,t=w(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=Ve(r,"LANGUAGE");n=Jt(i||"und"),i||(i=Ve(r,"NAME"))&&(n=i),i=Kt(r,"GROUP-ID"),r=Kt(r,"INSTREAM-ID").replace("SERVICE","svc"),e.G.get(i)||e.G.set(i,new Map),e.G.get(i).set(r,n)}}function eI(e,t,n,r){r=r===void 0?!0:r;for(var i=[],a=[],u=new Map,l=w(t),p=l.next();!p.done;p=l.next()){var g=p.value;p=r?Kt(g,"URI"):Ve(g,"URI")||"shaka://hls-muxed",g=Kt(g,"GROUP-ID"),i.push(p),a.push(g),u.set(g,p)}if(r=a.sort().join(","),p=t[0],t="",l=Kt(p,"TYPE").toLowerCase(),l=="subtitles"&&(l=wt),l==wt)t=Ve(p,"CODECS")||"";else for(a=w(a),g=a.next();!g.done;g=a.next())if(g=g.value,e.H.has(g)){t=e.H.get(g);break}if(a=i.sort().join(","),e.i.has(a))return e.i.get(a);if(g=e.F++,e.j){u=w(u);for(var v=u.next();!v.done;v=u.next()){var y=w(v.value);v=y.next().value,y=y.next().value,(v=n.get(v))&&pd(e.j,g,v,y)}}n=Ve(p,"LANGUAGE"),u=Ve(p,"NAME"),v=Ve(p,"DEFAULT")=="YES",l=="audio"?y=(y=Ve(p,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;var x;l=="audio"&&(x=Ve(p,"CHANNELS"))?(x=x.split("/"),x=x.length!=2?!1:x[1]==="JOC"||x[1].includes("ATMOS")):x=!1;var S=Ve(p,"CHARACTERISTICS"),k=Ve(p,"FORCED")=="YES";return l=="audio"?p=(p=Ve(p,"SAMPLE-RATE"))?parseInt(p,10):null:p=null,i=Pv(e,g,i,t,l,n,v,u,y,null,S,k,p,x),i.stream&&(i.stream.groupId=r),e.I.has(r)?e.I.get(r).push(i):e.I.set(r,[i]),e.i.set(a,i),i}function hF(e,t){var n,r,i,a,u,l,p,g,v,y;return P(function(x){return x.g==1?(n=Kt(t,"URI"),r=Ve(t,"CODECS","jpeg")||"",e.i.has(n)?x.return(e.i.get(n)):(i=Ve(t,"LANGUAGE"),a=Ve(t,"NAME"),u=Ve(t,"CHARACTERISTICS"),l=Pv(e,e.F++,[n],r,"image",i,!1,a,null,null,u,!1,null,!1),(p=Ve(t,"RESOLUTION"))?T(x,l.stream.createSegmentIndex(),3):x.s(2))):(x.g!=2&&(g=Ba(l.stream.segmentIndex),v=g.tilesLayout)&&(l.stream.width=Number(p.split("x")[0])*Number(v.split("x")[0]),l.stream.height=Number(p.split("x")[1])*Number(v.split("x")[1])),(y=Ve(t,"BANDWIDTH"))&&(l.stream.bandwidth=Number(y)),e.i.set(n,l),x.return(l))})}function tI(e,t){var n="video",r=Kt(t,"URI"),i=Ve(t,"CODECS")||"";if(i=="mjpg"&&(n="image"),e.i.has(r))return e.i.get(r);var a=Ve(t,"LANGUAGE"),u=Ve(t,"NAME"),l=Ve(t,"CHARACTERISTICS");return n=Pv(e,e.F++,[r],i,n,a,!1,u,null,null,l,!1,null,!1),i=Ve(t,"RESOLUTION"),a=w(i?i.split("x"):[null,null]),i=a.next().value,a=a.next().value,n.stream.width=Number(i)||void 0,n.stream.height=Number(a)||void 0,(t=Ve(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(r,n),n}function fF(e,t,n,r){for(var i=e.F++,a=[],u=w(t),l=u.next();!l.done;l=u.next()){var p=l.value;l=Kt(p,"URI"),p=Ve(p,"PATHWAY-ID"),e.j&&p&&pd(e.j,i,p,l),a.push(l)}if(u=a.sort().join(",")+n.sort().join(","),e.i.has(u))return e.i.get(u);l=a.join(",");e:{if(t=Ve(t[0],"CLOSED-CAPTIONS"),r=="video"){if(e.g.disableText){e.O=!1,t=null;break e}if(t){if(t!="NONE"){t=e.G.get(t);break e}e.O=!1}else if(!t&&e.G.size)for(t=w(e.G.keys()).next();!t.done;){t=e.G.get(t.value);break e}}t=null}return n=kc(r,n),r=Pv(e,i,a,n,r,null,!1,l,null,t,null,!1,null,!1),e.i.set(u,r),r}function Pv(e,t,n,r,i,a,u,l,p,g,v,y,x,S){function k(B){var q,O,R,H,z,Y,K,J,ae,ne,ue,se,he,xe,tt,Fe,Vt,At,gt,vt,Rt,pt,Et;return P(function(ot){switch(ot.g){case 1:return q=zn,ve(ot,2),T(ot,B.promise,4);case 4:if(O=ot.h,B.aborted)return ot.return();if(R=O.uri,R!=O.originalUri&&(H=I.N(),H.includes(R)||I.ve.push(R)),z=dw(e.Ga,O.data),z.type!=1)throw new $(2,4,4017);return Y=Yi(z.ca,"EXT-X-DEFINE"),K=gw(e,Y,R),J=!1,(!e.Z&&e.g.hls.disableCodecGuessing||e.O&&i==q.la&&!e.g.hls.disableClosedCaptionsDetection)&&0<z.segments.length&&(e.O=!1,J=!0),ae=!e.Z&&e.g.hls.disableCodecGuessing,ne=Vr(e),T(ot,iI(e,0,K,z,C,r,i,a,u,l,p,g,v,y,x,S,void 0,J,ae),5);case 5:if(ue=ot.h,B.aborted)return ot.return();if(se=ue.stream,lI(e,z),Vr(e)&&!ne&&cI(e,z),I.Bc=ue.Bc,I.Vb=ue.Vb,I.Ud=ue.Ud,I.Td=ue.Td,I.rd=ue.rd,I.je=ue.je,I.Ab=ue.Ab,I.Bb=ue.Bb,I.Rf=!0,E.segmentIndex=se.segmentIndex,E.encrypted=se.encrypted,E.drmInfos=se.drmInfos,E.keyIds=se.keyIds,E.mimeType=se.mimeType,E.bandwidth=E.bandwidth||se.bandwidth,E.codecs=E.codecs||se.codecs,E.closedCaptions=E.closedCaptions||se.closedCaptions,E.width=E.width||se.width,E.height=E.height||se.height,E.hdr=E.hdr||se.hdr,E.colorGamut=E.colorGamut||se.colorGamut,E.frameRate=E.frameRate||se.frameRate,E.language=="und"&&se.language!="und"&&(E.language=se.language),E.language=E.language||se.language,E.channelsCount=E.channelsCount||se.channelsCount,E.audioSamplingRate=E.audioSamplingRate||se.audioSamplingRate,dl(E),E.drmInfos.length&&e.h.newDrmInfo(E),he=!1,(!g&&E.closedCaptions||g&&E.closedCaptions&&g.size!=E.closedCaptions.size)&&(he=!0),e.m&&he&&e.h.makeTextStreamsForClosedCaptions(e.m),i==q.la||i==q.V)for(xe=w(e.i.values()),tt=xe.next();!tt.done;tt=xe.next())Fe=tt.value,Fe.Rf||Fe.type!=i||(Fe.stream.mimeType=se.mimeType,dl(Fe.stream));i==q.za&&(Vt=Ba(se.segmentIndex))&&Vt.$&&(E.mimeType="application/mp4",dl(E)),At=Im(E),E.segmentIndex.Eb(function(ht){ht.$&&(ht.$.Wc=At)}),gF(e)&&(e.Ub?mw(e,[I]):(e.Ub=!0,gt=Array.from(e.i.values()),vt=gt.filter(function(ht){return ht.stream.segmentIndex}),mw(e,vt),fw(e),Rt=e.o,0<Rt&&e.B.da(Rt))),yw(e,z.ca,E.type,K,C),e.m&&(e.m.startTime=e.u),V(ot,0);break;case 2:if(pt=W(ot),E.closeSegmentIndex(),pt.code===7001)return ot.return();if(Et=e.h.disableStream(E),!Et)throw pt;oe(ot)}})}function C(){return e.j&&1<n.length?Hh(e.j,t):I.ve.concat(qC([e.C],n,e.A))}var E=oI(e,r,i,a,u,l,p,g,v,y,x,S);n.includes("shaka://hls-muxed")&&(E.isAudioMuxedInVideo=!0,E.mimeType="video/mp2t",dl(E));var I={stream:E,type:i,ve:[],Bc:0,Vb:0,je:new Map,Ud:!1,Td:!1,rd:!1,qf:-1,Ab:-1,Bb:-1,Rf:!1,N:C},_=null,j;return E.createSegmentIndex=function(){return _||(E.isAudioMuxedInVideo?(E.segmentIndex=new jt([]),Promise.resolve()):(j=ww(e,I.N(),!0),_=new Promise(function(B){B(k(j))})))},E.closeSegmentIndex=function(){_&&!E.segmentIndex&&j.abort(),E.segmentIndex&&(E.segmentIndex.release(),E.segmentIndex=null),_=null},I}function nI(e){var t=1/0;e=w(e.i.values());for(var n=e.next();!n.done;n=e.next())n=n.value,n.stream.segmentIndex&&n.stream.type!="text"&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Vb));return t}function rI(e,t){var n=[];t=w(t);for(var r=t.next();!r.done;r=t.next())r=r.value,r.segmentIndex&&r.segmentIndex.Eb(function(i){n.push(i)});e.l.Ed(n)}function mw(e,t){if(!Vr(e))for(var n=nI(e),r=w(t),i=r.next();!i.done;i=r.next())i.value.stream.segmentIndex.Oc(0,n);rI(e,t.map(function(a){return a.stream})),r=Array.from(e.i.values()).filter(function(a){return a.stream.segmentIndex}),n=r.some(function(a){return a.stream.type=="audio"}),i=r.some(function(a){return a.stream.type=="video"}),r=Vr(e)&&!e.Ma,n=!Vr(e)&&e.Ma&&!(n&&i),e.g.hls.ignoreManifestProgramDateTime||r||n?YC(e,t,r):(QU(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&YC(e,t))}function Xh(e,t){return e.g.hls.ignoreManifestProgramDateTime?!0:e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function gF(e){if(!e.m)return!1;var t=[],n=[];e=w(e.m.variants);for(var r=e.next();!r.done;r=e.next())r=r.value,r.video&&t.push(r.video),r.audio&&n.push(r.audio);return!(0<t.length&&!t.some(function(i){return i.segmentIndex})||0<n.length&&!n.some(function(i){return i.segmentIndex}))}function iI(e,t,n,r,i,a,u,l,p,g,v,y,x,S,k,C,E,I,_){I=I===void 0?!0:I,_=_===void 0?!0:_;var j,B,q,O,R,H,z,Y,K,J,ae,ne,ue,se,he,xe,tt,Fe,Vt,At,gt,vt,Rt,pt,Et,ot,ht,Zt,Wn;return P(function(Sn){switch(Sn.g){case 1:if(j=r.segments||[],B=j.every(function(Tn){return!!ar(Tn.ca,"EXT-X-GAP")}),!j.length||B)throw new $(2,4,4053);if(mF(e,r),Vr(e)&&vw(e,r),q=Vr(e)?e.M.get(u):new Map,O=hI(e,r,q,n,i,u),R=O.segments,H=O.bandwidth,ae=J=K=Y=z=null,!(0<R.length&&I)){Sn.s(2);break}return T(Sn,eF(e,R),3);case 3:ne=Sn.h,u=ne.type,l=ne.language,v=ne.channelCount,k=ne.sampleRate,e.g.disableText||(y=ne.closedCaptions),Y=ne.height,z=ne.width,K=ne.Nd,J=ne.colorGamut,ae=ne.frameRate,_&&(E=ne.mimeType,a=ne.codecs);case 2:if(E){Sn.s(4);break}return T(Sn,bF(e,u,a,R),5);case 5:E=Sn.h,u!=wt||a||E!="application/mp4"||!R[0]||R[0].$||(E="text/vtt");case 4:return T(Sn,sI(e,r,E,i,n),6);case 6:if(ue=Sn.h,se=ue.drmInfos,he=ue.keyIds,xe=ue.encrypted,tt=ue.Bg,xe&&!se.length&&!tt)throw new $(2,4,4026);return Fe=oI(e,a,u,l,p,g,v,y,x,S,k,C),Fe.encrypted=xe&&!tt,Fe.drmInfos=se,Fe.keyIds=he,Fe.mimeType=E,H&&(Fe.bandwidth=H),dl(Fe),u=="video"&&(z||Y||K||J)&&gI(Fe,z,Y,ae,K,null,J),Vr(e)&&vw(e,r),Vt=R[0].startTime,At=R[R.length-1],gt=At.endTime,vt=new jt(R),Fe.segmentIndex=vt,pt=(Rt=ar(r.ca,"EXT-X-SERVER-CONTROL"))?fd(Rt,"CAN-SKIP-UNTIL")!=null:!1,Et=Rt?fd(Rt,"CAN-BLOCK-RELOAD")!=null:!1,ot=gd(r.ca,"EXT-X-MEDIA-SEQUENCE",0),ht=aI(ot,R),Zt=ht.Ab,Wn=ht.Bb,Sn.return({stream:Fe,type:u,ve:[],N:i,Bc:Vt,Vb:gt,Ud:pt,Td:Et,rd:!1,qf:-1,Ab:Zt,Bb:Wn,je:q,Rf:!1})}})}function aI(e,t){e=e+t.length-1;var n=-1;if(!t.length)return e++,{Ab:e,Bb:n};t=t[t.length-1];var r=t.g;return t.g.length?(n=r.length-1,r[r.length-1].isPreload()||(e++,n=0),{Ab:e,Bb:n}):(e++,t.m&&(n=0),{Ab:e,Bb:n})}function oI(e,t,n,r,i,a,u,l,p,g,v,y){var x=bw(n,t)||Lv(n),S=[];if(p){p=w(p.split(","));for(var k=p.next();!k.done;k=p.next())S.push(k.value)}return p=void 0,k=null,n==wt?p=S.includes("public.accessibility.transcribes-spoken-dialog")&&S.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":S.includes("public.accessibility.describes-video")&&(k="visually impaired"),S.length||p!=="subtitle"||S.push("subtitle"),e={id:e.F++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:x,codecs:t,kind:n==wt?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Jt(r||"und"),originalLanguage:r,label:a,type:n,primary:i,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:S,forced:g,channelsCount:u,audioSamplingRate:v,spatialAudio:y,closedCaptions:l,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:k,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},dl(e),e}function sI(e,t,n,r,i){var a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne,ue,se,he;return P(function(xe){switch(xe.g){case 1:if(a=new Map,!e.g.ignoreDrmInfo&&t.segments){for(u=w(t.segments),l=u.next();!l.done;l=u.next())if(p=l.value,g=Yi(p.ca,"EXT-X-KEY"),v=null,g.length)for(v=dI(e,t,p.ca,r,i),y=w(g),x=y.next();!x.done;x=y.next())S=x.value,a.set(S,v)}C=k=!1,E=[],I=new Set,_=w(a),j=_.next();case 2:if(j.done){xe.s(4);break}if(B=j.value,q=w(B),O=q.next().value,R=q.next().value,H=O,z=R,Y=Kt(H,"METHOD"),Y=="NONE"){xe.s(3);break}if(k=!0,K=Ve(H,"KEYFORMAT")||"identity",J=null,Nv(Y)){C=!0,xe.s(3);break}if(K=="identity")return T(xe,vI(e,H,n,r,z,i),11);if(ae=e.Sb.get(K),!ae){ne=null,xe.s(9);break}return T(xe,ae(H,n,z),10);case 10:ne=xe.h;case 9:J=ne,xe.s(6);break;case 11:J=xe.h;case 6:if(J){if(J.keyIds)for(ue=w(J.keyIds),se=ue.next();!se.done;se=ue.next())he=se.value,I.add(he);E.push(J)}case 3:j=_.next(),xe.s(2);break;case 4:return xe.return({drmInfos:E,keyIds:I,encrypted:k,Bg:C})}})}function uI(e,t,n,r,i){if(!d.crypto||!d.crypto.subtle)throw Be("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new $(2,4,4042);var a=0,u=Ve(t,"IV","");if(u){var l=ju(u.substr(2));if(l.byteLength!=16)throw new $(2,4,4048)}else a=gd(n.ca,"EXT-X-MEDIA-SEQUENCE",0);var p=Ks(r(),Kt(t,"URI"),i),g=p.sort().join("");if(n=t.toString()+"-"+a+"-"+g,!e.ka.has(n)){var v={bitsKey:128,blockCipherMode:"CBC",iv:l,firstMediaSequenceNumber:a};switch(Kt(t,"METHOD")){case"AES-256":v.bitsKey=256;break;case"AES-256-CTR":v.bitsKey=256,v.blockCipherMode="CTR"}v.fetchKey=function(){var y,x,S,k;return P(function(C){if(C.g==1)return e.L.has(g)||(y=qn(p,e.g.retryParameters),x=Qo(e,y,6).promise,e.L.set(g,x)),T(C,e.L.get(g),2);if(C.g!=3){if(S=C.h,!S.data||S.data.byteLength!=v.bitsKey/8)throw new $(2,4,4049);return k={name:v.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:v.bitsKey},T(C,d.crypto.subtle.importKey("raw",S.data,k,!0,["decrypt"]),3)}v.cryptoKey=C.h,v.fetchKey=void 0,oe(C)})},e.ka.set(n,v)}return e.ka.get(n)}function lI(e,t){e.u==null&&(t=ar(t.ca,"EXT-X-START"))&&(e.u=Number(Kt(t,"TIME-OFFSET")))}function mF(e,t){var n=ar(t.ca,"EXT-X-PLAYLIST-TYPE");t=ar(t.ca,"EXT-X-ENDLIST"),t=n&&n.value=="VOD"||t,n=n&&n.value=="EVENT"&&!t,n=!t&&!n,t?Rv(e,Ov):n?Rv(e,Uv):Rv(e,wI)}function vw(e,t){var n=1/0,r=t.segments;if(r.length)for(var i=r.length-1;0<=i;){var a=ar(r[i].ca,"EXTINF");if(a){n=Number(a.value.split(",")[0]);break}i--}if(r=ar(t.ca,"EXT-X-TARGETDURATION"),!r)throw new $(2,4,4024,"EXT-X-TARGETDURATION");r=Number(r.value),(i=ar(t.ca,"EXT-X-PART-INF"))&&(e.P=Number(Kt(i,"PART-TARGET"))),t=ar(t.ca,"EXT-X-SERVER-CONTROL"),e.fa&&e.P?(e.o=e.Tb?5*e.P<=n?Math.min(e.P,e.o):Math.min(n,e.o):Math.min(e.P,e.o),e.Fa=t?Number(Kt(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),n=t?fd(t,"HOLD-BACK"):null,e.Aa=n?Number(n.value):0),e.La=Math.max(r,e.La)}function cI(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Fa)n=e.Fa;else if(e.Aa)n=e.Aa;else{var r=t.segments.length,i=e.g.hls.liveSegmentsDelay;for(i>r-2&&(i=Math.max(1,r-2)),i=r-i;i<r;i++){var a=ar(t.segments[i].ca,"EXTINF");n=a?n+Math.ceil(Number(a.value.split(",")[0])):n+e.La}}e.u&&0>e.u&&(n=Math.min(-e.u,n),e.u+=n),e.l.yh(0),e.l.jg(n),e.l.Gc(!1)}function dI(e,t,n,r,i){var a=ar(n,"EXT-X-MAP");if(!a)return null;var u=Kt(a,"URI"),l=Ks(r(),u,i);if(u=[l.toString(),Ve(a,"BYTERANGE","")].join("-"),!e.sa.has(u)){var p=void 0,g=null,v=!1;n=w(n);for(var y=n.next();!y.done;y=n.next())y=y.value,y.name=="EXT-X-KEY"?(v=Kt(y,"METHOD"),Nv(v)&&y.id<a.id?(v=!1,p=uI(e,y,t,r,i)):v=v!="NONE"):y.name=="EXT-X-BYTERANGE"&&y.id<a.id&&(g=y);t=vF(l,a,g,p,v),e.sa.set(u,t)}return e.sa.get(u)}function vF(e,t,n,r,i){var a=0,u=null;return t=Ve(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(a=t.split("@"),u=Number(a[0]),a=Number(a[1]),u=a+u-1,r&&(n=u+1-a,n%16&&(u+=16-n%16))),new Yr(function(){return e},a,u,null,null,null,r,i)}function yF(e,t,n,r,i,a,u,l,p){function g(xe){xe=new ee(xe).ab.split(".").pop();var tt=Sw.get(u).get(xe);return tt||(tt=xw.get(xe)),tt}var v=r.ca,y=ar(v,"EXTINF"),x=0,S=0,k=null;r.Jb.length&&(e.m.isLowLatency=!0);var C=null;if(!e.g.hls.ignoreManifestProgramDateTime){var E=ar(v,"EXT-X-PROGRAM-DATE-TIME");E&&E.value&&(C=_s(E.value),e.Ma=!0)}var I=Vo;if(ar(v,"EXT-X-GAP")&&(e.m.gapCount++,I=2),!y){if(r.Jb.length==0)throw new $(2,4,4024,"EXTINF");if(!e.fa)return null}var _=[];E=!1;var j=null,B=!1,q=!1;if(e.fa&&r.Jb.length){x=t&&d.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var O=C,R={},H=0;H<r.Jb.length;R={Le:void 0,re:void 0},H++){var z=r.Jb[H],Y=H==0?n:_[_.length-1],K=H==0?i:Y.endTime,J=Number(Ve(z,"DURATION"))||e.P;if(J){var ae=K+J,ne=0,ue=null;if(z.name=="EXT-X-PRELOAD-HINT"?(ne=(ne=Ve(z,"BYTERANGE-START"))?Number(ne):0,(Y=Ve(z,"BYTERANGE-LENGTH"))?ue=ne+Number(Y)-1:ne&&(ue=Number.MAX_SAFE_INTEGER)):(ne=Ve(z,"BYTERANGE"),ue=w(pI(Y,ne)),ne=ue.next().value,ue=ue.next().value),R.re=Ve(z,"URI"),R.re){Y=Vo,Ve(z,"GAP")=="YES"&&(e.m.gapCount++,Y=2,B=!0),R.Le=null;var se=function(xe){return function(){return xe.Le==null&&(xe.Le=Ks(l(),xe.re,a)),xe.Le}}(R);x&&0<=ne&&ue!=null&&(j=se,E=!0),K=new Ge(K,ae,se,ne,ue,t,0,0,1/0,[],"",null,O,Y,p),z.name=="EXT-X-PRELOAD-HINT"&&(K.Sf(),q=!0),Ve(z,"INDEPENDENT")!="YES"&&0<H&&K.Vc(),(R=g(R.re))&&(K.mimeType=R,bI.has(R)&&(K.$=null)),_.push(K),O&&(O+=J)}}}}if(y){if(y=Number(y.value.split(",")[0]),y==0)return null;x=i+y}else if(_.length)x=_[_.length-1].endTime;else return null;E&&(B||_[0].Sa!=0?(E=!1,j=null):_=[]),(y=ar(v,"EXT-X-BYTERANGE"))?(k=w(pI(n,y.value)),S=k.next().value,k=k.next().value):_.length&&(S=_[0].Sa,k=_[_.length-1].wa),n="",y=null,u=="image"&&(n="1x1",v=ar(v,"EXT-X-TILES"))&&(n=Kt(v,"LAYOUT"),(v=Ve(v,"DURATION"))&&(y=Number(v)));var he=null;return t=new Ge(i,x,function(){return j?j():(he==null&&(he=Ks(l(),r.g,a)),he||[])},S,k,t,0,0,1/0,_,n,y,C,I,p,0<_.length&&!!r.g),(i=g(r.g))&&(t.mimeType=i,bI.has(i)&&(t.$=null)),E&&(e.Tb=!0,t.dh(),q&&t.Sf()),t}function pI(e,t){var n=0,r=null;return t&&(n=t.split("@"),t=Number(n[0]),n=n[1]?Number(n[1]):e.wa+1,r=n+t-1),[n,r]}function yw(e,t,n,r,i){if(n=="video"||n=="audio"){var a=e.l.m;if(a&&!Xh(e,n))for(t=Yi(t,"EXT-X-DATERANGE"),t=t.filter(function(K){return fd(K,"START-DATE")!=null}).sort(function(K,J){return K=Kt(K,"START-DATE"),J=Kt(J,"START-DATE"),K<J?-1:K>J?1:0}),n=0;n<t.length;n++){var u=t[n];try{var l=Kt(u,"ID");if(!e.ya.has(l)){var p=Kt(u,"START-DATE"),g=_s(p);if(!isNaN(g)){var v=Math.max(0,g-a),y=null,x=Ve(u,"END-DATE");if(x){var S=_s(x);if(!isNaN(S)&&(y=S-a,0>y))continue}if(y==null){var k=Ve(u,"DURATION")||Ve(u,"PLANNED-DURATION");if(k){var C=parseFloat(k);if(isNaN(C)||(y=v+C),0>g-a+C)continue}}var E=Ve(u,"CLASS")||"com.apple.quicktime.HLS",I=Ve(u,"END-ON-NEXT")=="YES";if(y==null&&I){for(var _=n+1;_<t.length;_++){var j=Ve(t[_],"CLASS")||"com.apple.quicktime.HLS";if(E==j){var B=Kt(t[_],"START-DATE"),q=_s(B);if(!isNaN(q)&&q&&q>g){y=Math.max(0,q-a);break}}}if(y==null)continue}_=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var O=[],R=w(u.attributes),H=R.next();!H.done;H=R.next()){var z=H.value;if(!_.includes(z.name)){var Y=GC(z.value,r);(z.name=="X-ASSET-URI"||z.name=="X-ASSET-LIST")&&(Y=Ks(i(),z.value,r)[0]),O.push({key:z.name,description:"",data:Y,mimeType:null,pictureType:null})}}1<O.length&&e.h.onMetadata(E,v,y,O),e.ya.add(l)}}}catch{}}}}function hI(e,t,n,r,i,a){var u=t.segments,l=void 0,p=gd(t.ca,"EXT-X-DISCONTINUITY-SEQUENCE",-1),g=gd(t.ca,"EXT-X-MEDIA-SEQUENCE",0),v=ar(t.ca,"EXT-X-SKIP"),y=v?Number(Ve(v,"SKIPPED-SEGMENTS")):0,x=g+y,S=0;Vr(e)&&n.has(x)&&(S=n.get(x)),S===0&&e.Ea==Uv&&0<n.size&&!n.has(x)&&e.l.i!=null&&(S=e.l.pb());var k=[],C=null;v=[];for(var E=0;E<u.length;E++){var I=u[E],_=E==0?S:C.endTime;x=g+y+E,ar(I.ca,"EXT-X-DISCONTINUITY")&&(p++,C&&C.$&&(C.$.g=_));for(var j=w(I.ca),B=j.next();!B.done;B=j.next())B=B.value,B.name=="EXT-X-KEY"&&(Nv(Kt(B,"METHOD"))?l=uI(e,B,t,i,r):l=void 0);n.set(x,_),j=dI(e,t,I.ca,i,r),(_=yF(e,j,C,I,_,r,a,i,l))&&((C=gd(I.ca,"EXT-X-BITRATE"))?v.push({bitrate:C,duration:_.endTime-_.startTime}):v.length&&(C=v.pop(),C.duration+=_.endTime-_.startTime,v.push(C)),C=_,_.i=p,Xh(e,a)&&e.K!=null&&x<e.K||k.push(_))}if(t=void 0,v.length&&(t=v.reduce(function(q,O){return q+O.duration},0),t=Math.round(v.reduce(function(q,O){return q+O.bitrate*O.duration},0)/t*1e3)),v=k.some(function(q){return q.h!=null})){for(n={},r=0;r<k.length;n={Xd:void 0,Wd:void 0,Qd:void 0,Dc:void 0,Pd:void 0},r++)if(n.Dc=k[r],n.Dc.h==null)for(n.Wd=0,n.Xd=r,i=function(q){return function(){var O=k[q.Xd];if(O){if(O.h!=null)return O.h+q.Wd;q.Wd-=O.endTime-O.startTime,q.Xd+=1}return null}}(n),n.Pd=0,n.Qd=r,u=function(q){return function(){var O=k[q.Qd];if(O){if(O!=q.Dc&&(q.Pd+=O.endTime-O.startTime),O.h!=null)return O.h+q.Pd;--q.Qd}return null}}(n);n.Dc.h==null;)n.Dc.h=u(),n.Dc.h==null&&(n.Dc.h=i())}if(v)for(n=w(k),r=n.next();!r.done;r=n.next())for(i=r.value,r=i.h,i=w(i.g),u=i.next();!u.done;u=i.next())u=u.value,u.h=r,r+=u.endTime-u.startTime;if(n=e.ea,v&&n!=1/0&&!Xh(e,a))for(e=w(k),a=e.next();!a.done;a=e.next())a.value.qg(n);return{segments:k,bandwidth:t}}function bw(e,t){if(e==wt){if(t=="vtt"||t=="wvtt")return"text/vtt";if(t&&t!=="")return"application/mp4"}return e!="image"||t&&t!="jpeg"?e=="audio"&&t=="mp4a.40.34"?"audio/mpeg":t=="mjpg"?"application/mp4":null:"image/jpeg"}function Lv(e){return e==wt?"text/vtt":Sw.get(e).get("mp4")}function fI(e,t){e=Vr(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];n.dc()==2&&e+1<t.length;)e++,n=t[e];return{segment:n,segmentIndex:e}}function bF(e,t,n,r){var i,a,u,l,p,g,v,y,x,S,k,C,E;return P(function(I){switch(I.g){case 1:return i=fa,a=fI(e,r),u=a.segment,u.status==2?I.return(Lv(t)):(l=u.N(),p=new ee(l[0]),g=p.ab.split(".").pop(),v=Sw.get(t),(y=v.get(g))||(y=xw.get(g))||(y=bw(t,n))?I.return(y):(S=1,k=qn(l,e.g.retryParameters),ve(I,2),k.method="HEAD",T(I,Qo(e,k,i,{type:S}).promise,4)));case 4:C=I.h,x=C.headers["content-type"],V(I,3);break;case 2:if(E=W(I),!E||E.code!=1002&&E.code!=1001){I.s(3);break}return k.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(k.headers.Range="bytes=0-0"),T(I,Qo(e,k,i,{type:S}).promise,6);case 6:C=I.h,x=C.headers["content-type"];case 3:if(!x){I.s(7);break}if(y=x.toLowerCase().split(";")[0],y!="application/octet-stream"){I.s(8);break}if(C.data.byteLength){I.s(9);break}return k.method="GET",T(I,Qo(e,k,i,{type:S}).promise,10);case 10:C=I.h;case 9:Hc(Ye(C.data))&&(y="video/mp2t");case 8:if(y!="application/octet-stream")return I.return(y);case 7:return I.return(Lv(t))}})}function gI(e,t,n,r,i,a,u){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(r)||void 0,e.hdr=i||void 0,e.videoLayout=a||void 0,e.colorGamut=u||void 0)}function ww(e,t,n){return Qo(e,qn(t,e.g.retryParameters),0,{type:n?2:3})}function mI(e){var t,n,r,i,a,u;return P(function(l){switch(l.g){case 1:return e.h?(ve(l,2),t=Date.now(),T(l,e.update(),4)):l.return();case 4:n=Date.now(),Vr(e)&&(r=(n-t)/1e3,e.Pb.sample(1,r),i=0<e.g.updatePeriod?e.g.updatePeriod:e.o,a=Math.max(0,i-$e(e.Pb)),e.B.da(a)),V(l,3);break;case 2:if(u=W(l),!e.h)return l.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(u),l.return();u.severity=1,e.h.onError(u),e.B.da(.1);case 3:if(!e.h)return l.return();e.h.onManifestUpdated(),oe(l)}})}function Vr(e){return e.Ea!=Ov}function Rv(e,t){e.Ea=t,e.l&&e.l.Gc(!Vr(e)),Vr(e)||e.B.stop()}function Qo(e,t,n,r){if(!e.Y)throw new $(2,7,7001);return r||(r={}),r.isPreload=e.Qb(),t=e.h.networkingEngine.request(n,t,r),Ju(e.Y,t),t}function Nv(e){return e=="AES-128"||e=="AES-256"||e=="AES-256-CTR"}function wF(e,t,n,r){var i,a,u,l,p,g;return P(function(v){if(v.g==1){if(n=="video/mp2t")throw new $(2,4,4040);if(d.shakaMediaKeysPolyfill==="apple")throw new $(2,4,4041);if(i=Kt(t,"METHOD"),a=["SAMPLE-AES","SAMPLE-AES-CTR"],!a.includes(i))return v.return(null);u="cenc",i=="SAMPLE-AES"&&(u="cbcs"),l=Kt(t,"URI"),p=Ms("com.apple.fps",u,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],l);var y=new ee(l).nb.replace(/-/g,"").toLowerCase();return(g=y.length===32&&/^[0-9a-f]+$/.test(y)?y:null)||!r?v.s(2):T(v,yI(e,r),3)}return v.g!=2&&(g=v.h),g&&p.keyIds.add(g),v.return(p)})}function vI(e,t,n,r,i,a){var u,l,p,g,v,y,x,S,k,C,E,I;return P(function(_){switch(_.g){case 1:if(n=="video/mp2t")throw new $(2,4,4040);if(d.shakaMediaKeysPolyfill==="apple")throw new $(2,4,4041);if(u=Kt(t,"METHOD"),l=["SAMPLE-AES","SAMPLE-AES-CTR"],!l.includes(u))return _.return(null);if(p=Ks(r(),Kt(t,"URI"),a),p[0].startsWith("data:text/plain;base64,")){g=Po(Gi(p[0].split("data:text/plain;base64,").pop())),_.s(2);break}return v=p.sort().join(""),e.oa.has(v)||(y=qn(p,e.g.retryParameters),x=Qo(e,y,6).promise,e.oa.set(v,x)),T(_,e.oa.get(v),3);case 3:S=_.h,g=Po(S.data);case 2:if(k="00000000000000000000000000000000",!i){_.s(4);break}return T(_,yI(e,i),5);case 5:(C=_.h)&&(k=C);case 4:return E=new Map,E.set(k,g),I="cenc",u=="SAMPLE-AES"&&(I="cbcs"),_.return(r5(E,I))}})}function yI(e,t){var n,r,i,a;return P(function(u){return u.g==1?(n=null,e.pa.has(t)?(n=e.pa.get(t),u.s(2)):(r=bh(t.N(),t.uc(),t.tc(),e.g.retryParameters),i=fa,T(u,Qo(e,r,i,{type:0}).promise,3))):(u.g!=2&&(a=u.h,t.Kd(a.data),n=IN(a.data),e.pa.set(t,n)),u.return(n))})}Ee("shaka.hls.HlsParser",Dv);var xw=new Map().set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),xF=new Map().set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),SF=new Map().set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),kF=new Map().set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),TF=new Map().set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),Sw=new Map().set("audio",xF).set("video",SF).set("text",kF).set("image",TF),bI=new Set(["video/mp2t"].concat(U(Uo))),Ov="VOD",wI="EVENT",Uv="LIVE",AF={Ph:Ov,Zj:wI,gk:Uv};Zu("application/x-mpegurl",function(){return new Dv}),Zu("application/vnd.apple.mpegurl",function(){return new Dv});function Fv(e){return vv(e)}var EF=new Map().set("com.microsoft.playready",Fv).set("com.microsoft.playready.recommendation",Fv).set("com.microsoft.playready.software",Fv).set("com.microsoft.playready.hardware",Fv);function kw(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.C=new me(5),this.o=new Tt(function(){CF(e)}),this.B=new Oc,this.m=new Map,this.A=function(){return!1}}f=kw.prototype,f.configure=function(e,t){this.g=e,t&&(this.A=t)},f.start=function(e,t){var n=this;return P(function(r){if(r.g==1)return n.l=[e],n.h=t,T(r,Tw(n),2);if(!n.h)throw new $(2,7,7001);return r.return(n.j)})};function CF(e){var t;P(function(n){switch(n.g){case 1:return ve(n,2),T(n,Tw(e),4);case 4:V(n,3);break;case 2:t=W(n),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();oe(n)}})}f.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,this.o!=null&&(this.o.stop(),this.o=null),this.m.clear(),this.B.destroy()},f.update=function(){var e=this,t;return P(function(n){if(n.g==1)return ve(n,2),T(n,Tw(e),4);if(n.g!=2)return V(n,0);if(t=W(n),!e.h||!t)return n.return();e.h.onError(t),oe(n)})},f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(){},f.banLocation=function(){},f.setMediaElement=function(){};function Tw(e){var t,n,r,i,a,u,l;return P(function(p){if(p.g==1)return t=qn(e.l,e.g.retryParameters),n=e.h.networkingEngine,r=Date.now(),i=n.request(0,t,{type:5,isPreload:e.A()}),Ju(e.B,i),T(p,i.promise,2);if(a=p.h,!e.h)return p.return();a.uri&&!e.l.includes(a.uri)&&e.l.unshift(a.uri);var g=a.uri,v=a.data,y=e.g.mss.manifestPreprocessor;if(y!=Bm){if(ut("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),v=IC(v,"SmoothStreamingMedia"),!v)throw new $(2,4,4046,g);y(v),v=ca(v.outerHTML)}var x=Gp(v,"SmoothStreamingMedia");if(!x)throw new $(2,4,4046,g);if(g=e.g.mss.manifestPreprocessorTXml,g!=Vm&&g(x),e.i||(e.i=new Ke(null,0)),g=st(x,"IsLive",Xg,!1))throw new $(2,4,4047);e.i.Gc(!g),y=st(x,"TimeScale",_r,1e7),v=st(x,"DVRWindowLength",_r),g&&(v===0||isNaN(v))&&(v=1/0);var S=st(x,"CanSeek",Xg,!1);v===0&&S&&(v=1/0),S=null,v&&0<v&&(S=v/y),g&&!isNaN(e.g.availabilityWindowOverride)&&(S=e.g.availabilityWindowOverride),S==null&&(S=1/0),e.i.Ce(S),v=st(x,"Duration",_r,1/0),g||e.i.bb(v/y),g={variants:[],textStreams:[],timescale:y,duration:v/y};var k;for(S=Gt(x,"Protection"),y=e.g.mss.keySystemsBySystemId,v=[],S=w(S),k=S.next();!k.done;k=S.next())v=v.concat(Gt(k.value,"ProtectionHeader"));if(v.length){for(S=[],k=0;k<v.length;k++){var C=v[k],E=C.attributes.SystemID.toLowerCase(),I=y[E];if(I){var _;e:{if(_=aC(C)){_=w(Fa(_,"DATA"));for(var j=_.next();!j.done;j=_.next())if(j=Nn(j.value,"KID")){_=Gi(jn(j)),_=new Uint8Array([_[3],_[2],_[1],_[0],_[5],_[4],_[7],_[6]].concat(U(_.slice(8)))),_=Po(_);break e}}_=null}j=Gi(jn(C)),E=ju(E.replace(/-/g,"")),E=[{initData:dm(j,E,new Set,0),initDataType:"cenc",keyId:_}],E=Ms(I,"cenc",E),_&&E.keyIds.add(_),(I=EF.get(I))&&(E.licenseServerUri=I(C)),S.push(E)}}y=S}else y=[];for(k=y,S=[],y=[],v=[],x=Gt(x,"StreamIndex"),x=w(x),C=x.next();!C.done;C=x.next()){C=C.value,I=Gt(C,"QualityLevel"),E=g.timescale,_=g.duration,j=Gt(C,"c");for(var B=[],q=0,O=0;O<j.length;++O){var R=j[O],H=j[O+1],z=st(R,"t",_r),Y=st(R,"d",_r);if(R=st(R,"r",Fr),!Y)break;if(z=z??q,(R=R||0)&&R--,0>R)if(H){if(H=st(H,"t",_r),H==null||z>=H)break;R=Math.ceil((H-z)/Y)-1}else{if(_==1/0||z/E>=_)break;R=Math.ceil((_*E-z)/Y)-1}for(H=0;H<=R;++H)q=z+Y,B.push({start:z/E,end:q/E,xg:z}),z=q}for(E=B,I=w(I),_=I.next();!_.done;_=I.next())(_=IF(e,C,_.value,E,k,g))&&(_.type!="audio"||e.g.disableAudio?_.type!="video"||e.g.disableVideo?_.type!=wt||e.g.disableText||v.push(_):y.push(_):S.push(_))}for(x=[],S=w(0<S.length?S:[null]),k=S.next();!k.done;k=S.next())for(k=k.value,C=w(0<y.length?y:[null]),B=C.next();!B.done;B=C.next())I=x,E=I.push,_=e,j=k,B=B.value,O=0,j&&j.bandwidth&&0<j.bandwidth&&(O+=j.bandwidth),B&&B.bandwidth&&0<B.bandwidth&&(O+=B.bandwidth),_={id:_.u++,language:j?j.language:"und",disabledUntilTime:0,primary:!!j&&j.primary||!!B&&B.primary,audio:j,video:B,bandwidth:O,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},E.call(I,_);g.variants=x,g.textStreams=v,e.j?(e.j.variants=g.variants,e.j.textStreams=g.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:g.variants,textStreams:g.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.ie()),Promise.resolve(),u=Date.now(),l=(u-r)/1e3,e.C.sample(1,l),oe(p)})}function IF(e,t,n,r,i,a){var u=t.attributes.Type;if(u!=="audio"&&u!=="video"&&u!=="text")return Be("Ignoring unrecognized type:",u),null;var l=t.attributes.Language,p=e.u++,g=st(n,"Bitrate",Ro),v=st(n,"MaxWidth",Ro),y=st(n,"MaxHeight",Ro),x=st(n,"Channels",Ro),S=st(n,"SamplingRate",Ro),k=a.duration;r.length&&(k=r[r.length-1].end-r[0].start);var C=e.i.getDuration();e.i.bb(Math.min(k,C));var E={id:p,originalId:t.attributes.Name||String(p),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:g||0,width:v||void 0,height:y||void 0,kind:"",encrypted:0<i.length,drmInfos:i,keyIds:new Set,language:Jt(l||"und"),originalLanguage:l,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:x,audioSamplingRate:S,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:k,timescale:a.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((i=t.attributes.Subtype)&&((i=RF.get(i))&&E.roles.push(i),i==="main"&&(E.primary=!0)),i=n.attributes.FourCC,(i===null||i==="")&&(i=t.attributes.FourCC),!i){if(u==="audio")i="AAC";else if(u==="video")return Be('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!LF.includes(i.toUpperCase()))return Be("Codec not supported:",i),null;switch(n=MF(n,u,i,E),E.mssPrivateData.codecPrivateData=n,u){case"audio":if(!n)return Be("Quality unsupported without CodecPrivateData",u),null;E.type="audio",E.mimeType="mss/audio/mp4",E.codecs=_F(i,n);break;case"video":if(!n)return Be("Quality unsupported without CodecPrivateData",u),null;E.type="video",E.mimeType="mss/video/mp4",E.codecs=DF(n);break;case"text":E.type=wt,E.mimeType="application/mp4",(i==="TTML"||i==="DFXP")&&(E.codecs="stpp")}return E.fullMimeTypes.add(Dn(E.mimeType,E.codecs)),E.createSegmentIndex=function(){if(E.segmentIndex)return Promise.resolve();if(e.m.has(E.id))var I=e.m.get(E.id);else I=[],E.type=="video"&&(I=E.mssPrivateData.codecPrivateData.split("00000001").slice(1)),I={id:E.id,type:E.type,codecs:E.codecs,encrypted:E.encrypted,timescale:E.mssPrivateData.timescale,duration:E.mssPrivateData.duration,lb:I,ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:null,stream:E},I=Vc(new el([I])),e.m.set(E.id,I);return I=PF(e,new Yr(function(){return[]},0,null,Im(E),E.mssPrivateData.timescale,I,null,E.encrypted),E,t,r),E.segmentIndex=new jt(I),Promise.resolve()},E.closeSegmentIndex=function(){E.segmentIndex&&(E.segmentIndex.release(),E.segmentIndex=null)},E}function MF(e,t,n,r){if(e=e.attributes.CodecPrivateData)return e;if(t!=="audio")return null;t=r.channelsCount||2,e=r.audioSamplingRate||44100;var i={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};return r=i[e],n==="AACH"?(n=new Uint8Array(4),e=i[2*e],n[0]=40|r>>1,n[1]=r<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,t=new Uint16Array(2),t[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):(n=new Uint8Array(2),n[0]=16|r>>1,n[1]=r<<7|t<<3,t=new Uint16Array(1),t[0]=(n[0]<<8)+n[1],t[0].toString(16))}function _F(e,t){var n=0;return e==="AACH"&&(n=5),t?n===0&&(n=(parseInt(t.substr(0,2),16)&248)>>3):(n=2,e==="AACH"&&(n=5)),"mp4a.40."+n}function DF(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}function PF(e,t,n,r,i){var a=r.attributes.Url.replace("{bitrate}",String(n.bandwidth));r=[],i=w(i);for(var u=i.next(),l={};!u.done;l={Fe:void 0},u=i.next())l.Fe=u.value,r.push(new Ge(l.Fe.start,l.Fe.end,function(p){return function(){return Qn(e.l,[a.replace("{start time}",String(p.Fe.xg))])}}(l),0,null,t,0,0,n.mssPrivateData.duration));return r}Ee("shaka.mss.MssParser",kw);var LF="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),RF=new Map().set("CAPT","main").set("SUBT","alternate").set("DESC","main");Zu("application/vnd.ms-sstr+xml",function(){return new kw});function xI(e,t,n,r,i,a,u){if(200<=n&&299>=n&&n!=202||n==304)return{uri:i||r,originalUri:r,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:a};a=null;try{a=eo(t)}catch{}throw new $(n==401||n==403?2:1,1,1001,r,n,a,e,u,i||r)}function Aw(){}function jv(e,t,n,r,i,a){var u=new jF;Qu(t.headers).forEach(function(v,y){u.append(y,v)});var l=new UF,p={Gg:!1,Jh:!1};if(e=NF(e,t,n,{body:t.body||void 0,headers:u,method:t.method,signal:l.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},p,r,i,t.streamDataCallback,a.minBytesForProgressEvents||0),e=new Pn(e,function(){return p.Gg=!0,l.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var g=new Tt(function(){p.Jh=!0,l.abort()});g.da(t/1e3),e.finally(function(){g.stop()})}return e}function NF(e,t,n,r,i,a,u,l,p){var g,v,y,x,S,k,C,E,I,_,j,B,q,O;return P(function(R){switch(R.g){case 1:return g=OF,v=FF,x=new ArrayBuffer(0),k=S=0,C=Date.now(),ve(R,2),T(R,g(e,r),4);case 4:if(y=R.h,u(SI(y.headers)),r.method=="HEAD"){R.s(5);break}return I=(E=y.headers.get("Content-Length"))?parseInt(E,10):0,y.body?(_=y.clone().body.getReader(),j=function(H){function z(){var Y,K,J,ae;return P(function(ne){switch(ne.g){case 1:return ve(ne,2),T(ne,_.read(),4);case 4:Y=ne.h,V(ne,3);break;case 2:return W(ne),ne.return();case 3:if(Y.done){ne.s(5);break}if(S+=Y.value.byteLength,!l){ne.s(5);break}return T(ne,l(Y.value),5);case 5:K=Date.now(),J=S-k,(100<K-C&&J>=p||Y.done)&&(ae=Y.done?0:I-S,a(K-C,J,ae),k=S,C=K),Y.done?H.close():(H.enqueue(Y.value),z()),oe(ne)}})}z()},new v({start:j}),T(R,y.arrayBuffer(),8)):T(R,y.arrayBuffer(),9);case 8:x=R.h,R.s(5);break;case 9:x=R.h,B=Date.now(),a(B-C,x.byteLength,0);case 5:V(R,3);break;case 2:throw q=W(R),i.Gg?new $(1,1,7001,e,n):i.Jh?new $(1,1,1003,e,n):new $(1,1,1002,e,q,n);case 3:return O=SI(y.headers),R.return(xI(O,x,y.status,e,y.url,t,n))}})}function SI(e){var t={};return e.forEach(function(n,r){t[r.trim()]=n}),t}function kI(){if(d.ReadableStream)try{new ReadableStream({})}catch{return!1}else return!1;if(d.Response){if(!new Response("").body)return!1}else return!1;return!(!d.fetch||"polyfill"in d.fetch||!d.AbortController)}Ee("shaka.net.HttpFetchPlugin",Aw),Aw.isSupported=kI,Aw.parse=jv;var OF=d.fetch,UF=d.AbortController,FF=d.ReadableStream,jF=d.Headers;kI()&&(jo("http",jv,2,!0),jo("https",jv,2,!0),jo("blob",jv,2,!0));function TI(){}function Bv(e,t,n,r,i,a){var u=new BF,l=Date.now(),p=0,g=new Promise(function(v,y){u.open(t.method,e,!0),u.responseType="arraybuffer",u.timeout=t.retryParameters.timeout,u.withCredentials=t.allowCrossSiteCredentials,u.onabort=function(){y(new $(1,1,7001,e,n))};var x=!1;u.onreadystatechange=function(){if(u.readyState==2&&!x){var k=AI(u);i(k),x=!0}},u.onload=function(k){var C=AI(u),E=u.response;try{r(Date.now()-l,k.loaded-p,0);var I=xI(C,E,u.status,e,u.responseURL,t,n);v(I)}catch(_){y(_)}},u.onerror=function(k){y(new $(1,1,1002,e,k,n))},u.ontimeout=function(){y(new $(1,1,1003,e,n))},u.onprogress=function(k){var C=Date.now(),E=a.minBytesForProgressEvents||0,I=k.loaded-p;(100<C-l&&I>=E||k.lengthComputable&&k.loaded==k.total)&&(r(C-l,I,u.readyState==4?0:k.total-k.loaded),p=k.loaded,l=C)};for(var S in t.headers)u.setRequestHeader(S.toLowerCase(),t.headers[S]);u.send(t.body)});return new Pn(g,function(){return u.abort(),Promise.resolve()})}function AI(e){var t=e.getAllResponseHeaders().trim().split(`\r
`);e={},t=w(t);for(var n=t.next();!n.done;n=t.next())n=n.value.split(": "),e[n[0].toLowerCase()]=n.slice(1).join(": ");return e}Ee("shaka.net.HttpXHRPlugin",TI),TI.parse=Bv;var BF=d.XMLHttpRequest;jo("http",Bv,1,!0),jo("https",Bv,1,!0),jo("blob",Bv,1,!0);function EI(e,t,n,r,i){this.g=e,this.i=t,this.groupId=n,this.h=r,this.j=i}function Ew(e){var t=e.Ib(!1);return t?Do(t):e.N().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.Sa+":"+e.wa}function VF(e,t){return bh(e.g.N(),e.g.Sa,e.g.wa,t.streaming.retryParameters)}function CI(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function II(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}CI.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}};function MI(e){return e.i==0?0:e.j/e.i}function _I(e){var t=this;this.u=e,this.i=new Map,this.h=new Uc(function(){return Cw(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new CI,this.l=!1}_I.prototype.destroy=function(){return this.h.destroy()};function $F(e,t,n){e.o=t,e.m=n}function Cw(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}function zF(e,t,n,r,i,a){nn(e.h);var u=(e.i.get(t)||Promise.resolve()).then(function(){var l,p,g,v,y,x,S;return P(function(k){if(k.g==1)return T(k,GF(e,n),2);if(l=k.h,e.h.g)throw new $(2,9,7001);if(i)for(v in p=Ye(l),g=new kb(p),g.data)y=Number(v),x=g.data[y],S=g.g[y],e.m(x,S);return e.g.close(r,l.byteLength),e.o(MI(e.g),e.g.g),k.return(a(l))})});e.i.set(t,u)}function HF(e,t,n,r,i,a){nn(e.h);var u=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new $(2,9,7001);if(i){var l=Ye(n);l=new kb(l);for(var p in l.data){var g=Number(p);e.m(l.data[g],l.g[g])}}return e.g.close(r,n.byteLength),e.o(MI(e.g),e.g.g),a(n)});e.i.set(t,u)}function qF(e){return P(function(t){return t.g==1?T(t,Promise.all(e.i.values()),2):t.return(e.g.g)})}function GF(e,t){var n,r,i,a;return P(function(u){return u.g==1?(n=fa,r=e.u.request(n,t),i=function(){return r.abort()},e.j.push(i),T(u,r.promise,2)):(a=u.h,da(e.j,i),u.return(a.data))})}function Vv(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new Wt,e.onabort=function(r){r.preventDefault(),n.g.reject()},e.onerror=function(r){r.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}Vv.prototype.abort=function(){var e=this;return P(function(t){if(t.g==1){try{e.i.abort()}catch{}return ve(t,2),T(t,e.g,4)}if(t.g!=2)return V(t,0);W(t),oe(t)})};function Iw(e,t){return new Promise(function(n,r){var i=e.h.openCursor();i.onerror=r,i.onsuccess=function(){var a;return P(function(u){if(u.g==1)return i.result==null?(n(),u.return()):(a=i.result,T(u,t(a.key,a.value,a),2));a.continue(),oe(u)})}})}Vv.prototype.store=function(){return this.h},Vv.prototype.promise=function(){return this.g};function Mw(e){this.h=e,this.g=[]}Mw.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))};function pl(e,t){return $v(e,t,"readwrite")}function $v(e,t,n){n=e.h.transaction([t],n);var r=new Vv(n,t);return e.g.push(r),r.promise().then(function(){da(e.g,r)},function(){da(e.g,r)}),r}function hl(e,t,n){this.h=new Mw(e),this.i=t,this.g=n}f=hl.prototype,f.destroy=function(){return this.h.destroy()},f.hasFixedKeySpace=function(){return!0},f.addSegments=function(){return DI(this.i)},f.removeSegments=function(e,t){return PI(this,this.i,e,t)},f.getSegments=function(e){var t=this,n;return P(function(r){return r.g==1?T(r,LI(t,t.i,e),2):(n=r.h,r.return(n.map(function(i){return t.Ig(i)})))})},f.addManifests=function(){return DI(this.g)},f.updateManifest=function(){return Promise.reject(new $(2,9,9016,"Cannot modify values in "+this.g))};function KF(e,t,n){e=pl(e.h,e.g);var r=e.store();return r.get(t).onsuccess=function(){r.put(n,t)},e.promise()}f.updateManifestExpiration=function(e,t){var n=pl(this.h,this.g),r=n.store();return r.get(e).onsuccess=function(i){(i=i.target.result)&&(i.expiration=t,r.put(i,e))},n.promise()},f.removeManifests=function(e,t){return PI(this,this.g,e,t)},f.getManifests=function(e){var t=this,n;return P(function(r){return r.g==1?T(r,LI(t,t.g,e),2):(n=r.h,r.return(Promise.all(n.map(function(i){return t.jd(i)}))))})},f.getAllManifests=function(){var e=this,t,n;return P(function(r){return r.g==1?(t=$v(e.h,e.g,"readonly"),n=new Map,T(r,Iw(t,function(i,a){var u;return P(function(l){if(l.g==1)return T(l,e.jd(a),2);u=l.h,n.set(i,u),oe(l)})}),2)):r.g!=3?T(r,t.promise(),3):r.return(n)})},f.Ig=function(e){return e},f.jd=function(e){return Promise.resolve(e)};function DI(e){return Promise.reject(new $(2,9,9011,"Cannot add new value to "+e))}f.add=function(e,t){var n=this,r,i,a,u,l,p,g;return P(function(v){if(v.g==1){for(r=pl(n.h,e),i=r.store(),a=[],u=w(t),l=u.next(),p={};!l.done;p={cg:void 0},l=u.next())g=l.value,p.cg=i.add(g),p.cg.onsuccess=function(y){return function(){a.push(y.cg.result)}}(p);return T(v,r.promise(),2)}return v.return(a)})};function PI(e,t,n,r){e=pl(e.h,t),t=e.store(),n=w(n);for(var i=n.next(),a={};!i.done;a={Qf:void 0},i=n.next())a.Qf=i.value,t.delete(a.Qf).onsuccess=function(u){return function(){return r(u.Qf)}}(a);return e.promise()}function LI(e,t,n){var r,i,a,u,l,p,g;return P(function(v){if(v.g==1){for(r=$v(e.h,t,"readonly"),i=r.store(),a={},u=[],l=w(n),p=l.next(),g={};!p.done;g={we:void 0,ee:void 0},p=l.next())g.ee=p.value,g.we=i.get(g.ee),g.we.onsuccess=function(y){return function(){y.we.result==null&&u.push(y.ee),a[y.ee]=y.we.result}}(g);return T(v,r.promise(),2)}if(u.length)throw new $(2,9,9012,"Could not find values for "+u);return v.return(n.map(function(y){return a[y]}))})}function Yh(e){this.g=new Mw(e)}Yh.prototype.destroy=function(){return this.g.destroy()},Yh.prototype.getAll=function(){var e=this,t,n;return P(function(r){return r.g==1?(t=$v(e.g,"session-ids","readonly"),n=[],T(r,Iw(t,function(i,a){n.push(a)}),2)):r.g!=3?T(r,t.promise(),3):r.return(n)})},Yh.prototype.add=function(e){var t=pl(this.g,"session-ids"),n=t.store();e=w(e);for(var r=e.next();!r.done;r=e.next())n.add(r.value);return t.promise()},Yh.prototype.remove=function(e){var t=this,n;return P(function(r){return r.g==1?(n=pl(t.g,"session-ids"),T(r,Iw(n,function(i,a,u){e.includes(a.sessionId)&&u.delete()}),2)):T(r,n.promise(),0)})};function ei(){this.g=new Map}ei.prototype.destroy=function(){for(var e=[],t=w(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},ei.prototype.init=function(){var e=this;Jh.forEach(function(i,a){(i=i())&&e.g.set(a,i)});for(var t=[],n=w(this.g.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)};function RI(e){var t=null;if(e.g.forEach(function(n,r){n.getCells().forEach(function(i,a){i.hasFixedKeySpace()||t||(t={path:{zb:r,Ta:a},Ta:i})})}),t)return t;throw new $(2,9,9013,"Could not find a cell that supports add-operations")}function WF(e,t){e.g.forEach(function(n,r){n.getCells().forEach(function(i,a){t({zb:r,Ta:a},i)})})}function zv(e,t,n){if(e=e.g.get(t),!e)throw new $(2,9,9013,"Could not find mechanism with name "+t);if(t=e.getCells().get(n),!t)throw new $(2,9,9013,"Could not find cell with name "+n);return t}function XF(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}function YF(e){var t=Array.from(e.g.keys());if(!t.length)throw new $(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}function JF(e){var t,n,r;return P(function(i){return i.g==1?(t=Array.from(e.g.values()),n=0<t.length,n||(r=Jh,r.forEach(function(a){(a=a())&&t.push(a)})),T(i,Promise.all(t.map(function(a){return a.erase()})),2)):n?i.s(0):T(i,Promise.all(t.map(function(a){return a.destroy()})),0)})}function NI(e,t){Jh.set(e,t)}Ee("shaka.offline.StorageMuxer",ei),ei.unregister=function(e){Jh.delete(e)},ei.register=NI,ei.prototype.destroy=ei.prototype.destroy;var Jh=new Map;function Qh(){hl.apply(this,arguments)}Te(Qh,hl),Qh.prototype.updateManifestExpiration=function(e,t){var n=this,r,i,a;return P(function(u){return r=pl(n.h,n.g),i=r.store(),a=new Wt,i.get(e).onsuccess=function(l){(l=l.target.result)?(l.expiration=t,i.put(l),a.resolve()):a.reject(new $(2,9,9012,"Could not find values for "+e))},T(u,Promise.all([r.promise(),a]),0)})},Qh.prototype.jd=function(e){var t,n,r,i,a,u;return P(function(l){if(l.g==1){for(t=[],n=0;n<e.periods.length;++n)r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime,a=QF(e.periods[n],i),t.push(a);return T(l,wC(t),2)}return u=l.h,l.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration==null?1/0:e.expiration,streams:u,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})};function QF(e,t){ej(e);for(var n=w(e.streams),r=n.next();!r.done;r=n.next());return e.streams.map(function(i){return ZF(i,e.startTime,t)})}function ZF(e,t,n){var r=e.initSegmentUri?OI(e.initSegmentUri):null,i=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:r,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(u){var l=OI(u.uri);return{startTime:t+u.startTime,endTime:t+u.endTime,dataKey:l,initSegmentKey:r,appendWindowStart:t,appendWindowEnd:a,timestampOffset:i,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}Qh.prototype.Ig=function(e){return{data:e.data}};function OI(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new $(2,9,9004,"Could not parse uri "+e)}function ej(e){var t=e.streams.filter(function(l){return l.contentType=="audio"});if(e=e.streams.filter(function(l){return l.contentType=="video"}),!t.every(function(l){return l.variantIds})||!e.every(function(l){return l.variantIds})){for(var n=w(t),r=n.next();!r.done;r=n.next())r.value.variantIds=[];for(n=w(e),r=n.next();!r.done;r=n.next())r.value.variantIds=[];if(n=0,e.length&&!t.length){r=n++;for(var i=w(e),a=i.next();!a.done;a=i.next())a.value.variantIds.push(r)}if(!e.length&&t.length)for(r=n++,i=w(t),a=i.next();!a.done;a=i.next())a.value.variantIds.push(r);if(e.length&&t.length)for(t=w(t),r=t.next();!r.done;r=t.next())for(r=r.value,i=w(e),a=i.next();!a.done;a=i.next()){a=a.value;var u=n++;r.variantIds.push(u),a.variantIds.push(u)}}}function Hv(){hl.apply(this,arguments)}Te(Hv,hl),Hv.prototype.jd=function(e){var t,n,r,i,a,u;return P(function(l){if(l.g==1){for(t=[],n=0;n<e.periods.length;++n){r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime;for(var p=e.periods[n],g=[],v=w(p.streams),y=v.next();!y.done;y=v.next())y=y.value,y.variantIds.length!=0&&g.push(tj(y,p.startTime,p.startTime+i));a=g,t.push(a)}return T(l,wC(t),2)}return u=l.h,l.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:e.expiration==null?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:u,sequenceMode:!1})})};function tj(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(r){return{startTime:t+r.startTime,endTime:t+r.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:r.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function _w(){hl.apply(this,arguments)}Te(_w,hl),f=_w.prototype,f.hasFixedKeySpace=function(){return!1},f.addSegments=function(e){return this.add(this.i,e)},f.addManifests=function(e){return this.add(this.g,e)},f.updateManifest=function(e,t){return KF(this,e,t)},f.jd=function(e){return e.expiration==null&&(e.expiration=1/0),Promise.resolve(e)};function UI(){this.m=this.j=this.i=this.h=this.g=this.l=null}f=UI.prototype,f.init=function(){var e=this,t=new Wt,n=!1,r=new Tt(function(){n=!0,t.reject(new $(2,9,9017))});r.da(5);var i=d.indexedDB.open("shaka_offline_db",5);return i.onsuccess=function(){if(!n){var a=i.result;e.l=a;var u=a.objectStoreNames;u=u.contains("manifest")&&u.contains("segment")?new Qh(a,"segment","manifest"):null,e.g=u,u=a.objectStoreNames,u=u.contains("manifest-v2")&&u.contains("segment-v2")?new Hv(a,"segment-v2","manifest-v2"):null,e.h=u,u=a.objectStoreNames,u=u.contains("manifest-v3")&&u.contains("segment-v3")?new Hv(a,"segment-v3","manifest-v3"):null,e.i=u,u=a.objectStoreNames,u=u.contains("manifest-v5")&&u.contains("segment-v5")?new _w(a,"segment-v5","manifest-v5"):null,e.j=u,a=a.objectStoreNames.contains("session-ids")?new Yh(a):null,e.m=a,r.stop(),t.resolve()}},i.onupgradeneeded=function(){for(var a=i.result,u=w(["segment-v5","manifest-v5","session-ids"]),l=u.next();!l.done;l=u.next())l=l.value,a.objectStoreNames.contains(l)||a.createObjectStore(l,{autoIncrement:!0})},i.onerror=function(a){n||(t.reject(new $(2,9,9001,i.error)),r.stop(),a.preventDefault())},t},f.destroy=function(){var e=this;return P(function(t){switch(t.g){case 1:if(!e.g){t.s(2);break}return T(t,e.g.destroy(),2);case 2:if(!e.h){t.s(4);break}return T(t,e.h.destroy(),4);case 4:if(!e.i){t.s(6);break}return T(t,e.i.destroy(),6);case 6:if(!e.j){t.s(8);break}return T(t,e.j.destroy(),8);case 8:if(!e.m){t.s(10);break}return T(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),oe(t)}})},f.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},f.getEmeSessionCell=function(){return this.m},f.erase=function(){var e=this;return P(function(t){switch(t.g){case 1:if(!e.g){t.s(2);break}return T(t,e.g.destroy(),2);case 2:if(!e.h){t.s(4);break}return T(t,e.h.destroy(),4);case 4:if(!e.i){t.s(6);break}return T(t,e.i.destroy(),6);case 6:if(!e.j){t.s(8);break}return T(t,e.j.destroy(),8);case 8:return e.l&&e.l.close(),T(t,nj(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,T(t,e.init(),0)}})};function nj(){var e=new Wt,t=d.indexedDB.deleteDatabase("shaka_offline_db");return t.onblocked=function(){},t.onsuccess=function(){e.resolve()},t.onerror=function(n){e.reject(new $(2,9,9001,t.error)),n.preventDefault()},e}NI("idb",function(){return(!la()||la()&&Cs())&&!Ra()&&d.indexedDB?new UI:null});function ao(e,t,n,r){this.g=e,this.i=t,this.h=n,this.l=r,this.j=["offline:",e,"/",t,"/",n,"/",r].join("")}ao.prototype.zb=function(){return this.i},ao.prototype.Ta=function(){return this.h},ao.prototype.key=function(){return this.l},ao.prototype.toString=function(){return this.j};function Dw(e){if(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e),e==null)return null;var t=e[1];if(t!="manifest"&&t!="segment")return null;var n=e[2];if(!n)return null;var r=e[3];return r&&t!=null?new ao(t,n,r,Number(e[4])):null}function FI(e,t){this.h=e,this.g=t}function jI(e,t){var n=new Ke(null,0);n.bb(t.duration);var r=t.streams.filter(function(g){return g.type=="audio"}),i=t.streams.filter(function(g){return g.type=="video"});r=rj(e,r,i,n),i=t.streams.filter(function(g){return g.type==wt}).map(function(g){return qv(e,g,n)});var a=t.streams.filter(function(g){return g.type=="image"}).map(function(g){return qv(e,g,n)}),u=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var l=w(r.values()),p=l.next();!p.done;p=l.next())p=p.value,p.audio&&p.audio.encrypted&&(p.audio.drmInfos=u),p.video&&p.video.encrypted&&(p.video.drmInfos=u);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(r.values()),textStreams:i,imageStreams:a,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function rj(e,t,n,r){for(var i=new Set,a=w(t),u=a.next();!u.done;u=a.next()){u=w(u.value.variantIds);for(var l=u.next();!l.done;l=u.next())i.add(l.value)}for(a=w(n),u=a.next();!u.done;u=a.next())for(u=w(u.value.variantIds),l=u.next();!l.done;l=u.next())i.add(l.value);for(a=new Map,i=w(i),u=i.next();!u.done;u=i.next())u=u.value,a.set(u,{id:u,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=w(t),i=t.next();!i.done;i=t.next())for(u=i.value,i=qv(e,u,r),u=w(u.variantIds),l=u.next();!l.done;l=u.next())l=a.get(l.value),l.language=i.language,l.primary=l.primary||i.primary,l.audio=i;for(n=w(n),t=n.next();!t.done;t=n.next())for(i=t.value,t=qv(e,i,r),i=w(i.variantIds),u=i.next();!u.done;u=i.next())u=a.get(u.value),u.primary=u.primary||t.primary,u.video=t;return a}function qv(e,t,n){var r=t.segments.map(function(i){return ij(e,i,t)});return n.Ed(r),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new jt(r),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([Dn(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}function ij(e,t,n){var r=new ao("segment",e.h,e.g,t.dataKey);return e=new Ge(t.startTime,t.endTime,function(){return[r.toString()]},0,null,t.initSegmentKey!=null?aj(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",t.thumbnailSprite&&e.De(t.thumbnailSprite),e}function aj(e,t){var n=new ao("segment",e.h,e.g,t);return new Yr(function(){return[n.toString()]},0,null)}function BI(){this.g=null}f=BI.prototype,f.configure=function(){},f.start=function(e,t){var n=this,r,i,a,u,l,p,g;return P(function(v){switch(v.g){case 1:if(r=Dw(e),n.g=r,r==null||r.g!="manifest")throw new $(2,1,9004,e);return i=new ei,be(v,2),T(v,i.init(),4);case 4:return T(v,zv(i,r.zb(),r.Ta()),5);case 5:return a=v.h,T(v,a.getManifests([r.key()]),6);case 6:return u=v.h,l=u[0],p=new FI(r.zb(),r.Ta()),g=jI(p,l),t.makeTextStreamsForClosedCaptions(g),v.return(g);case 2:return Se(v),T(v,i.destroy(),7);case 7:te(v,0)}})},f.stop=function(){return Promise.resolve()},f.update=function(){},f.onExpirationUpdated=function(e,t){var n=this,r,i,a,u,l,p,g;return P(function(v){switch(v.g){case 1:return r=n.g,i=new ei,ve(v,2,3),T(v,i.init(),5);case 5:return T(v,zv(i,r.zb(),r.Ta()),6);case 6:return a=v.h,T(v,a.getManifests([r.key()]),7);case 7:if(u=v.h,l=u[0],p=l.sessionIds.includes(e),g=l.expiration==null||l.expiration>t,!p||!g){v.s(3);break}return T(v,a.updateManifestExpiration(r.key(),t),3);case 3:return Se(v),T(v,i.destroy(),10);case 10:te(v,0);break;case 2:W(v),v.s(3)}})},f.onInitialVariantChosen=function(){},f.banLocation=function(){},f.setMediaElement=function(){},Zu("application/x-offline-manifest",function(){return new BI});function VI(){}function $I(e,t){var n=Dw(e);return n&&n.g=="manifest"?(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t},e=Nc(e)):e=n&&n.g=="segment"?oj(n.key(),n,t):Yu(new $(2,1,9004,e)),e}function oj(e,t,n){var r=new ei;return Nc(void 0).Ha(function(){return r.init()}).Ha(function(){return zv(r,t.zb(),t.Ta())}).Ha(function(i){return i.getSegments([t.key()])}).Ha(function(i){return{uri:t,data:i[0].data,headers:{},originalRequest:n}}).finally(function(){return r.destroy()})}Ee("shaka.offline.OfflineScheme",VI),VI.plugin=$I,jo("offline",$I);function zI(e,t,n){var r,i,a,u,l,p;return P(function(g){switch(g.g){case 1:r=[];for(var v=[],y=w(n),x=y.next();!x.done;x=y.next()){x=x.value;for(var S=!1,k=w(v),C=k.next();!C.done;C=k.next())if(C=C.value,uj(C.info,x)){C.sessionIds.push(x.sessionId),S=!0;break}S||v.push({info:x,sessionIds:[x.sessionId]})}i=w(v),a=i.next();case 2:if(a.done){g.s(4);break}return u=a.value,l=sj(e,t,u),T(g,l,5);case 5:p=g.h,r=r.concat(p),a=i.next(),g.s(2);break;case 4:return g.return(r)}})}function sj(e,t,n){var r,i;return P(function(a){switch(a.g){case 1:return r=new pm({Xb:t,onError:function(){},pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ve(a,2),r.configure(e),T(a,pR(r,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:V(a,3);break;case 2:return W(a),T(a,r.destroy(),5);case 5:return a.return([]);case 3:return i=[],T(a,Promise.all(n.sessionIds.map(function(u){return P(function(l){if(l.g==1)return ve(l,2),T(l,gR(r,u),4);if(l.g!=2)return i.push(u),V(l,0);W(l),oe(l)})})),6);case 6:return T(a,r.destroy(),7);case 7:return a.return(i)}})}function uj(e,t){function n(r,i){return r.robustness==i.robustness&&r.contentType==i.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Y1(e.audioCapabilities,t.audioCapabilities,n)&&Y1(e.videoCapabilities,t.videoCapabilities,n)}function lj(e,t,n){var r=t.presentationTimeline.getDuration();return t=HI(t),{offlineUri:null,originalManifestUri:e,duration:r,size:0,expiration:1/0,tracks:t,appMetadata:n,isIncomplete:!1}}function Pw(e,t){var n=jI(new FI(e.zb(),e.Ta()),t),r=t.appMetadata||{};return n=HI(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r,isIncomplete:t.isIncomplete||!1}}function HI(e){var t=[],n=im(e.variants);n=w(n);for(var r=n.next();!r.done;r=n.next())t.push(Xu(r.value));for(e=w(e.textStreams),n=e.next();!n.done;n=e.next())t.push(nh(n.value));return t}function cj(){this.g=new Map}function dj(e,t){var n=t.audio,r=t.video;if(n&&!r&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&r&&e.g.set(r.id,r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,a=r.bandwidth||t.bandwidth-i;0>=a&&(a=t.bandwidth),e.g.set(n.id,i),e.g.set(r.id,a)}}function pj(e,t){e.g.set(t.id,t.bandwidth||2048)}function qI(e,t){return e=e.g.get(t),e==null&&(e=0),e}function or(e){var t=this;if(e&&e.constructor!=ce)throw new $(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.xb()):(this.h=Zc(),this.g=new an),this.i=[],this.l=[];var n=!e;this.j=new Uc(function(){var r,i,a,u,l;return P(function(p){switch(p.g){case 1:return T(p,Promise.all(t.l.map(function(g){return Cw(g)})),2);case 2:for(r=function(){},i=[],a=w(t.i),u=a.next();!u.done;u=a.next())l=u.value,i.push(l.then(r,r));return T(p,Promise.all(i),3);case 3:if(!n){p.s(4);break}return T(p,t.g.destroy(),4);case 4:t.h=null,t.g=null,oe(p)}})}),this.m=1e9}function Lw(){if(Za())e:{for(var e=w(Jh.values()),t=e.next();!t.done;t=e.next())if(t=t.value,t=t()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}f=or.prototype,f.destroy=function(){return this.j.destroy()},f.configure=function(e,t){return arguments.length==2&&typeof e=="string"&&(e=Um(e,t)),Bs(this.h,e)},f.getConfiguration=function(){var e=Zc();return Bs(e,this.h,Zc()),e},f.xb=function(){return this.g},f.store=function(e,t,n,r,i){var a=this,u=this.getConfiguration(),l=new _I(this.g);return this.l.push(l),t=hj(this,e,t||{},r||[],i||[],function(){var p;return P(function(g){return g.g==1?n?g.s(2):T(g,sl(e,a.g,u.manifest.retryParameters),3):(g.g!=2&&(n=g.h),p=x4(e,n||null),g.return(p()))})},u,l),t=new Pn(t,function(){return Cw(l)}),t.finally(function(){da(a.l,l)}),Mj(this,t)};function hj(e,t,n,r,i,a,u,l){var p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne,ue;return P(function(se){switch(se.g){case 1:return Gv(),g=p=null,v=new ei,S=x=y=null,ve(se,2,3),T(se,a(),5);case 5:return p=se.h,T(se,Sj(e,t,p,u),6);case 6:if(k=se.h,_i(e),C=!k.presentationTimeline.U()&&!k.presentationTimeline.yc(),!C)throw new $(2,9,9005,t);E=w(r),I=E.next();case 7:if(I.done){se.s(9);break}return _=I.value,T(se,kj(e,_,k),10);case 10:j=se.h,k.imageStreams.push(j),_i(e),I=E.next(),se.s(7);break;case 9:B=w(i),q=B.next();case 11:return q.done?(f4(u.drm.clearKeys,k.variants),H=k.variants.some(function(he){if(he.audio){for(var xe=w(he.audio.drmInfos),tt=xe.next();!tt.done;tt=xe.next())if(tt.value.licenseServerUri.startsWith("data:"))return!0}if(he.video){for(he=w(he.video.drmInfos),xe=he.next();!xe.done;xe=he.next())if(xe.value.licenseServerUri.startsWith("data:"))return!0}return!1}),z=u.offline.usePersistentLicense,H&&(z=!1),T(se,e.Lc(k,function(he){S=S||he},u,z),15)):(O=q.value,T(se,Tj(e,k,O.uri,O.language,O.kind,O.mime,O.codecs),14));case 14:R=se.h,k.textStreams.push(R),_i(e),q=B.next(),se.s(11);break;case 15:if(g=se.h,_i(e),S)throw S;return T(se,gj(k,g,u,z),16);case 16:return T(se,v.init(),17);case 17:return _i(e),T(se,RI(v),18);case 18:return y=se.h,_i(e),Y=mj(g,k,t,n,u,l,z),K=Y.Yi,J=Y.tg,T(se,y.Ta.addManifests([K]),19);case 19:if(ae=se.h,_i(e),x=ae[0],_i(e),S)throw S;return T(se,fj(e,J,x,K,l,u,y.Ta,k,g,z),20);case 20:return _i(e),XI(k,K,g,z),T(se,y.Ta.updateManifest(x,K),21);case 21:return _i(e),ne=new ao("manifest",y.path.zb,y.path.Ta,x),se.return(Pw(ne,K));case 3:return Se(se),T(se,v.destroy(),22);case 22:if(!p){se.s(23);break}return T(se,p.stop(),23);case 23:if(!g){se.s(25);break}return T(se,g.destroy(),25);case 25:te(se,0);break;case 2:if(ue=W(se),x==null){se.s(27);break}return T(se,GI(x),27);case 27:throw S||ue}})}function fj(e,t,n,r,i,a,u,l,p,g){var v,y,x,S,k,C,E,I,_,j,B;return P(function(q){switch(q.g){case 1:if(v={},y=0,x=function(){if(e.j.g||i.l)throw new $(2,9,7001)},S=function(O,R){var H,z,Y,K,J,ae,ne,ue,se;return P(function(he){if(he.g==1){for(H=w(O),z=H.next(),Y={};!z.done;Y={Nb:void 0},z=H.next())Y.Nb=z.value,x(),K=VF(Y.Nb,a),J=Y.Nb.i,ae=Y.Nb.h,ne=function(xe){return function(tt){var Fe,Vt,At,gt;return P(function(vt){switch(vt.g){case 1:if(Fe=xe.Nb.g,Vt=Fe.Ib(!1),!Fe.aesKey||Vt){vt.s(2);break}return T(vt,Qb(tt,Fe.aesKey,xe.Nb.j),3);case 3:tt=vt.h;case 2:return At=Ew(Fe),T(vt,u.addSegments([{data:tt}]),4);case 4:gt=vt.h,x(),v[At]=gt[0],y+=tt.byteLength,oe(vt)}})}}(Y),ue=Y.Nb.g,(se=ue.Ib(!1))?HF(i,Y.Nb.groupId,se,J,ae,ne):zF(i,Y.Nb.groupId,K,J,ae,ne);return T(he,qF(i),2)}return x(),!R||i.l?he.s(0):(XI(l,r,p,g),T(he,u.updateManifest(n,r),0))})},k=!1,ve(q,2),!Rw(l)||!k||WI(l)){q.s(4);break}return T(q,S(t.filter(function(O){return O.h}),!0),5);case 5:return x(),t=t.filter(function(O){return!O.h}),C=v,E=y,v={},y=0,T(q,KI(u,n,r,C,E,function(){return _i(e)}),6);case 6:x();case 4:if(k){q.s(7);break}return T(q,S(t,!1),8);case 8:return x(),I=v,_=y,v={},y=0,T(q,KI(u,n,r,I,_,function(){return x()}),9);case 9:x();case 7:V(q,0);break;case 2:return j=W(q),B=Object.values(v),T(q,u.removeSegments(B,function(){}),10);case 10:throw j}})}function GI(e){var t,n,r,i;return P(function(a){switch(a.g){case 1:return t=new ei,T(a,t.init(),2);case 2:return T(a,RI(t),3);case 3:return n=a.h,r=new ao("manifest",n.path.zb,n.path.Ta,e),T(a,t.destroy(),4);case 4:return i=new or,T(a,i.remove(r.toString()),0)}})}function KI(e,t,n,r,i,a){var u,l,p,g,v,y,x,S,k,C,E;return P(function(I){switch(I.g){case 1:for(u=!1,ve(I,2),l=!0,p=w(n.streams),g=p.next();!g.done;g=p.next())for(v=g.value,y=w(v.segments),x=y.next();!x.done;x=y.next())S=x.value,k=S.pendingSegmentRefId?r[S.pendingSegmentRefId]:null,k!=null&&(S.dataKey=k,S.pendingSegmentRefId=void 0),k=S.pendingInitSegmentRefId?r[S.pendingInitSegmentRefId]:null,k!=null&&(S.initSegmentKey=k,S.pendingInitSegmentRefId=void 0),S.pendingSegmentRefId&&(l=!1),S.pendingInitSegmentRefId&&(l=!1);return n.size+=i,l&&(n.isIncomplete=!1),T(I,e.updateManifest(t,n),4);case 4:u=!0,a(),V(I,0);break;case 2:return C=W(I),T(I,GI(t),5);case 5:if(u){I.s(6);break}return E=Object.values(r),T(I,e.removeSegments(E,function(){}),6);case 6:throw C}})}function gj(e,t,n,r){var i,a,u,l,p,g,v,y,x,S,k,C,E,I,_,j,B,q,O,R,H,z,Y,K,J,ae,ne,ue,se,he;return P(function(xe){switch(xe.g){case 1:return i={width:1/0,height:1/0},K7(e,n.restrictions,i),T(xe,P5(t,e,r,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(a=[],u=n.preferredDecodingAttributes,l=n.preferredVideoCodecs,p=n.preferredAudioCodecs,g=n.preferredTextFormats,D5(e,l,p,u,g),v=w(e.variants),y=v.next();!y.done;y=v.next())x=y.value,a.push(Xu(x));for(S=w(e.textStreams),k=S.next();!k.done;k=S.next())C=k.value,a.push(nh(C));for(E=w(e.imageStreams),I=E.next();!I.done;I=E.next())_=I.value,a.push(gb(_));return T(xe,n.offline.trackSelectionCallback(a),3);case 3:for(j=xe.h,B=e.presentationTimeline.getDuration(),q=0,O=w(j),R=O.next();!R.done;R=O.next())H=R.value,z=H.bandwidth*B/8,q+=z;return ve(xe,4),T(xe,n.offline.downloadSizeCallback(q),6);case 6:if(Y=xe.h,!Y)throw new $(2,9,9014);V(xe,5);break;case 4:throw K=W(xe),K instanceof $?K:new $(2,9,9015);case 5:for(J=new Set,ae=new Set,ne=new Set,ue=w(j),se=ue.next();!se.done;se=ue.next())he=se.value,he.type=="variant"&&J.add(he.id),he.type=="text"&&ae.add(he.id),he.type=="image"&&ne.add(he.id);e.variants=e.variants.filter(function(tt){return J.has(tt.id)}),e.textStreams=e.textStreams.filter(function(tt){return ae.has(tt.id)}),e.imageStreams=e.imageStreams.filter(function(tt){return ne.has(tt.id)}),Pj(e),oe(xe)}})}function mj(e,t,n,r,i,a,u){var l=lj(n,t,r),p=i.offline.progressCallback;$F(a,function(k,C){l.size=C,p(l,k)},function(k,C){g&&u&&v==C&&ih(e,"cenc",k)});var g=Rw(t)&&!WI(t),v=null;g&&(v=Lj.get(e.h.keySystem));for(var y=new cj,x=w(t.textStreams),S=x.next();!S.done;S=x.next())y.g.set(S.value.id,52);for(x=w(t.imageStreams),S=x.next();!S.done;S=x.next())pj(y,S.value);for(x=w(t.variants),S=x.next();!S.done;S=x.next())dj(y,S.value);return a=Ej(a,y,t,i),i=a.streams,a=a.tg,(y=e.h)&&u&&(y.initData=[]),{Yi:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.pd(),streams:i,sessionIds:u?o4(e):[],drmInfo:y,appMetadata:r,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},tg:a}}function Rw(e){return e.variants.some(function(t){var n=t.audio&&t.audio.encrypted;return t.video&&t.video.encrypted||n})}function WI(e){return e.variants.some(function(t){return(t.video?t.video.drmInfos:[]).concat(t.audio?t.audio.drmInfos:[]).some(function(n){return n.initData&&n.initData.length})})}function XI(e,t,n,r){if(t.expiration=n.pd(),n=o4(n),t.sessionIds=r?n:[],Rw(e)&&r&&!n.length)throw new $(2,9,9007)}f.remove=function(e){return Nw(this,vj(this,e))};function vj(e,t){var n,r,i,a,u,l;return P(function(p){switch(p.g){case 1:if(Gv(),n=Dw(t),n==null||n.g!="manifest")throw new $(2,9,9004,t);return r=n,i=new ei,be(p,2),T(p,i.init(),4);case 4:return T(p,zv(i,r.zb(),r.Ta()),5);case 5:return a=p.h,T(p,a.getManifests([r.key()]),6);case 6:return u=p.h,l=u[0],T(p,Promise.all([yj(e,l,i),bj(a,r,l)]),2);case 2:return Se(p),T(p,i.destroy(),8);case 8:te(p,0)}})}function YI(e,t){for(var n=[],r=w(e.streams),i=r.next();!i.done;i=r.next())i=i.value,t&&i.type=="video"?n.push({contentType:Dn(i.mimeType,i.codecs),robustness:e.drmInfo.videoRobustness}):t||i.type!="audio"||n.push({contentType:Dn(i.mimeType,i.codecs),robustness:e.drmInfo.audioRobustness});return n}function yj(e,t,n){return P(function(r){return T(r,Dj(e.g,e.h.drm,n,t),0)})}function bj(e,t,n){function r(){}var i=_j(n);return Pw(t,n),Promise.all([e.removeSegments(i,r),e.removeManifests([t.key()],r)])}f.qj=function(){return Nw(this,wj(this))};function wj(e){var t,n,r,i,a,u,l,p,g,v;return P(function(y){switch(y.g){case 1:return Gv(),t=e.g,n=e.h.drm,r=new ei,i=!1,be(y,2),T(y,r.init(),4);case 4:a=[],XF(r,function(x){return a.push(x)}),u=w(a),l=u.next();case 5:if(l.done){y.s(2);break}return p=l.value,T(y,p.getAll(),8);case 8:return g=y.h,T(y,zI(n,t,g),9);case 9:return v=y.h,T(y,p.remove(v),10);case 10:v.length!=g.length&&(i=!0),l=u.next(),y.s(5);break;case 2:return Se(y),T(y,r.destroy(),11);case 11:te(y,3);break;case 3:return y.return(!i)}})}f.list=function(){return Nw(this,xj())};function xj(){var e,t,n;return P(function(r){switch(r.g){case 1:return Gv(),e=[],t=new ei,be(r,2),T(r,t.init(),4);case 4:return n=Promise.resolve(),WF(t,function(i,a){n=n.then(function(){var u;return P(function(l){if(l.g==1)return T(l,a.getAllManifests(),2);u=l.h,u.forEach(function(p,g){p=Pw(new ao("manifest",i.zb,i.Ta,g),p),e.push(p)}),oe(l)})})}),T(r,n,2);case 2:return Se(r),T(r,t.destroy(),6);case 6:te(r,3);break;case 3:return r.return(e)}})}function Sj(e,t,n,r){var i,a,u,l,p;return P(function(g){if(g.g==1)return i=null,a=e.g,u={networkingEngine:a,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(v){i=v},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return r.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(r.manifest),_i(e),T(g,n.start(t,u),2);if(g.g!=3)return l=g.h,_i(e),p=QI(l),T(g,Promise.all(wb(p,function(v){return v.createSegmentIndex()})),3);if(_i(e),i)throw i;return g.return(l)})}function kj(e,t,n){var r,i,a,u,l,p,g,v,y,x,S,k,C,E,I;return P(function(_){switch(_.g){case 1:return T(_,JI(e,t),2);case 2:if(r=_.h,r!="text/vtt")throw new $(1,2,2017,t);return T(_,Aj(t,e.g,e.h.streaming.retryParameters),3);case 3:if(i=_.h,a=tm(r),!a)throw new $(2,2,2014,r);for(u=a(),l={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},p=Ye(i),g=u.parseMedia(p,l,t,[]),v=[],y=w(g),x=y.next(),S={};!x.done;S={Me:void 0,Nc:void 0},x=y.next())S.Nc=x.value,S.Me=null,k=function(j){return function(){return j.Me==null&&(j.Me=Qn([t],[j.Nc.payload])),j.Me||[]}}(S),C=new Ge(S.Nc.startTime,S.Nc.endTime,k,0,null,null,0,0,1/0),S.Nc.payload.includes("#xywh")&&(E=S.Nc.payload.split("#xywh=")[1].split(","),E.length===4&&C.De({height:parseInt(E[3],10),positionX:parseInt(E[0],10),positionY:parseInt(E[1],10),width:parseInt(E[2],10)})),v.push(C);if(I=r,!v.length){_.s(4);break}return T(_,sl(v[0].N()[0],e.g,e.h.manifest.retryParameters),5);case 5:I=_.h;case 4:return _.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new jt(v),mimeType:I||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Dn(I||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}function Tj(e,t,n,r,i,a,u){var l,p,g;return P(function(v){if(v.g==1)return a?v.s(2):T(v,JI(e,n),3);if(v.g!=2&&(a=v.h),l={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Em(0,t.presentationTimeline.getDuration(),[n]),mimeType:a||"",codecs:u||"",kind:i,encrypted:!1,drmInfos:[],keyIds:new Set,language:r,originalLanguage:r,label:null,type:wt,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Dn(a||"",u||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},p=Dn(l.mimeType,l.codecs),g=Pc(p),!g)throw new $(2,2,2014,a);return v.return(l)})}function JI(e,t){var n;return P(function(r){switch(r.g){case 1:return ve(r,2),T(r,sl(t,e.g,e.h.streaming.retryParameters),4);case 4:n=r.h,V(r,3);break;case 2:W(r);case 3:if(n)return r.return(n);throw new $(1,2,2011,t)}})}function Aj(e,t,n){var r,i,a;return P(function(u){return u.g==1?(r=fa,i=qn([e],n),i.method="GET",T(u,t.request(r,i).promise,2)):(a=u.h,u.return(a.data))})}f.Lc=function(e,t,n,r){var i=this,a;return P(function(u){return u.g==1?(a=new pm({Xb:i.g,onError:t,pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),a.configure(n.drm),T(u,dR(a,e.variants,r),2)):u.g!=3?T(u,a4(a),3):u.return(a)})};function Ej(e,t,n,r){var i=new Map,a=QI(n),u=new Map;a=w(a);for(var l=a.next();!l.done;l=a.next()){l=l.value;var p=Cj(e,t,n,l,r,i);u.set(l.id,p)}for(e=w(n.variants),t=e.next();!t.done;t=e.next())t=t.value,t.audio&&u.get(t.audio.id).variantIds.push(t.id),t.video&&u.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(u.values()),tg:Array.from(i.values())}}function Cj(e,t,n,r,i,a){var u={id:r.id,originalId:r.originalId,groupId:r.groupId,primary:r.primary,type:r.type,mimeType:r.mimeType,codecs:r.codecs,frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,colorGamut:r.colorGamut,videoLayout:r.videoLayout,kind:r.kind,language:r.language,originalLanguage:r.originalLanguage,label:r.label,width:r.width||null,height:r.height||null,encrypted:r.encrypted,keyIds:r.keyIds,segments:[],variantIds:[],roles:r.roles,forced:r.forced,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,closedCaptions:r.closedCaptions,tilesLayout:r.tilesLayout,mssPrivateData:r.mssPrivateData,external:r.external,fastSwitching:r.fastSwitching,isAudioMuxedInVideo:r.isAudioMuxedInVideo},l=i.offline.numberOfParallelDownloads,p=l===0?r.id:0;return Ij(r,n.presentationTimeline.pb(),function(g,v){var y=Ew(g),x=void 0;if(!a.has(y)){var S=g.endTime-g.startTime;S=qI(t,r.id)*S,S=II(e.g,S),a.set(y,new EI(g,S,p,!1,v))}g.$&&(x=Ew(g.$),a.has(x)||(S=.5*qI(t,r.id),S=II(e.g,S),a.set(x,new EI(g.$,S,p,!0,v)))),u.segments.push({pendingInitSegmentRefId:x,initSegmentKey:x?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,pendingSegmentRefId:y,dataKey:0,mimeType:g.mimeType,codecs:g.codecs,thumbnailSprite:g.thumbnailSprite}),l!==0&&(p=(p+1)%l)}),u}function Ij(e,t,n){if(t=e.segmentIndex.find(t),t!=null)for(var r=e.segmentIndex.get(t);r;)n(r,t),r=e.segmentIndex.get(++t)}function _i(e){if(e.j.g)throw new $(2,9,7001)}function Gv(){if(!Lw())throw new $(2,9,9e3)}function Nw(e,t){return P(function(n){return n.g==1?(e.i.push(t),be(n,2),T(n,t,4)):n.g!=2?n.return(n.h):(Se(n),da(e.i,t),te(n,0))})}function Mj(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){da(e.i,n)})}function _j(e){var t=new Set;e=w(e.streams);for(var n=e.next();!n.done;n=e.next()){n=w(n.value.segments);for(var r=n.next();!r.done;r=n.next())r=r.value,r.initSegmentKey!=null&&t.add(r.initSegmentKey),t.add(r.dataKey)}return Array.from(t)}function Dj(e,t,n,r){var i,a,u;return P(function(l){return l.g==1?r.drmInfo?(i=YF(n),a=r.sessionIds.map(function(p){return{sessionId:p,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:YI(r,!1),videoCapabilities:YI(r,!0)}}),T(l,zI(t,e,a),2)):l.return():l.g!=3?(u=l.h,T(l,i.remove(u),3)):T(l,i.add(a.filter(function(p){return!u.includes(p.sessionId)})),0)})}function QI(e){for(var t=new Set,n=w(e.variants),r=n.next();!r.done;r=n.next())r=r.value,r.audio&&t.add(r.audio),r.video&&t.add(r.video);for(n=w(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(e=w(e.imageStreams),n=e.next();!n.done;n=e.next())t.add(n.value);return t}function Pj(e){e.variants.map(function(a){return a.video});var t=new Set(e.variants.map(function(a){return a.audio}));e=e.textStreams;for(var n=w(t),r=n.next();!r.done;r=n.next()){r=w(t);for(var i=r.next();!i.done;i=r.next());}for(t=w(e),n=t.next();!n.done;n=t.next())for(n=w(e),r=n.next();!r.done;r=n.next());}Ee("shaka.offline.Storage",or),or.deleteAll=function(){var e;return P(function(t){return t.g==1?(e=new ei,be(t,2),T(t,JF(e),2)):t.g!=5?(Se(t),T(t,e.destroy(),5)):te(t,0)})},or.prototype.list=or.prototype.list,or.prototype.removeEmeSessions=or.prototype.qj,or.prototype.remove=or.prototype.remove,or.prototype.store=or.prototype.store,or.prototype.getNetworkingEngine=or.prototype.xb,or.prototype.getConfiguration=or.prototype.getConfiguration,or.prototype.configure=or.prototype.configure,or.prototype.destroy=or.prototype.destroy,or.support=Lw;var Lj=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.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");LA("offline",Lw);function Lr(){}function ti(e,t){for(e={priority:t||0,callback:e},t=0;t<Zh.length;t++)if(Zh[t].priority<e.priority){Zh.splice(t,0,e);return}Zh.push(e)}Ee("shaka.polyfill",Lr),Lr.register=ti,Lr.installAll=function(){for(var e=w(Zh),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){Be("Error installing polyfill!",n)}}};var Zh=[];function ZI(){}function eM(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=w(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())Rj(t.value)}function Rj(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(n){n==null||n==null?this.removeAttribute(t):this.setAttribute(t,n)}})}Lr.Aria=ZI,ZI.install=eM,ti(eM);function tM(){}function nM(){Oa()||Rn("Sky_STB")||g8()}Lr.EncryptionScheme=tM,tM.install=nM,ti(nM,-2);function rM(){}function iM(){if(d.Document){var e=Element.prototype;e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||e.webkitRequestFullscreen,e=Document.prototype,e.exitFullscreen=e.exitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen||e.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",md),document.addEventListener("webkitfullscreenerror",md),document.addEventListener("mozfullscreenchange",md),document.addEventListener("mozfullscreenerror",md),document.addEventListener("MSFullscreenChange",md),document.addEventListener("MSFullscreenError",md)}}function md(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}Lr.Fullscreen=rM,rM.install=iM,ti(iM);function Ow(){}function aM(){var e=!0;(la()&&!Cs()&&!j1()||dr()||xc()||Oa()||_o()||Na()||qg()||Sc()&&!dr())&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),oM=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Nj)}function Nj(e){var t,n,r,i,a,u,l,p,g,v,y;return P(function(x){switch(x.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},n=e.video,r=e.audio,e.type!="media-source"){if(e.type=="file"){if(n&&(i=n.contentType,a=jp(i),!a)||r&&(u=r.contentType,l=jp(u),!l))return x.return(t)}else return x.return(t);x.s(2);break}if(!Za())return x.return(t);if(!n){x.s(3);break}return T(x,Oj(n),4);case 4:if(p=x.h,!p)return x.return(t);case 3:if(r){var S=r.contentType;if(la()&&r.spatialRendering&&(S+="; spatialRendering=true"),g=ir(S),!g)return x.return(t)}case 2:return e.keySystemConfiguration?(v=e.keySystemConfiguration,T(x,Uj(n,r,v),6)):(t.supported=!0,x.return(t));case 6:(y=x.h)&&(t.supported=!0,t.keySystemAccess=y);case 5:return x.return(t)}})}function Oj(e){var t,n;return P(function(r){return r.g==1?la()?T(r,Fj(e),3):Na()?(t=e.contentType,e.width&&e.height&&(t+="; width="+e.width,t+="; height="+e.height),e.framerate&&(t+="; framerate="+e.framerate),e.bitrate&&(t+="; bitrate="+e.bitrate),r.return(ir(t))):r.s(2):r.g!=2?(n=r.h,r.return(n)):r.return(ir(e.contentType))})}function Uj(e,t,n){var r,i,a,u,l,p,g,v,y,x,S;return P(function(k){switch(k.g){case 1:if(r=[],i=[],n.audio&&(a={robustness:n.audio.robustness||"",contentType:t.contentType},Na()&&t.contentType.includes('codecs="ac-3"')&&(a.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(a.encryptionScheme=n.audio.encryptionScheme),r.push(a)),n.video&&(u={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(u.encryptionScheme=n.video.encryptionScheme),i.push(u)),l={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},r.length&&(l.audioCapabilities=r),i.length&&(l.videoCapabilities=i),p=e?e.contentType:"",g=t?t.contentType:"",v=di(p)+";"+Rs(p),y=di(g)+";"+Rs(g),x=n.keySystem,S=null,ve(k,2),wc.has(v+"#"+y+"#"+x)){S=wc.get(v+"#"+y+"#"+x)||null,k.s(4);break}return T(k,navigator.requestMediaKeySystemAccess(n.keySystem,[l]),5);case 5:S=k.h,wc.set(v+"#"+y+"#"+x,S);case 4:V(k,3);break;case 2:W(k);case 3:return k.return(S)}})}function Fj(e){var t,n,r,i,a;return P(function(u){if(u.g==1){if(!(d.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return u.return(ir(e.contentType));switch(t=e.contentType,e.width&&e.height&&1280<e.width&&720<e.height&&(t+="; width="+e.width+"; height="+e.height),e.framerate&&(n=Math.round(e.framerate),24>n||30<n)&&(t+="; framerate="+e.framerate),r=e.transferFunction||"",r){case"":case"srgb":break;case"pq":t+="; eotf=smpte2084";break;case"hlg":t+="; eotf=arib-std-b67";break;default:return u.return(!1)}return i=!1,a=jj,a.has(t)?(i=a.get(t),u.s(2)):T(u,cast.__platform__.canDisplayType(t),3)}return u.g!=2&&(i=u.h,a.set(t,i)),u.return(i)})}Lr.MediaCapabilities=Ow,Ow.install=aM;var oM=null;Ow.originalMcap=oM;var jj=new Map;ti(aM,-1);function sM(){}function uM(){var e=Z3();(d.MediaSource||d.ManagedMediaSource)&&(e&&d.MediaSource?12>=e?(Uw(),lM()):15>=e&&Uw():Rn("DT_STB_BCM")?(Uw(),lM()):(Rn("Tizen 2")||Mo()||Rn("Tizen 4"))&&Vj()),(d.MediaSource||d.ManagedMediaSource)&&Bj(),d.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&$j()}function Uw(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,Re.apply(0,arguments));return t.abort=function(){},t}}function lM(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function Bj(){if(d.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return em(n)!="mp2t"&&e(n)}}if(d.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);d.ManagedMediaSource.isTypeSupported=function(n){return em(n)!="mp2t"&&t(n)}}}function Vj(){var e=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(n){return Rs(n)!="opus"&&e(n)},d.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);d.ManagedMediaSource.isTypeSupported=function(n){return Rs(n)!="opus"&&t(n)}}}function $j(){var e=MediaSource.isTypeSupported;_o()||(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),r=n.findIndex(function(u){return u.startsWith("codecs=")});if(0>r)return e(t);var i=n[r].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=i.findIndex(function(u){return u.startsWith("vp09")});return 0<=a&&(i[a]="vp9",n[r]='codecs="'+i.join(",")+'"',t=n.join("; ")),e(t)})}Lr.MediaSource=sM,sM.install=uM,ti(uM);function cM(){}function dM(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=null?zj():d.orientation!=null&&Hj())}function zj(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()}),screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}function Hj(){function e(){switch(d.orientation){case-90:t.type="landscape-secondary",t.angle=270;break;case 0:t.type="portrait-primary",t.angle=0;break;case 90:t.type="landscape-primary",t.angle=90;break;case 180:t.type="portrait-secondary",t.angle=180}}var t=new Kv;screen.orientation=t,e(),d.addEventListener("orientationchange",function(){e();var n=new Ae("change");t.dispatchEvent(n)})}Lr.Orientation=cM,cM.install=dM;function Kv(){Xt.call(this),this.type="",this.angle=0}Te(Kv,Xt),Kv.prototype.lock=function(e){function t(r){return screen.lockOrientation?screen.lockOrientation(r):screen.mozLockOrientation?screen.mozLockOrientation(r):screen.msLockOrientation?screen.msLockOrientation(r):!1}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():(e=Error("screen.orientation.lock() is not available on this device"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},Kv.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},ti(dM);function Fw(){}var jw,Bw,Vw,$w,zw,Hw;function pM(e){d.HTMLVideoElement&&d.WebKitMediaKeys&&(e!==void 0&&e&&(jw=!0,Bw=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Vw=HTMLMediaElement.prototype.setMediaKeys,$w=d.MediaKeys,zw=d.MediaKeySystemAccess,Hw=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Gj,d.MediaKeys=ef,d.MediaKeySystemAccess=Wv,navigator.requestMediaKeySystemAccess=qj,d.shakaMediaKeysPolyfill=Wj,am.clear(),wc.clear())}function qj(e,t){try{var n=new Wv(e,t);return Promise.resolve(n)}catch(r){return Promise.reject(r)}}function Gj(e){var t=this.mediaKeys;return t&&t!=e&&hM(t,null),delete this.mediaKeys,(this.mediaKeys=e)?hM(e,this):Promise.resolve()}function Kj(e){if(e=Ye(e.initData),pn(e).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Is(e.subarray(4),!0),e=ca(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=li(e),this.dispatchEvent(t)}Lr.PatchedMediaKeysApple=Fw,Fw.uninstall=function(){jw&&(jw=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Bw),HTMLMediaElement.prototype.setMediaKeys=Vw,d.MediaKeys=$w,d.MediaKeySystemAccess=zw,navigator.requestMediaKeySystemAccess=Hw,Bw=Hw=Vw=zw=$w=null,d.shakaMediaKeysPolyfill="",am.clear(),wc.clear())},Fw.install=pM;function Wv(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(e=w(t),t=e.next();!t.done;t=e.next()){var n=t.value;if(n.persistentState=="required")t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var r=!1,i=!1;if(n.audioCapabilities)for(var a=w(n.audioCapabilities),u=a.next();!u.done;u=a.next())u=u.value,u.contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(t.audioCapabilities.push(u),i=!0));if(n.videoCapabilities)for(n=w(n.videoCapabilities),a=n.next();!a.done;a=n.next())a=a.value,a.contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,a.contentType.split(";")[0])&&(t.videoCapabilities.push(a),i=!0));r||(i=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=i?t:null}if(t){this.g=t;return}}throw e=Error("Unsupported keySystem"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Wv.prototype.createMediaKeys=function(){var e=new ef(this.keySystem);return Promise.resolve(e)},Wv.prototype.getConfiguration=function(){return this.g};function ef(e){this.h=new WebKitMediaKeys(e),this.g=new Ce}ef.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary")throw new TypeError("Session type "+e+" is unsupported on this platform.");return new qw(this.h)},ef.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function hM(e,t){if(e.g.Qa(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",Kj);try{return Xc(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}ef.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function qw(e){Xt.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new Ce,this.sessionId="",this.expiration=NaN,this.closed=new Wt,this.keyStatuses=new fM}Te(qw,Xt),f=qw.prototype,f.generateRequest=function(e,t){var n=this;this.h=new Wt;try{var r=this.l.createSession("video/mp4",Ye(t));this.i=r,this.sessionId=r.sessionId||"",this.j.D(this.i,"webkitkeymessage",function(i){n.h&&(n.h.resolve(),n.h=null),i=new Map().set("messageType",n.keyStatuses.dc()==null?"license-request":"license-renewal").set("message",li(i.message)),i=new Ae("message",i),n.dispatchEvent(i)}),this.j.D(r,"webkitkeyadded",function(){n.g&&(Xv(n,"usable"),n.g.resolve(),n.g=null)}),this.j.D(r,"webkitkeyerror",function(){var i=Error("EME PatchedMediaKeysApple key error");if(i.errorCode=n.i.error,n.h!=null)n.h.reject(i),n.h=null;else if(n.g!=null)n.g.reject(i),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Xv(n,"output-not-allowed");break;default:Xv(n,"internal-error")}}),Xv(this,"status-pending")}catch(i){this.h.reject(i)}return this.h},f.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},f.update=function(e){this.g=new Wt;try{this.i.update(Ye(e))}catch(t){this.g.reject(t)}return this.g},f.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}catch(e){this.closed.reject(e)}return this.closed},f.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Xv(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new Ae("keystatuseschange"),e.dispatchEvent(t)}function fM(){this.size=0,this.g=void 0}f=fM.prototype,f.dc=function(){return this.g},f.forEach=function(e){this.g&&e(this.g,zg.value())},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=zg.value();return!!(this.g&&ui(e,t))},f.entries=function(){},f.keys=function(){},f.values=function(){};var Wj="apple";ti(function(){d.HTMLVideoElement&&d.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||pM())});function gM(){}function mM(){d.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||Mo()||Rn("Tizen 4")||Rn("Tizen 5.0")||Hg())&&(MediaKeys.prototype.setServerCertificate=Xj)}function Xj(){return Promise.resolve(!1)}Lr.PatchedMediaKeysCert=gM,gM.install=mM,ti(mM);function vM(){}function yM(){if(!(!d.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Yw="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Yj,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Jj,d.MediaKeys=tf,d.MediaKeySystemAccess=Yv,d.shakaMediaKeysPolyfill=Qj}}function Gw(e){var t=Yw;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function Yj(e,t){try{var n=new Yv(e,t);return Promise.resolve(n)}catch(r){return Promise.reject(r)}}function Jj(e){var t=this.mediaKeys;return t&&t!=e&&bM(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&bM(e,this),Promise.resolve()}Lr.PatchedMediaKeysWebkit=vM,vM.install=yM;function Yv(e,t){this.g=this.keySystem=e;var n=!1;e=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video"),t=w(t);for(var a=t.next();!a.done;a=t.next()){a=a.value;var u={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:a.initDataTypes,sessionTypes:["temporary"],label:a.label},l=!1;if(a.audioCapabilities)for(var p=w(a.audioCapabilities),g=p.next();!g.done;g=p.next())g=g.value,g.contentType&&(l=!0,i.canPlayType(g.contentType.split(";")[0],this.g)&&(u.audioCapabilities.push(g),r=!0));if(a.videoCapabilities)for(p=w(a.videoCapabilities),g=p.next();!g.done;g=p.next())g=g.value,g.contentType&&(l=!0,i.canPlayType(g.contentType,this.g)&&(u.videoCapabilities.push(g),r=!0));if(l||(r=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),a.persistentState=="required"&&(n?(u.persistentState="required",u.sessionTypes=["persistent-license"]):r=!1),r){this.h=u;return}}throw n="Unsupported keySystem",(e=="org.w3.clearkey"||e=="com.widevine.alpha")&&(n="None of the requested configurations were supported."),e=Error(n),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Yv.prototype.createMediaKeys=function(){var e=new tf(this.g);return Promise.resolve(e)},Yv.prototype.getConfiguration=function(){return this.h};function tf(e){this.l=e,this.h=null,this.g=new Ce,this.i=[],this.j=new Map}function bM(e,t){e.h=t,e.g.Qa();var n=Yw;t&&(e.g.D(t,n+"needkey",function(r){var i=new CustomEvent("encrypted");i.initDataType="cenc",i.initData=li(r.initData),e.h.dispatchEvent(i)}),e.g.D(t,n+"keymessage",function(r){var i=Kw(e,r.sessionId);i&&(r=new Map().set("messageType",i.keyStatuses.dc()==null?"licenserequest":"licenserenewal").set("message",r.message),r=new Ae("message",r),i.h&&(i.h.resolve(),i.h=null),i.dispatchEvent(r))}),e.g.D(t,n+"keyadded",function(r){(r=Kw(e,r.sessionId))&&r.ready()}),e.g.D(t,n+"keyerror",function(r){var i=Kw(e,r.sessionId);if(i){var a=Error("EME v0.1b key error"),u=r.errorCode;u.systemCode=r.systemCode,a.errorCode=u,!r.sessionId&&i.h?(r.systemCode==45&&(a.message="Unsupported session type."),i.h.reject(a),i.h=null):r.sessionId&&i.g?(i.g.reject(a),i.g=null):(a=r.systemCode,r.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Jv(i,"output-restricted"):a==1?Jv(i,"expired"):Jv(i,"internal-error"))}}))}tf.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary"&&e!="persistent-license")throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new Ww(t,this.l,e),this.i.push(e),e},tf.prototype.setServerCertificate=function(){return Promise.resolve(!1)},tf.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Kw(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function Ww(e,t,n){Xt.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new Wt,this.keyStatuses=new xM}Te(Ww,Xt),f=Ww.prototype,f.ready=function(){Jv(this,"usable"),this.g&&this.g.resolve(),this.g=null};function wM(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if(e.l=="persistent-license")if(n)var r=Ye(ca("LOAD_SESSION|"+n));else{var i=ca("PERSISTENT|");r=En(i,t)}else r=Ye(t)}catch(u){return Promise.reject(u)}e.h=new Wt;var a=Gw("generateKeyRequest");try{e.j[a](e.i,r)}catch(u){if(u.name!="InvalidStateError")return e.h=null,Promise.reject(u);new Tt(function(){try{e.j[a](e.i,r)}catch(l){e.h.reject(l),e.h=null}}).da(.01)}return e.h}function Xw(e,t,n){if(e.g)e.g.then(function(){return Xw(e,t,n)}).catch(function(){return Xw(e,t,n)});else{if(e.g=t,e.i=="webkit-org.w3.clearkey"){var r=yn(n),i=JSON.parse(r);i.keys[0].kty!="oct"&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),r=Gi(i.keys[0].k),i=Gi(i.keys[0].kid)}else r=Ye(n),i=null;var a=Gw("addKey");try{e.j[a](e.i,r,i,e.sessionId)}catch(u){e.g.reject(u),e.g=null}}}function Jv(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new Ae("keystatuseschange"),e.dispatchEvent(t)}f.generateRequest=function(e,t){return wM(this,t,null)},f.load=function(e){return this.l=="persistent-license"?wM(this,null,e):Promise.reject(Error("Not a persistent session."))},f.update=function(e){var t=new Wt;return Xw(this,t,e),t},f.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Gw("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch{}}return this.closed.resolve(),this.closed},f.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function xM(){this.size=0,this.g=void 0}f=xM.prototype,f.dc=function(){return this.g},f.forEach=function(e){this.g&&e(this.g,zg.value())},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=zg.value();return!!(this.g&&ui(e,t))},f.entries=function(){},f.keys=function(){},f.values=function(){};var Yw="",Qj="webkit";ti(yM);function SM(){}function kM(){if(d.HTMLVideoElement){var e=HTMLVideoElement.prototype;e.requestPictureInPicture&&document.exitPictureInPicture||!e.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,e.requestPictureInPicture=eB,Object.defineProperty(e,"disablePictureInPicture",{get:nB,set:rB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=tB,document.addEventListener("webkitpresentationmodechanged",Zj,!0))}}function Zj(e){if(e=e.target,e.webkitPresentationMode=="picture-in-picture"){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function eB(){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 tB(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function nB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function rB(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Lr.PiPWebkit=SM,SM.install=kM,ti(kM);function TM(){}function AM(){d.crypto&&("randomUUID"in d.crypto||(d.crypto.randomUUID=iB))}function iB(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}Lr.RandomUUID=TM,TM.install=AM,ti(AM);function EM(){}function CM(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:aB})}function aB(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}Lr.Symbol=EM,EM.install=CM,ti(CM);function IM(){}function MM(){if(d.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}Lr.VideoPlayPromise=IM,IM.install=MM,ti(MM);function _M(){}function DM(){if(d.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||Hg())&&(e.getVideoPlaybackQuality=oB)}}function oB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Lr.VideoPlaybackQuality=_M,_M.install=DM,ti(DM);function PM(){}function LM(){if(!d.VTTCue&&d.TextTrackCue){var e=null,t=TextTrackCue.length;if(t==3)e=Jw;else if(t==6)e=sB;else{try{var n=!!Jw(1,2,"")}catch{n=!1}n&&(e=Jw)}e&&(d.VTTCue=function(r,i,a){return e(r,i,a)})}}function Jw(e,t,n){return new d.TextTrackCue(e,t,n)}function sB(e,t,n){return new d.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}Lr.VTTCue=PM,PM.install=LM,ti(LM);function Di(){}Di.prototype.parseInit=function(){},Di.prototype.setSequenceMode=function(){},Di.prototype.setManifestType=function(){},Di.prototype.parseMedia=function(e,t){var n=null,r=[];e=yn(e).split(/\r?\n/),e=w(e);for(var i=e.next();!i.done;i=e.next())if((i=i.value)&&!/^\s+$/.test(i)&&(i=uB.exec(i))){var a=lB.exec(i[1]);a=60*parseInt(a[1],10)+parseFloat(a[2].replace(",",".")),i=new un(a,t.segmentEnd?t.segmentEnd:a+2,i[2]),n&&(n.endTime=a,r.push(n)),n=i}return n&&r.push(n),r},Ee("shaka.text.LrcTextParser",Di),Di.prototype.parseMedia=Di.prototype.parseMedia,Di.prototype.setManifestType=Di.prototype.setManifestType,Di.prototype.setSequenceMode=Di.prototype.setSequenceMode,Di.prototype.parseInit=Di.prototype.parseInit;var uB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,lB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;pr("application/x-subtitle-lrc",function(){return new Di});function mi(){}mi.prototype.parseInit=function(){},mi.prototype.setSequenceMode=function(){},mi.prototype.setManifestType=function(){},mi.prototype.parseMedia=function(e,t,n,r){var i=yn(e);if(e=[],i=="")return e;var a=qu(i,"tt",!0);if(!a)throw new $(2,2,2005,"Failed to parse TTML.");if(i=Fa(a,"body")[0],!i)return[];var u=to(a,nf,"frameRate"),l=to(a,nf,"subFrameRate"),p=to(a,nf,"frameRateMultiplier"),g=to(a,nf,"tickRate"),v=to(a,nf,"cellResolution"),y=a.attributes["xml:space"]||"default",x=to(a,e0,"extent");if(y!="default"&&y!="preserve")throw new $(2,2,2005,"Invalid xml:space value: "+y);y=y=="default",u=new fB(u,l,p,g),v=hB(v),l=Fa(a,"metadata")[0],l=(l?l.children:[]).filter(function(C){return C!=`
`}),p=Fa(a,"style"),a=Fa(a,"region"),g=[];for(var S=w(a),k=S.next();!k.done;k=S.next())(k=cB(k.value,p,x))&&g.push(k);if(Gt(i,"p").length)throw new $(2,2,2001,"<p> can only be inside <div> in TTML");for(x=w(Gt(i,"div")),S=x.next();!S.done;S=x.next())if(Gt(S.value,"span").length)throw new $(2,2,2001,"<span> can only be inside <p> in TTML");return(t=RM(i,t,u,l,p,a,g,y,v,null,!1,n,r))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e};function RM(e,t,n,r,i,a,u,l,p,g,v,y,x){var S=g;if(Kg(e)){if(!v)return null;var k={tagName:"span",children:[jn(e)],attributes:{},parent:null}}else k=e;for(var C=null,E=w(HM),I=E.next();!I.done&&!(C=Zv(k,"backgroundImage",r,"#",I.value)[0]);I=E.next());E=null,I=to(k,HM,"backgroundImage");var _=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(I&&_.test(I)){if(E=parseInt(I.split(":").pop(),10)-1,E>=x.length)return null;E=x[E]}else y&&I&&!I.startsWith("#")&&(_=new ee(y),I=new ee(I),(I=_.resolve(I).toString())&&(E=I));if((e.tagName=="p"||C||E)&&(v=!0),e=v,I=(k.attributes["xml:space"]||(l?"default":"preserve"))=="default",_=k.children.every(Kg),l=[],!_)for(var j=w(k.children),B=j.next();!B.done;B=j.next())(B=RM(B.value,t,n,r,i,a,u,I,p,k,v,y,x))&&l.push(B);if(r=g!=null,y=jn(k),y=k.children.length&&y&&/\S/.test(y),j=k.attributes.begin||k.attributes.end||k.attributes.dur,!(j||y||k.tagName=="br"||l.length!=0||r&&!I))return null;for(x=UM(k,n),y=x.start,x=x.end;S&&S.tagName&&S.tagName!="tt";)x=pB(S,n,y,x),y=x.start,x=x.end,S=S.parent;if(y==null&&(y=0),y+=t.periodStart,x=x==null?1/0:x+t.periodStart,y=Math.max(y,t.segmentStart),x=Math.min(x,t.segmentEnd),!j&&0<l.length)for(y=1/0,x=0,t=w(l),n=t.next();!n.done;n=t.next())n=n.value,y=Math.min(y,n.startTime),x=Math.max(x,n.endTime);if(k.tagName=="br")return i=new un(y,x,""),i.lineBreak=!0,i;if(t="",_&&(t=Wr(jn(k)||""),I&&(t=t.replace(/\s+/g," "))),t=new un(y,x,t),t.nestedCues=l,v||(t.isContainer=!0),p&&(t.cellResolution=p),p=Zv(k,"region",a,"")[0],k.attributes.region&&p&&p.attributes["xml:id"]){var q=p.attributes["xml:id"];t.region=u.filter(function(O){return O.id==q})[0]}return u=p,g&&r&&!k.attributes.region&&!k.attributes.style&&(u=Zv(g,"region",a,"")[0]),dB(t,k,u,C,E,i,e,l.length==0),t}function cB(e,t,n){var r=new Vu,i=e.attributes["xml:id"];if(!i)return null;r.id=i,i=null,n&&(i=nx.exec(n)||rx.exec(n)),n=i?Number(i[1]):null,i=i?Number(i[2]):null;var a,u=Qv(e,t,"extent");if(u){var l=(a=nx.exec(u))||rx.exec(u);l!=null&&(r.width=Number(l[1]),r.height=Number(l[2]),a||(n!=null&&(r.width=100*r.width/n),i!=null&&(r.height=100*r.height/i)),r.widthUnits=a||n!=null?ci:0,r.heightUnits=a||i!=null?ci:0)}return(e=Qv(e,t,"origin"))&&(l=(a=nx.exec(e))||rx.exec(e),l!=null&&(r.viewportAnchorX=Number(l[1]),r.viewportAnchorY=Number(l[2]),a?u||(r.width=100-r.viewportAnchorX,r.widthUnits=ci,r.height=100-r.viewportAnchorY,r.heightUnits=ci):(i!=null&&(r.viewportAnchorY=100*r.viewportAnchorY/i),n!=null&&(r.viewportAnchorX=100*r.viewportAnchorX/n)),r.viewportAnchorUnits=a||n!=null?ci:0)),r}function Qw(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&(t=t[1].split(","),t.length==4)?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function dB(e,t,n,r,i,a,u,l){if(u=u||l,kr(t,n,a,"direction",u)=="rtl"&&(e.direction="rtl"),l=kr(t,n,a,"writingMode",u),l=="tb"||l=="tblr"?e.writingMode="vertical-lr":l=="tbrl"?e.writingMode="vertical-rl":l=="rltb"||l=="rl"?e.direction="rtl":l&&(e.direction=Yp),(l=kr(t,n,a,"textAlign",!0))?(e.positionAlign=vB.get(l),e.lineAlign=mB.get(l),e.textAlign=nb[l.toUpperCase()]):e.textAlign=ro,(l=kr(t,n,a,"displayAlign",!0))&&(e.displayAlign=w5[l.toUpperCase()]),(l=kr(t,n,a,"color",u))&&(e.color=Qw(l)),(l=kr(t,n,a,"backgroundColor",u))&&(e.backgroundColor=Qw(l)),(l=kr(t,n,a,"border",u))&&(e.border=l),l=kr(t,n,a,"fontFamily",u))switch(l){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=l.split(",").filter(function(p){return p!="default"}).join(",")}switch((l=kr(t,n,a,"fontWeight",u))&&l=="bold"&&(e.fontWeight=Mc),l=kr(t,n,a,"wrapOption",u),e.wrapLine=!(l&&l=="noWrap"),(l=kr(t,n,a,"lineHeight",u))&&l.match(vd)&&(e.lineHeight=l),(l=kr(t,n,a,"fontSize",u))&&(l.match(vd)||l.match(gB))&&(e.fontSize=l),(l=kr(t,n,a,"fontStyle",u))&&(e.fontStyle=T5[l.toUpperCase()]),r?(i=r.attributes.imageType||r.attributes.imagetype,l=r.attributes.encoding,r=jn(r).trim(),i=="PNG"&&l=="Base64"&&r&&(e.backgroundImage="data:image/png;base64,"+r)):i&&(e.backgroundImage=i),(r=kr(t,n,a,"textOutline",u))&&(r=r.split(" "),r[0].match(vd)?e.textStrokeColor=e.color:(e.textStrokeColor=Qw(r[0]),r.shift()),r[0]&&r[0].match(vd)?e.textStrokeWidth=r[0]:e.textStrokeColor=""),(r=kr(t,n,a,"letterSpacing",u))&&r.match(vd)&&(e.letterSpacing=r),(r=kr(t,n,a,"linePadding",u))&&r.match(vd)&&(e.linePadding=r),(r=kr(t,n,a,"opacity",u))&&(e.opacity=parseFloat(r)),(r=Qv(n,a,"textDecoration"))&&NM(e,r),(r=Zw(t,a,"textDecoration"))&&NM(e,r),(r=kr(t,n,a,"textCombine",u))&&(e.textCombineUpright=r),kr(t,n,a,"ruby",u)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}function NM(e,t){t=w(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(No)||e.textDecoration.push(No);break;case"noUnderline":e.textDecoration.includes(No)&&da(e.textDecoration,No);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&da(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&da(e.textDecoration,"overline")}}function kr(e,t,n,r,i){return i=i===void 0?!0:i,(e=Zw(e,n,r))?e:i?Qv(t,n,r):null}function Qv(e,t,n){if(!e)return null;var r=to(e,e0,n);return r||OM(e,t,n)}function Zw(e,t,n){var r=to(e,e0,n);return r||OM(e,t,n)}function OM(e,t,n){e=Zv(e,"style",t,"");for(var r=null,i=0;i<e.length;i++){var a=Lo(e[i],"urn:ebu:tt:style",n);a||(a=to(e[i],e0,n)),a||(a=Zw(e[i],t,n)),a&&(r=a)}return r}function Zv(e,t,n,r,i){var a=[];if(!e||1>n.length)return a;var u=e;for(e=null;!e&&!(e=i?Lo(u,i,t):u.attributes[t])&&(u=u.parent,u););if(t=e){for(t=w(t.split(" ")),i=t.next();!i.done;i=t.next())for(i=i.value,e=w(n),u=e.next();!u.done;u=e.next())if(u=u.value,r+u.attributes["xml:id"]==i){a.push(u);break}}return a}function pB(e,t,n,r){return e=UM(e,t),n==null?n=e.start:e.start!=null&&(n+=e.start),r==null?r=e.end:e.start!=null&&(r+=e.start),{start:n,end:r}}function UM(e,t){var n=ex(e.attributes.begin,t),r=ex(e.attributes.end,t);return e=ex(e.attributes.dur,t),r==null&&e!=null&&(r=n+e),{start:n,end:r}}function ex(e,t){var n=null;if(FM.test(e)){e=FM.exec(e),n=Number(e[1]);var r=Number(e[2]),i=Number(e[3]),a=Number(e[4]);a+=(Number(e[5])||0)/t.h,i+=a/t.frameRate,n=i+60*r+3600*n}else if(jM.test(e))n=tx(jM,e);else if(BM.test(e))n=tx(BM,e);else if(VM.test(e))e=VM.exec(e),n=Number(e[1])/t.frameRate;else if($M.test(e))e=$M.exec(e),n=Number(e[1])/t.g;else if(zM.test(e))n=tx(zM,e);else if(e)throw new $(2,2,2001,"Could not parse cue time range in TTML");return n}function tx(e,t){return e=e.exec(t),e==null||e[0]==""?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function hB(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{oc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}Ee("shaka.text.TtmlTextParser",mi),mi.prototype.parseMedia=mi.prototype.parseMedia,mi.prototype.setManifestType=mi.prototype.setManifestType,mi.prototype.setSequenceMode=mi.prototype.setSequenceMode,mi.prototype.parseInit=mi.prototype.parseInit;function fB(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),this.g==0&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}var nx=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,gB=/^(\d{1,4}(?:\.\d+)?|100)%$/,vd=/^(\d+px|\d+em|\d*\.?\d+c)$/,rx=/^(\d+)px (\d+)px$/,FM=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,jM=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,BM=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,VM=/^(\d*(?:\.\d*)?)f$/,$M=/^(\d*(?:\.\d*)?)t$/,zM=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),mB=new Map().set("left",Ku).set("center","center").set("right","end").set("start",Ku).set("end","end"),vB=new Map().set("left","line-left").set("center","center").set("right","line-right"),nf=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],e0=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],HM=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];pr("application/ttml+xml",function(){return new mi});function Kn(){this.g=new mi}Kn.prototype.parseInit=function(e){var t=!1;if(new Qt().box("moov",xt).box("trak",xt).box("mdia",xt).box("minf",xt).box("stbl",xt).R("stsd",Os).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new $(2,2,2007)},Kn.prototype.setSequenceMode=function(){},Kn.prototype.setManifestType=function(){},Kn.prototype.parseMedia=function(e,t,n){var r=[],i=null,a=[],u=new Map,l=[];if(new Qt().box("moof",xt).box("traf",xt).R("tfhd",function(I){i=fm(I.reader,I.flags).md}).R("trun",function(I){I=vm(I.reader,I.version,I.flags),I=w(I.fg);for(var _=I.next();!_.done;_=I.next())l.push(_.value.sampleSize||i||0)}).R("subs",function(I){for(var _=I.reader,j=_.S(),B=-1,q=0;q<j;q++){var O=_.S();B+=O,O=_.na();for(var R=[],H=0;H<O;H++)I.version==1?R.push(_.S()):R.push(_.na()),_.X(),_.X(),_.S();u.set(B,R)}}).box("mdat",Fc(function(I){a.push(I)})).parse(e,!1),a.length==0)throw new $(2,2,2007);for(var p=En.apply(vr,U(a)),g=0,v=0;v<l.length;v++){var y=Ye(p,g,l[v]);g+=l[v];var x=u.get(v);if(x&&x.length){y=Ye(y,0,x[0]);for(var S=[],k=x[0],C=1;C<x.length;C++){var E=Ye(e,k,x[C]);E=Gg(E),S.push("data:image/png;base64,"+E),k+=x[C]}r=r.concat(this.g.parseMedia(y,t,n,S))}else r=r.concat(this.g.parseMedia(y,t,n,[]))}return r},Ee("shaka.text.Mp4TtmlParser",Kn),Kn.prototype.parseMedia=Kn.prototype.parseMedia,Kn.prototype.setManifestType=Kn.prototype.setManifestType,Kn.prototype.setSequenceMode=Kn.prototype.setSequenceMode,Kn.prototype.parseInit=Kn.prototype.parseInit,pr('application/mp4; codecs="stpp"',function(){return new Kn}),pr('application/mp4; codecs="stpp.ttml"',function(){return new Kn}),pr('application/mp4; codecs="stpp.ttml.im1i"',function(){return new Kn}),pr('application/mp4; codecs="stpp.ttml.im1t"',function(){return new Kn}),pr('application/mp4; codecs="stpp.ttml.im2i"',function(){return new Kn}),pr('application/mp4; codecs="stpp.ttml.im2t"',function(){return new Kn}),pr('application/mp4; codecs="stpp.ttml.etd1"',function(){return new Kn}),pr('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new Kn}),pr('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new Kn}),pr('application/mp4; codecs="stpp.TTML.im1t"',function(){return new Kn});function $r(){this.g="UNKNOWN"}$r.prototype.parseInit=function(){},$r.prototype.setSequenceMode=function(){},$r.prototype.setManifestType=function(e){this.g=e},$r.prototype.parseMedia=function(e,t){e=yn(e),e=e.replace(/\r\n|\r(?=[^\n]|$)/gm,`
`);var n=e.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new $(2,2,2e3);if(e=t.vttOffset,this.g=="HLS")if(n[0].includes("X-TIMESTAMP-MAP")){var r=n[0];if(e=r.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),r=r.match(/MPEGTS:(\d+)/m),!e||!r)throw new $(2,2,2e3);if(e=Ic(e[1]),e==null)throw new $(2,2,2e3);r=Number(r[1]);for(var i=t.segmentStart-t.periodStart;95443.7176888889<=i;)i-=95443.7176888889,r+=8589934592;e=t.periodStart+r/9e4-e}else t.periodStart&&t.vttOffset==t.periodStart&&(e=0);for(t=[],r=w(n[0].split(`
`)),i=r.next();!i.done;i=r.next())if(i=i.value,/^Region:/.test(i)){i=new Ec(i);var a=new Vu;zu(i),Cc(i);for(var u=zu(i);u;){var l=a,p=u;(u=/^id=(.*)$/.exec(p))?l.id=u[1]:(u=/^width=(\d{1,2}|100)%$/.exec(p))?l.width=Number(u[1]):(u=/^lines=(\d+)$/.exec(p))?(l.height=Number(u[1]),l.heightUnits=2):(u=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(p))?(l.regionAnchorX=Number(u[1]),l.regionAnchorY=Number(u[2])):(u=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(p))?(l.viewportAnchorX=Number(u[1]),l.viewportAnchorY=Number(u[2])):/^scroll=up$/.exec(p)&&(l.scroll="up"),Cc(i),u=zu(i)}t.push(a)}for(r=new Map,y5(r),i=[],n=w(n.slice(1)),a=n.next();!a.done;a=n.next()){if(a=a.value.split(`
`),(a.length!=1||a[0])&&!/^NOTE($|[ \t])/.test(a[0])&&a[0]=="STYLE"){for(l=[],u=-1,p=1;p<a.length;p++)a[p].includes("::cue")&&(l.push([]),u=l.length-1),u!=-1&&(l[u].push(a[p]),a[p].includes("}")&&(u=-1));for(l=w(l),u=l.next();!u.done;u=l.next()){var g=u.value;u="global",(p=g[0].match(/\((.*)\)/))&&(u=p.pop()),p=g.slice(1,-1),g[0].includes("}")&&(g=/\{(.*?)\}/.exec(g[0]))&&(p=g[1].split(";")),(g=r.get(u))||(g=new un(0,0,""));for(var v=!1,y=0;y<p.length;y++){var x=/^\s*([^:]+):\s*(.*)/.exec(p[y]);if(x){var S=x[2].trim().replace(";","");switch(x[1].trim()){case"background-color":case"background":v=!0,g.backgroundColor=S;break;case"color":v=!0,g.color=S;break;case"font-family":v=!0,g.fontFamily=S;break;case"font-size":v=!0,g.fontSize=S;break;case"font-weight":(700<=parseInt(S,10)||S=="bold")&&(v=!0,g.fontWeight=Mc);break;case"font-style":switch(S){case"normal":v=!0,g.fontStyle=ib;break;case"italic":v=!0,g.fontStyle=_c;break;case"oblique":v=!0,g.fontStyle="oblique"}break;case"opacity":v=!0,g.opacity=parseFloat(S);break;case"text-combine-upright":v=!0,g.textCombineUpright=S;break;case"text-shadow":v=!0,g.textShadow=S;break;case"white-space":v=!0,g.wrapLine=S!="noWrap"}}}v&&r.set(u,g)}}if(g=a,v=e,g.length==1&&!g[0]||/^NOTE($|[ \t])/.test(g[0])||g[0]=="STYLE"||g[0]=="REGION")a=null;else if(a=null,g[0].includes("-->")||(a=g[0],g.splice(0,1)),l=new Ec(g[0]),u=qp(l),y=$u(l,/[ \t]+--\x3e[ \t]+/g),p=qp(l),u==null||y==null||p==null)Be("Failed to parse VTT time code. Cue skipped:",a,g),a=null;else{for(u+=v,p+=v,v=g.slice(1).join(`
`).trim(),r.has("global")?(g=r.get("global").clone(),g.startTime=u,g.endTime=p,g.payload=v):g=new un(u,p,v),Cc(l),u=zu(l);u;)qM(g,u,t),Cc(l),u=zu(l);Qg(g,r),a!=null&&(g.id=a),a=g}a&&i.push(a)}return i};function qM(e,t,n){var r;(r=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=r[1],t=="middle"?e.textAlign=ro:e.textAlign=nb[t.toUpperCase()]):(r=/^vertical:(lr|rl)$/.exec(t))?e.writingMode=r[1]=="lr"?"vertical-lr":"vertical-rl":(r=/^size:([\d.]+)%$/.exec(t))?e.size=Number(r[1]):(r=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign=t=="line-left"||t=="start"?"line-left":t=="line-right"||t=="end"?"line-right":t=="center"||t=="middle"?"center":Zg)):(r=/^region:(.*)$/.exec(t))?(t=yB(n,r[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=rb[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=Jp,e.line=Number(n[1]),n[2]&&(e.lineAlign=rb[n[2].toUpperCase()]))}function yB(e,t){return e=e.filter(function(n){return n.id==t}),e.length?e[0]:null}Ee("shaka.text.VttTextParser",$r),$r.prototype.parseMedia=$r.prototype.parseMedia,$r.prototype.setManifestType=$r.prototype.setManifestType,$r.prototype.setSequenceMode=$r.prototype.setSequenceMode,$r.prototype.parseInit=$r.prototype.parseInit,pr("text/vtt",function(){return new $r}),pr('text/vtt; codecs="vtt"',function(){return new $r}),pr('text/vtt; codecs="wvtt"',function(){return new $r});function Pi(){this.g=null}Pi.prototype.parseInit=function(e){var t=this,n=!1;if(new Qt().box("moov",xt).box("trak",xt).box("mdia",xt).R("mdhd",function(r){r=mm(r.reader,r.version),t.g=r.timescale}).box("minf",xt).box("stbl",xt).R("stsd",Os).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new $(2,2,2008);if(!n)throw new $(2,2,2008)},Pi.prototype.setSequenceMode=function(){},Pi.prototype.setManifestType=function(){},Pi.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new $(2,2,2008);var n=0,r=[],i,a=[],u=!1,l=!1,p=!1,g=null;if(new Qt().box("moof",xt).box("traf",xt).R("tfdt",function(j){u=!0,n=gm(j.reader,j.version).baseMediaDecodeTime}).R("tfhd",function(j){g=fm(j.reader,j.flags).ld}).R("trun",function(j){l=!0,r=vm(j.reader,j.version,j.flags).fg}).box("mdat",Fc(function(j){p=!0,i=j})).parse(e,!1),!p&&!u&&!l)throw new $(2,2,2008);e=n;for(var v=new ln(i,0),y=w(r),x=y.next();!x.done;x=y.next()){x=x.value;var S=x.gg||g,k=x.ye?n+x.ye:e;e=k+(S||0);var C=0;do{var E=v.S();C+=E;var I=v.S(),_=null;cm(I)=="vttc"?8<E&&(_=v.Cb(E-8)):v.skip(E-8),S&&_&&(E=bB(_,t.periodStart+k/this.g,t.periodStart+e/this.g),a.push(E))}while(x.sampleSize&&C<x.sampleSize)}return a.filter(Ns)};function bB(e,t,n){var r,i,a;return new Qt().box("payl",Fc(function(u){r=yn(u)})).box("iden",Fc(function(u){i=yn(u)})).box("sttg",Fc(function(u){a=yn(u)})).parse(e),r?wB(r,i,a,t,n):null}function wB(e,t,n,r,i){if(e=new un(r,i,e),Qg(e),t&&(e.id=t),n)for(t=new Ec(n),n=zu(t);n;)qM(e,n,[]),Cc(t),n=zu(t);return e}Ee("shaka.text.Mp4VttParser",Pi),Pi.prototype.parseMedia=Pi.prototype.parseMedia,Pi.prototype.setManifestType=Pi.prototype.setManifestType,Pi.prototype.setSequenceMode=Pi.prototype.setSequenceMode,Pi.prototype.parseInit=Pi.prototype.parseInit,pr('application/mp4; codecs="wvtt"',function(){return new Pi});function Li(){}Li.prototype.parseInit=function(){},Li.prototype.setSequenceMode=function(){},Li.prototype.setManifestType=function(){},Li.prototype.parseMedia=function(e){var t=yn(e).replace(/\r+/g,"");if(t=t.trim(),e=[],t=="")return e;t=w(t.split(`

`));for(var n=t.next();!n.done;n=t.next()){n=n.value.split(`
`);var r=new Ec(n[0]),i=qp(r),a=$u(r,/,/g);if(r=qp(r),i==null||a==null||r==null)throw new $(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new un(i,r,n.slice(1).join(`
`).trim()))}return e},Ee("shaka.text.SbvTextParser",Li),Li.prototype.parseMedia=Li.prototype.parseMedia,Li.prototype.setManifestType=Li.prototype.setManifestType,Li.prototype.setSequenceMode=Li.prototype.setSequenceMode,Li.prototype.parseInit=Li.prototype.parseInit,pr("text/x-subviewer",function(){return new Li});function vi(){this.g=new $r}vi.prototype.parseInit=function(){},vi.prototype.setSequenceMode=function(){},vi.prototype.setManifestType=function(){},vi.prototype.parseMedia=function(e,t,n){return e=yn(e),e=GM(e),e=Ye(ca(e)),this.g.parseMedia(e,t,n,[])};function GM(e){var t=`WEBVTT

`;if(e=="")return t;e=e.replace(/\r+/g,""),e=e.trim(),e=w(e.split(`

`));for(var n=e.next();!n.done;n=e.next())n=n.value.split(/\n/),n[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join(`
`).replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+`

`;return t}Ee("shaka.text.SrtTextParser",vi),vi.srt2webvtt=GM,vi.prototype.parseMedia=vi.prototype.parseMedia,vi.prototype.setManifestType=vi.prototype.setManifestType,vi.prototype.setSequenceMode=vi.prototype.setSequenceMode,vi.prototype.parseInit=vi.prototype.parseInit,pr("text/srt",function(){return new vi});function Ri(){}Ri.prototype.parseInit=function(){},Ri.prototype.setSequenceMode=function(){},Ri.prototype.setManifestType=function(){},Ri.prototype.parseMedia=function(e){var t="",n="",r=null,i=null;for(i=yn(e).split(/\r?\n\s*\r?\n/),e=w(i),i=e.next();!i.done;i=e.next()){var a=i.value;i=a,(a=SB.exec(a))&&(r=a[1],i=a[2]),r=="V4 Styles"||r=="V4+ Styles"?(t=i,t=n?t+(`
`+i):i):r=="Events"&&(n=n?n+(`
`+i):i)}for(r=[],i=null,t=w(t.split(/\r?\n/)),e=t.next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(a=XM.exec(e))){if(e=a[1].trim(),a=a[2].trim(),e=="Format")i=a.split(t0);else if(e=="Style"){e=a.split(t0),a={};for(var u=0;u<i.length&&u<e.length;u++)a[i[u]]=e[u];r.push(a)}}for(i=[],t=null,n=w(n.split(/\r?\n/)),a=n.next(),e={};!a.done;e={Dh:void 0},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(u=XM.exec(a))){if(a=u[1].trim(),u=u[2].trim(),a=="Format")t=u.split(t0);else if(a=="Dialogue"){u=u.split(t0),a={};for(var l=0;l<t.length&&l<u.length;l++)a[t[l]]=u[l];l=WM(a.Start);var p=WM(a.End);u=new un(l,p,u.slice(t.length-1).join(",").replace(/\\N/g,`
`).replace(/\{[^}]+\}/g,"")),e.Dh=a.Style,(e=r.find(function(g){return function(v){return v.Name==g.Dh}}(e)))&&xB(u,e),i.push(u)}}return i};function xB(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=KM(n))&&(e.color=n),(n=t.BackColour)&&(n=KM(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=Mc),t.Italic&&(e.fontStyle=_c),t.Underline&&e.textDecoration.push(No),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=Xp,e.textAlign="start";break;case 2:e.displayAlign=Xp,e.textAlign=ro;break;case 3:e.displayAlign=Xp,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=ro;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=ro;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function KM(e){return e=parseInt(e.replace("&H",""),16),0<=e?"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function WM(e){return e=kB.exec(e),3600*(e[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Ee("shaka.text.SsaTextParser",Ri),Ri.prototype.parseMedia=Ri.prototype.parseMedia,Ri.prototype.setManifestType=Ri.prototype.setManifestType,Ri.prototype.setSequenceMode=Ri.prototype.setSequenceMode,Ri.prototype.parseInit=Ri.prototype.parseInit;var SB=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,XM=/^\s*([^:]+):\s*(.*)/,t0=/\s*,\s*/,kB=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;pr("text/x-ssa",function(){return new Ri});function YM(e,t){var n=e[t+1]&1?7:9;return t+n<=e.length&&(e=((e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5)-n,0<e)?{ud:n,ia:e}:null}function JM(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=(e[t+2]&60)>>>2;if(r>n.length-1)return null;var i=((e[t+2]&192)>>>6)+1,a=(e[t+2]&1)<<2;return a|=(e[t+3]&192)>>>6,{sampleRate:n[r],channelCount:a,codec:"mp4a.40."+i}}function QM(e,t){if(t+1<e.length&&e[t]===255&&(e[t+1]&246)===240){var n=e[t+1]&1?7:9;if(t+n>=e.length)return!1;var r=(e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5;return r<=n?!1:(t+=r,t===e.length||t+1<e.length&&e[t]===255&&(e[t+1]&246)===240)}return!1}function TB(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)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(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)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(t===2||t===3)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 Ni(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Ni.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/aac"?ir(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(pi(t)||"mp4a.40.2")+'"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){for(var i=Ye(e),a=$c(i),u=a.length;u<i.length&&!QM(i,u);u++);if(e=1e3*n.endTime,a=nl(a),a.length&&n&&(a=a.find(function(v){return v.description==="com.apple.streaming.transportStreamTimestamp"}))&&(e=a.data),a=JM(i,u),!a)return Promise.reject(new $(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=a.sampleRate,t.channelsCount=a.channelCount;for(var l=[];u<i.length;){var p=YM(i,u);if(!p)return Promise.reject(new $(2,3,3018,n?n.N()[0]:null));var g=p.ud+p.ia;u+g<=i.length&&l.push({data:i.subarray(u+p.ud,u+g),size:p.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),u+=g}return i=a.sampleRate,e=Math.floor(e*i/1e3),r={id:t.id,type:"audio",codecs:a.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:i,duration:r,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:e,jb:l},stream:t},r=new el([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Vc(r),this.g.set(n,t)),n=this.i!==t,r=dh(r),this.i=t,this.h++,n?(t=En(t,r),Promise.resolve(t)):Promise.resolve(r)},Ee("shaka.transmuxer.AacTransmuxer",Ni),Ni.prototype.transmux=Ni.prototype.transmux,Ni.prototype.getOriginalMimeType=Ni.prototype.getOriginalMimeType,Ni.prototype.convertCodecs=Ni.prototype.convertCodecs,Ni.prototype.isSupported=Ni.prototype.isSupported,Ni.prototype.destroy=Ni.prototype.destroy,Oo("audio/aac",function(){return new Ni("audio/aac")},Ls);function ZM(e,t){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return null;var n=e[t+4]>>6;if(3<=n)return null;var r=e[t+4]&63,i=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,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*r+n];if(t+i>e.length)return null;var a=e[t+6]>>5,u=0;a===2?u+=2:(a&1&&a!==1&&(u+=2),a&4&&(u+=2)),u=(e[t+6]<<8|e[t+7])>>12-u&1;var l=e[t+5]&7;return e=new Uint8Array([n<<6|e[t+5]>>3<<1|l>>2,(l&3)<<6|a<<3|u<<2|r>>4,r<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][a]+u,ra:e,ia:i}}function AB(e,t){if(e[t]===11&&e[t+1]===119){var n=0,r=5;t+=r;for(var i,a;0<r;){a=e[t];var u=Math.min(r,8),l=8-u;i=4278190080>>>24+l<<l,i=(a&i)>>l,n=n?n<<u|i:i,t+=1,r-=u}if(16>n)return!0}return!1}function Ji(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Ji.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ac3"?ir(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ac3"?Mo()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){e=Ye(e);for(var i=$c(e),a=i.length;a<e.length&&!AB(e,a);a++);var u=1e3*n.endTime;i=nl(i),i.length&&n&&(i=i.find(function(v){return v.description==="com.apple.streaming.transportStreamTimestamp"}))&&(u=i.data),i=0;for(var l=new Uint8Array([]),p=[];a<e.length;){var g=ZM(e,a);if(!g)return Promise.reject(new $(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=g.sampleRate,t.channelsCount=g.channelCount,i=g.sampleRate,l=g.ra,p.push({data:e.subarray(a,a+g.ia),size:g.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),a+=g.ia}return e=Math.floor(u*i/1e3),r={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:i,duration:r,lb:[],ra:l,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:e,jb:p},stream:t},r=new el([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Vc(r),this.g.set(n,t)),n=this.i!==t,r=dh(r),this.i=t,this.h++,n?(t=En(t,r),Promise.resolve(t)):Promise.resolve(r)},Ee("shaka.transmuxer.Ac3Transmuxer",Ji),Ji.prototype.transmux=Ji.prototype.transmux,Ji.prototype.getOriginalMimeType=Ji.prototype.getOriginalMimeType,Ji.prototype.convertCodecs=Ji.prototype.convertCodecs,Ji.prototype.isSupported=Ji.prototype.isSupported,Ji.prototype.destroy=Ji.prototype.destroy,Oo("audio/ac3",function(){return new Ji("audio/ac3")},Ls);function e8(e,t){if(t+8>e.length||(e[t]<<8|e[t+1]<<0)!==2935)return null;var n=new zo(e.subarray(t+2));gi(n,2),gi(n,3);var r=It(n,11)+1<<1,i=It(n,2);if(i==3){i=It(n,2),i=[24e3,22060,16e3][i];var a=3}else i=[48e3,44100,32e3][i],a=It(n,2);var u=It(n,3),l=It(n,1);return n=It(n,5),t+r>e.byteLength?null:(e=Math.floor(r*i/(16*[1,2,3,6][a])),e=new Uint8Array([(e&8160)>>5,(e&31)<<3,i<<6|n<<1|0,0|u<<1|l<<0,0]),{sampleRate:i,channelCount:[2,1,2,3,3,4,4,5][u]+l,ra:e,ia:r})}function Qi(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Qi.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ec3"?ir(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){e=Ye(e);for(var i=$c(e),a=i.length;a<e.length&&(e[a]<<8|e[a+1]<<0)!==2935;a++);var u=1e3*n.endTime;i=nl(i),i.length&&n&&(i=i.find(function(v){return v.description==="com.apple.streaming.transportStreamTimestamp"}))&&(u=i.data),i=0;for(var l=new Uint8Array([]),p=[];a<e.length;){var g=e8(e,a);if(!g)return Promise.reject(new $(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=g.sampleRate,t.channelsCount=g.channelCount,i=g.sampleRate,l=g.ra,p.push({data:e.subarray(a,a+g.ia),size:g.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),a+=g.ia}return e=Math.floor(u*i/1e3),r={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:i,duration:r,lb:[],ra:l,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:e,jb:p},stream:t},r=new el([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Vc(r),this.g.set(n,t)),n=this.i!==t,r=dh(r),this.i=t,this.h++,n?(t=En(t,r),Promise.resolve(t)):Promise.resolve(r)},Ee("shaka.transmuxer.Ec3Transmuxer",Qi),Qi.prototype.transmux=Qi.prototype.transmux,Qi.prototype.getOriginalMimeType=Qi.prototype.getOriginalMimeType,Qi.prototype.convertCodecs=Qi.prototype.convertCodecs,Qi.prototype.isSupported=Qi.prototype.isSupported,Qi.prototype.destroy=Qi.prototype.destroy,Oo("audio/ec3",function(){return new Qi("audio/ec3")},Ls);function EB(e){if(!e.length)return null;var t=e.find(function(C){return C.type==7});if(e=e.find(function(C){return C.type==8}),!t||!e)return null;var n=new zo(t.data),r=Ht(n);if(Ht(n),Ht(n),Jr(n),IB.includes(r)&&(r=Le(n),r===3&&gi(n,1),Jr(n),Jr(n),gi(n,1),ze(n))){r=r!==3?8:12;for(var i=0;i<r;i++)ze(n)&&(6>i?xm(n,16):xm(n,64))}if(Jr(n),r=Le(n),r===0)Le(n);else if(r===1)for(gi(n,1),Jr(n),Jr(n),r=Le(n),i=0;i<r;i++)Jr(n);Jr(n),gi(n,1);var a=Le(n),u=Le(n),l=It(n,1);l===0&&gi(n,1),gi(n,1);var p=0,g=0,v=0,y=0;if(ze(n)&&(p=Le(n),g=Le(n),v=Le(n),y=Le(n)),i=r=1,ze(n)&&ze(n)){var x=Ht(n),S=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],k=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<x&&16>=x?(r=S[x-1],i=k[x-1]):x===255&&(r=It(n,16),i=It(n,16))}return n=(2-l)*(u+1)*16-2*v-2*y,a=16*(a+1)-2*p-2*g,p=[],t=t.fullData,p.push(t.byteLength>>>8&255),p.push(t.byteLength&255),p=p.concat.apply(p,U(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(e.byteLength&255),t=t.concat.apply(t,U(e)),e=new Uint8Array([1,p[3],p[4],p[5],255,225].concat(p,[1],t)),{height:n,width:a,Ca:e,Ia:r,Ka:i}}function CB(e){function t(k){i={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:k.pts,dts:k.dts,nalus:[]}}function n(){if(i&&i.nalus.length&&i.frame){for(var k=[],C=w(i.nalus),E=C.next();!E.done;E=C.next()){E=E.value;var I=E.fullData.byteLength,_=new Uint8Array(4);_[0]=I>>24&255,_[1]=I>>16&255,_[2]=I>>8&255,_[3]=I&255,k.push(_),k.push(E.fullData)}i.data=En.apply(vr,U(k)),r.push(i)}}for(var r=[],i=null,a=!1,u=0;u<e.length;u++){var l=e[u],p=l.nalus,g=!1;i&&p.length&&!a&&(n(),t(l)),p=w(l.nalus);for(var v=p.next();!v.done;v=p.next()){v=v.value;var y=!1;switch(v.type){case 1:var x=!1;y=!0;var S=v.data;g&&4<S.length&&(S=YR(new zo(S)),S===2||S===4||S===7||S===9)&&(x=!0),x&&i&&i.frame&&!i.isKeyframe&&(n(),i=null),i||t(l),i.frame=!0,i.isKeyframe=x;break;case 5:y=!0,i&&i.frame&&!i.isKeyframe&&(n(),i=null),i||t(l),i.frame=!0,i.isKeyframe=!0;break;case 6:y=!0;break;case 7:g=y=!0;break;case 8:y=!0;break;case 9:a=y=!0,i&&i.frame&&(n(),i=null),i||t(l);break;case 12:y=!0;break;default:y=!1}i&&y&&i.nalus.push(v)}}return n(),r}var IB=[100,110,122,244,44,83,86,118,128,138,139,134];function MB(e){if(!e.length)return null;var t=e.find(function(u){return u.type==32}),n=e.find(function(u){return u.type==33}),r=e.find(function(u){return u.type==34});if(!t||!n||!r)return null;var i=_B(t.fullData);e=DB(n.fullData);var a=PB(r.fullData);return t=LB(t.fullData,n.fullData,r.fullData,{Uf:i.Uf,rg:i.rg,Ef:e.Ef,Ff:e.Ff,yf:e.yf,Df:e.Df,zf:e.zf,Af:e.Af,Bf:e.Bf,Cf:e.Cf,rf:e.rf,tf:e.tf,uf:e.uf,vf:e.vf,wf:e.wf,xf:e.xf,hf:e.hf,le:e.le,ff:e.ff,ef:e.ef,df:e.df,Wf:a.Wf}),{height:e.height,width:e.width,Ca:t,Ia:e.vj,Ka:e.uj}}function _B(e){var t=new zo(e,!0);return Ht(t),Ht(t),It(t,4),It(t,2),It(t,6),e=It(t,3),t=ze(t),{Uf:e+1,rg:t}}function DB(e){e=new zo(e,!0),Ht(e),Ht(e);var t=0,n=0,r=0,i=0;It(e,4);var a=It(e,3);ze(e);for(var u=It(e,2),l=It(e,1),p=It(e,5),g=Ht(e),v=Ht(e),y=Ht(e),x=Ht(e),S=Ht(e),k=Ht(e),C=Ht(e),E=Ht(e),I=Ht(e),_=Ht(e),j=Ht(e),B=[],q=[],O=0;O<a;O++)B.push(ze(e)),q.push(ze(e));if(0<a)for(O=a;8>O;O++)It(e,2);for(O=0;O<a;O++)B[O]&&It(e,88),q[O]&&Ht(e);Le(e),B=Le(e),B==3&&It(e,1),q=Le(e),O=Le(e),ze(e)&&(t+=Le(e),n+=Le(e),r+=Le(e),i+=Le(e));var R=Le(e),H=Le(e),z=Le(e);if(ze(e))for(var Y=0;Y<=a;Y++)Le(e),Le(e),Le(e);else Le(e),Le(e),Le(e);if(Le(e),Le(e),Le(e),Le(e),Le(e),Le(e),ze(e)&&ze(e))for(Y=0;4>Y;Y++)for(var K=0;K<(Y===3?2:6);K++)if(ze(e)){var J=Math.min(64,1<<4+(Y<<1));1<Y&&zc(e);for(var ae=0;ae<J;ae++)zc(e)}else Le(e);for(ze(e),ze(e),ze(e)&&(Ht(e),Le(e),Le(e),ze(e)),Y=Le(e),J=K=0;J<Y;J++)if(ae=!1,J!==0&&(ae=ze(e)),ae){J===Y&&Le(e),ze(e),Le(e);for(var ne=ae=0;ne<=K;ne++){var ue=ze(e),se=!1;ue||(se=ze(e)),(ue||se)&&ae++}K=ae}else{for(ne=Le(e),ae=Le(e),K=ne+ae,ue=0;ue<ne;ue++)Le(e),ze(e);for(ne=0;ne<ae;ne++)Le(e),ze(e)}if(ze(e))for(Y=Le(e),K=0;K<Y;K++){for(J=0;J<z+4;J++)It(e,1);It(e,1)}if(Y=z=1,K=0,ze(e),ze(e),ze(e)){if(ze(e)&&(J=Ht(e),ae=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],ne=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<J&&16>=J?(z=ae[J-1],Y=ne[J-1]):J===255&&(z=It(e,16),Y=It(e,16))),ze(e)&&ze(e),ze(e)&&(It(e,3),ze(e),ze(e)&&(Ht(e),Ht(e),Ht(e))),ze(e)&&(Le(e),Le(e)),ze(e),ze(e),ze(e),(J=ze(e))&&(Le(e),Le(e),Le(e),Le(e)),ze(e)&&(It(e,32),It(e,32),ze(e)&&Le(e),ze(e)))for(ne=!1,J=ze(e),ae=ze(e),(J||ae)&&((ne=ze(e))&&(Ht(e),It(e,5),ze(e),It(e,5)),It(e,4),It(e,4),ne&&It(e,4),It(e,5),It(e,5),It(e,5)),ue=0;ue<=a;ue++){var he=!0;se=1,ze(e)||(he=ze(e));var xe=!1;if(he?Le(e):xe=ze(e),xe||(se=Le(e)+1),J){for(he=0;he<se;he++)Le(e),Le(e),ne&&(Le(e),Le(e));ze(e)}if(ae){for(he=0;he<se;he++)Le(e),Le(e),ne&&(Le(e),Le(e));ze(e)}}ze(e)&&(ze(e),ze(e),ze(e),K=Le(e),Le(e),Le(e),Le(e),Le(e))}return{yf:j,Ef:u,Ff:l,Df:p,zf:g,Af:v,Bf:y,Cf:x,rf:S,tf:k,uf:C,vf:E,wf:I,xf:_,le:K,hf:0,ff:B,ef:R,df:H,width:q-(t+n)*(B===1||B===2?2:1),height:O-(r+i)*(B===1?2:1),vj:z,uj:Y}}function PB(e){var t=new zo(e,!0);Ht(t),Ht(t),Le(t),Le(t),ze(t),ze(t),It(t,3),ze(t),ze(t),Le(t),Le(t),zc(t),ze(t),ze(t),ze(t)&&Le(t),zc(t),zc(t),ze(t),ze(t),ze(t),ze(t),e=ze(t),t=ze(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Wf:n}}function LB(e,t,n,r){var i=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));return i[0]=1,i[1]=(r.Ef&3)<<6|(r.Ff?1:0)<<5|r.Df&31,i[2]=r.zf,i[3]=r.Af,i[4]=r.Bf,i[5]=r.Cf,i[6]=r.rf,i[7]=r.tf,i[8]=r.uf,i[9]=r.vf,i[10]=r.wf,i[11]=r.xf,i[12]=r.yf,i[13]=240|(r.le&3840)>>8,i[14]=r.le&255,i[15]=252|r.Wf&3,i[16]=252|r.ff&3,i[17]=248|r.ef&7,i[18]=248|r.df&7,i[19]=0,i[20]=0,i[21]=(r.hf&3)<<6|(r.Uf&7)<<3|(r.rg?1:0)<<2|3,i[22]=3,i[23]=160,i[24]=0,i[25]=1,i[26]=(e.byteLength&65280)>>8,i[27]=(e.byteLength&255)>>0,i.set(e,28),i[23+(5+e.byteLength)]=161,i[e.byteLength+29]=0,i[e.byteLength+30]=1,i[e.byteLength+31]=(t.byteLength&65280)>>8,i[e.byteLength+32]=(t.byteLength&255)>>0,i.set(t,e.byteLength+33),i[23+(e.byteLength+10+t.byteLength)]=162,i[e.byteLength+10+t.byteLength+24]=0,i[e.byteLength+10+t.byteLength+25]=1,i[e.byteLength+10+t.byteLength+26]=(n.byteLength&65280)>>8,i[e.byteLength+10+t.byteLength+27]=(n.byteLength&255)>>0,i.set(n,e.byteLength+10+t.byteLength+28),i}function n0(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,a=e[t+2]>>2&3;if(n!==1&&i!==0&&i!==15&&a!==3){var u=e[t+3]>>6;i=1e3*RB[14*(n===3?3-r:r===3?3:4)+i-1],a=NB[3*(n===3?0:n===2?1:2)+a],n=OB[n][r];var l=UB[r],p=Math.floor(n*i/a+(e[t+2]>>1&1))*l,g=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(g=g?parseInt(g[1],10):0)&&87>=g&&r===2&&224e3<=i&&u===0&&(e[t+3]|=128),{sampleRate:a,channelCount:u===3?1:2,ia:p,tj:8*n*l}}return null}function t8(e,t){return e[t]===255&&(e[t+1]&224)===224&&(e[t+1]&6)!==0}function n8(e,t){if(t+1<e.length&&t8(e,t)){var n=n0(e,t),r=4;return n&&n.ia&&(r=n.ia),t+=r,t===e.length||t+1<e.length&&t8(e,t)}return!1}var RB=[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],NB=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],OB=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],UB=[0,1,1,4];function Zi(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Zi.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/mpeg"?ir(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){for(var i=Ye(e),a=$c(i).length;a<i.length&&!n8(i,a);a++);var u;for(e=[];a<i.length;){var l=n0(i,a);if(!l)return Promise.reject(new $(2,3,3018,n?n.N()[0]:null));u||(u=l),a+l.ia<=i.length&&e.push({data:i.subarray(a,a+l.ia),size:l.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),a+=l.ia}return u?(i=9e4*u.tj/u.sampleRate*this.h,r={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:u.sampleRate,duration:r,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:i,jb:e},stream:t},r=new el([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Vc(r),this.g.set(n,t)),n=this.i!==t,r=dh(r),this.i=t,this.h++,n?(t=En(t,r),Promise.resolve(t)):Promise.resolve(r)):Promise.reject(new $(2,3,3018,n?n.N()[0]:null))},Ee("shaka.transmuxer.Mp3Transmuxer",Zi),Zi.prototype.transmux=Zi.prototype.transmux,Zi.prototype.getOriginalMimeType=Zi.prototype.getOriginalMimeType,Zi.prototype.convertCodecs=Zi.prototype.convertCodecs,Zi.prototype.isSupported=Zi.prototype.isSupported,Zi.prototype.destroy=Zi.prototype.destroy,Oo("audio/mpeg",function(){return new Zi("audio/mpeg")},Ls);function ea(e){this.h=e,this.g=null}f=ea.prototype,f.destroy=function(){},f.isSupported=function(e){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var t=pi(e).split(","),n=Xr("audio",t);return t=Xr("video",t),!n||t||yr(n)!="mp3"?!1:ir(this.convertCodecs("audio",e))},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":t},f.getOriginalMimeType=function(){return this.h},f.transmux=function(e,t,n,r,i){if(this.g?this.g.clearData():this.g=new hn,e=Ye(e),e=this.g.parse(e),e.od().audio!="mp3"||i!="audio")return Promise.reject(new $(2,3,3018,n?n.N()[0]:null));for(n=new Uint8Array([]),i=w(e.fb()),e=i.next();!e.done;e=i.next())if(e=e.value.data)for(t=0;t<e.length;)(r=n0(e,t))?(t+r.ia<=e.length&&(n=En(n,e.subarray(t,t+r.ia))),t+=r.ia):t++;return Promise.resolve(n)},Ee("shaka.transmuxer.MpegTsTransmuxer",ea),ea.prototype.transmux=ea.prototype.transmux,ea.prototype.getOriginalMimeType=ea.prototype.getOriginalMimeType,ea.prototype.convertCodecs=ea.prototype.convertCodecs,ea.prototype.isSupported=ea.prototype.isSupported,ea.prototype.destroy=ea.prototype.destroy,Oo("video/mp2t",function(){return new ea("video/mp2t")},ob);/*
 @license
 MSS Transmuxer
 Copyright 2015 Dash Industry Forum
 SPDX-License-Identifier: BSD-3-Clause
*/function Oi(e){this.h=e,(this.g=cw.get("ISOBoxer")())&&FB(this)}function FB(e){function t(){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(n){this._procEntryField(n,"InitializationVector","data",8),this.flags&2&&(this._procEntryField(n,"NumberOfEntries","uint",16),this._procSubEntries(n,"clearAndCryptedData",n.NumberOfEntries,function(r){this._procEntryField(r,"BytesOfClearData","uint",16),this._procEntryField(r,"BytesOfEncryptedData","uint",32)}))})}e.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",this.version===1?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var n=!0,r=0;16>r;r++)this.usertype[r]!==jB[r]&&(n=!1);n&&(this._parsing&&(this.type="sepiff"),t.call(this))})}f=Oi.prototype,f.destroy=function(){},f.isSupported=function(e,t){var n=e.startsWith("mss/");return!this.g||!n?!1:t?ir(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),ir(t)||ir(e))},f.convertCodecs=function(e,t){return t.replace("mss/","")},f.getOriginalMimeType=function(){return this.h},f.transmux=function(e,t,n){if(!n)return Promise.resolve(Ye(e));if(!t.mssPrivateData)return Promise.reject(new $(2,3,3020,n?n.N()[0]:null));try{var r,i=this.g.parseBuffer(e),a=i.fetch("tfhd");a.track_ID=t.id+1;var u=i.fetch("tfdt"),l=i.fetch("traf");u===null&&(u=this.g.createFullBox("tfdt",l,a),u.version=1,u.flags=0,u.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var p=i.fetch("trun"),g=i.fetch("tfxd");g&&g._parent.boxes.splice(g._parent.boxes.indexOf(g),1);var v=i.fetch("tfrf");v&&v._parent.boxes.splice(v._parent.boxes.indexOf(v),1);var y=i.fetch("sepiff");if(y!==null){y.type="senc",y.usertype=void 0;var x=i.fetch("saio");if(x===null){x=this.g.createFullBox("saio",l),x.version=0,x.flags=0,x.entry_count=1,x.offset=[0];var S=this.g.createFullBox("saiz",l);if(S.version=0,S.flags=0,S.sample_count=y.sample_count,S.default_sample_info_size=0,S.sample_info_size=[],y.flags&2)for(r=0;r<y.sample_count;r+=1)S.sample_info_size[r]=10+6*y.entry[r].NumberOfEntries;else S.default_sample_info_size=8}}a.flags&=16777214,a.flags|=131072,p.flags|=1;var k=i.fetch("moof");p.data_offset=k.getLength()+8;var C=i.fetch("saio");C!==null&&(C.offset[0]=r8(k,"traf")+r8(l,"senc")+16);var E=Ye(i.write());return Promise.resolve(E)}catch(I){return I instanceof $?Promise.reject(I):Promise.reject(new $(2,3,3022,n?n.N()[0]:null))}};function r8(e,t){for(var n=8,r=0;r<e.boxes.length&&e.boxes[r].type!==t;r++)n+=e.boxes[r].size;return n}Ee("shaka.transmuxer.MssTransmuxer",Oi),Oi.prototype.transmux=Oi.prototype.transmux,Oi.prototype.getOriginalMimeType=Oi.prototype.getOriginalMimeType,Oi.prototype.convertCodecs=Oi.prototype.convertCodecs,Oi.prototype.isSupported=Oi.prototype.isSupported,Oi.prototype.destroy=Oi.prototype.destroy;var jB=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Oo("mss/audio/mp4",function(){return new Oi("mss/audio/mp4")},Ls),Oo("mss/video/mp4",function(){return new Oi("mss/video/mp4")},Ls);function ta(e){this.m=e,this.g=0,this.i=new Map,this.l=this.h=this.j=null}f=ta.prototype,f.destroy=function(){this.i.clear(),this.h&&this.h.destroy()},f.isSupported=function(e,t){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var n=e;t&&(n=this.convertCodecs(t,e));var r=pi(n).split(",");return n=Xr("audio",r),r=Xr("video",r),n&&(n=yr(n),!BB.includes(n))||r&&(n=yr(r),!VB.includes(n))?!1:t?ir(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),ir(t)||ir(e))},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?(t=pi(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return th(n,"audio/mp4")}).map(fb).join(","),e=="audio"?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},f.getOriginalMimeType=function(){return this.m},f.transmux=function(e,t,n,r,i){var a=Ye(e);if(i=="audio"&&!Hc(a)){for(var u=$c(a),l=u.length;l<a.length;l++)if(n8(a,l))return Promise.reject(new $(2,3,3018,n?n.N()[0]:null));for(l=u.length;l<a.length;l++)if(QM(a,l))return this.h||(this.h=new Ni("audio/aac")),this.h.transmux(e,t,n,r,i);return Promise.reject(new $(2,3,3018,n?n.N()[0]:null))}this.j?this.j.clearData():this.j=new hn;var p=this.j.parse(a),g=[],v=p.od();try{var y=null;if(i=="video"){switch(v.video){case"avc":var x=[],S=null,k=p.wc(),C=CB(k);if(!C.length)throw new $(2,3,3023,n?n.N()[0]:null);for(var E=0;E<C.length;E++){var I=C[E];S==null&&(S=I.dts);var _=void 0;_=E+1<C.length?(C[E+1].dts||0)-(I.dts||0):1<C.length?(I.dts||0)-(C[E-1].dts||0):9e4*(n.endTime-n.startTime),x.push({data:I.data,size:I.data.byteLength,duration:_,eb:Math.round((I.pts||0)-(I.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:I.isKeyframe?2:1,ib:I.isKeyframe?0:1}})}for(var j=[],B=w(k),q=B.next();!q.done;q=B.next())j.push.apply(j,U(q.value.nalus));var O=EB(j);if(!O||S==null)throw new $(2,3,3018,n?n.N()[0]:null);t.height=O.height,t.width=O.width,y={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:r,lb:[],ra:new Uint8Array([]),Ca:O.Ca,Ia:O.Ia,Ka:O.Ka,data:{Db:this.g,baseMediaDecodeTime:S,jb:x},stream:t};break;case"hvc":var R=[],H=null,z=[],Y=p.wc();if(!Y.length)throw new $(2,3,3023,n?n.N()[0]:null);for(var K=0;K<Y.length;K++){var J=Y[K],ae=J.nalus;z.push.apply(z,U(ae));for(var ne=!1,ue=[],se=!1,he=w(ae),xe=he.next();!xe.done;xe=he.next()){var tt=xe.value;switch(tt.type){case 1:case 0:var Fe=se=!0;break;case 19:case 20:case 21:ne=Fe=se=!0;break;case 32:Fe=!0;break;case 33:Fe=!0;break;case 34:Fe=!0;break;case 35:se=Fe=!0;break;case 39:case 40:Fe=!0;break;default:Fe=!1}if(se&&Fe){var Vt=tt.fullData.byteLength,At=new Uint8Array(4);At[0]=Vt>>24&255,At[1]=Vt>>16&255,At[2]=Vt>>8&255,At[3]=Vt&255,ue.push(At),ue.push(tt.fullData)}}var gt=ue.length?{data:En.apply(vr,U(ue)),isKeyframe:ne}:null;if(gt){H==null&&J.dts!=null&&(H=J.dts);var vt=void 0;vt=K+1<Y.length?(Y[K+1].dts||0)-(J.dts||0):1<Y.length?(J.dts||0)-(Y[K-1].dts||0):9e4*(n.endTime-n.startTime),R.push({data:gt.data,size:gt.data.byteLength,duration:vt,eb:Math.round((J.pts||0)-(J.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:gt.isKeyframe?2:1,ib:gt.isKeyframe?0:1}})}}var Rt=MB(z);if(!Rt||H==null)throw new $(2,3,3018,n?n.N()[0]:null);t.height=Rt.height,t.width=Rt.width,y={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:r,lb:[],ra:new Uint8Array([]),Ca:Rt.Ca,Ia:Rt.Ia,Ka:Rt.Ka,data:{Db:this.g,baseMediaDecodeTime:H,jb:R},stream:t}}y&&(g.push(y),y=null)}if(i=="audio"){switch(v.audio){case"aac":for(var pt=[],Et,ot=null,ht=null,Zt=null,Wn=w(p.fb()),Sn=Wn.next();!Sn.done;Sn=Wn.next()){var Tn=Sn.value,Vn=Tn.data;if(Vn){var er=0;if(ht==-1&&Zt)Vn=En(Zt,Tn.data),ht=null;else if(ht!=null&&Zt){er=Math.max(0,ht);var fl=En(Zt,Vn.subarray(0,er));pt.push({data:fl,size:fl.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),ht=Zt=null}if(Et=JM(Vn,er),!Et)throw new $(2,3,3018,n?n.N()[0]:null);for(t.audioSamplingRate=Et.sampleRate,t.channelsCount=Et.channelCount,ot==null&&Tn.pts!==null&&(ot=Tn.pts);er<Vn.length;){var Zo=YM(Vn,er);if(!Zo){Zt=Vn.subarray(er,Vn.length),ht=-1;break}var Ws=Zo.ud+Zo.ia;ht=Math.max(0,er+Ws-Vn.length),ht!=0?Zt=Vn.subarray(er+Zo.ud,er+Ws):er+Ws<=Vn.length&&pt.push({data:Vn.subarray(er+Zo.ud,er+Ws),size:Zo.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),er+=Ws}}}if(!Et||ot==null){if(!p.wc().length)throw new $(2,3,3018,n?n.N()[0]:null);ot=9e4*n.startTime;var na=Xr("audio",t.codecs.split(","));if(!na||!t.channelsCount||!t.audioSamplingRate)throw new $(2,3,3018,n?n.N()[0]:null);Et={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:na};var sx=TB(na,t.channelsCount);if(!sx)throw new $(2,3,3018,n?n.N()[0]:null);for(var KB=ot+9e4*(n.endTime-n.startTime),y8=ot;y8<KB;)pt.push({data:sx,size:sx.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),y8+=1024/Et.sampleRate*9e4}var b8=Et.sampleRate,WB=ot/9e4*b8;y={id:t.id,type:"audio",codecs:Et.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:b8,duration:r,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:WB,jb:pt},stream:t};break;case"ac3":for(var w8=[],i0=0,ux=new Uint8Array([]),a0=null,x8=w(p.fb()),lx=x8.next();!lx.done;lx=x8.next()){var cx=lx.value,dx=cx.data;a0==null&&cx.pts!==null&&(a0=cx.pts);for(var yd=0;yd<dx.length;){var Xs=ZM(dx,yd);Xs?(t.audioSamplingRate=Xs.sampleRate,t.channelsCount=Xs.channelCount,i0=Xs.sampleRate,ux=Xs.ra,w8.push({data:dx.subarray(yd,yd+Xs.ia),size:Xs.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),yd+=Xs.ia):yd++}}if(i0==0||ux.byteLength==0||a0==null)throw new $(2,3,3018,n?n.N()[0]:null);var XB=a0/9e4*i0;y={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:i0,duration:r,lb:[],ra:ux,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:XB,jb:w8},stream:t};break;case"ec3":for(var S8=[],o0=0,px=new Uint8Array([]),s0=null,k8=w(p.fb()),hx=k8.next();!hx.done;hx=k8.next()){var fx=hx.value,gx=fx.data;s0==null&&fx.pts!==null&&(s0=fx.pts);for(var bd=0;bd<gx.length;){var Ys=e8(gx,bd);Ys?(t.audioSamplingRate=Ys.sampleRate,t.channelsCount=Ys.channelCount,o0=Ys.sampleRate,px=Ys.ra,S8.push({data:gx.subarray(bd,bd+Ys.ia),size:Ys.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),bd+=Ys.ia):bd++}}if(o0==0||px.byteLength==0||s0==null)throw new $(2,3,3018,n?n.N()[0]:null);var YB=s0/9e4*o0;y={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:o0,duration:r,lb:[],ra:px,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:YB,jb:S8},stream:t};break;case"mp3":for(var T8=[],u0,l0=null,A8=w(p.fb()),mx=A8.next();!mx.done;mx=A8.next()){var vx=mx.value,of=vx.data;if(of){l0==null&&vx.pts!==null&&(l0=vx.pts);for(var gl=0;gl<of.length;){var wd=n0(of,gl);wd?(u0||(u0=wd),gl+wd.ia<=of.length&&T8.push({data:of.subarray(gl,gl+wd.ia),size:wd.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),gl+=wd.ia):gl++}}}if(!u0||l0==null)throw new $(2,3,3018,n?n.N()[0]:null);var E8=u0.sampleRate,JB=l0/9e4*E8;y={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:E8,duration:r,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:JB,jb:T8},stream:t};break;case"opus":var C8=[],c0=null,oo=p.F;if(!oo)throw new $(2,3,3018,n?n.N()[0]:null);var zr=[];switch(oo.Zh){case 1:case 2:zr=[0];break;case 0:zr=[255,1,1,0,1];break;case 128:zr=[255,2,0,0,1];break;case 3:zr=[1,2,1,0,2,1];break;case 4:zr=[1,2,2,0,1,2,3];break;case 5:zr=[1,3,2,0,4,1,2,3];break;case 6:zr=[1,4,2,0,4,1,2,3,5];break;case 7:zr=[1,4,2,0,4,1,2,3,5,6];break;case 8:zr=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:zr=[1,1,2,0,1];break;case 131:zr=[1,1,3,0,1,2];break;case 132:zr=[1,1,4,0,1,2,3];break;case 133:zr=[1,1,5,0,1,2,3,4];break;case 134:zr=[1,1,6,0,1,2,3,4,5];break;case 135:zr=[1,1,7,0,1,2,3,4,5,6];break;case 136:zr=[1,1,8,0,1,2,3,4,5,6,7]}for(var I8=new Uint8Array([0,oo.channelCount,0,0,oo.sampleRate>>>24&255,oo.sampleRate>>>17&255,oo.sampleRate>>>8&255,oo.sampleRate>>>0&255,0,0].concat(U(zr))),M8=oo.sampleRate,_8=w(p.fb()),yx=_8.next();!yx.done;yx=_8.next()){var bx=yx.value,xd=bx.data;c0==null&&bx.pts!==null&&(c0=bx.pts);for(var sf=0;sf<xd.length;){for(var QB=(xd[sf+1]&16)!==0,ZB=(xd[sf+1]&8)!==0,es=sf+2,d0=0;xd[es]===255;)d0+=255,es+=1;d0+=xd[es],es+=1,es+=QB?2:0,es+=ZB?2:0;var D8=xd.slice(es,es+d0);C8.push({data:D8,size:D8.byteLength,duration:960,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),sf=es+d0}}if(I8.byteLength==0||c0==null)throw new $(2,3,3018,n?n.N()[0]:null);t.audioSamplingRate=oo.sampleRate,t.channelsCount=oo.channelCount;var eV=c0/9e4*M8;y={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:M8,duration:r,lb:[],ra:I8,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:eV,jb:C8},stream:t}}y&&(g.push(y),y=null)}}catch(xx){return xx&&xx.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(xx)}if(!g.length)return Promise.reject(new $(2,3,3018,n?n.N()[0]:null));var P8=new el(g),wx=t.id+"_"+n.i;if(this.i.has(wx))var uf=this.i.get(wx);else uf=Vc(P8),this.i.set(wx,uf);var tV=this.l!==uf,L8=dh(P8);if(this.l=uf,this.g++,tV){var nV=En(uf,L8);return Promise.resolve(nV)}return Promise.resolve(L8)},Ee("shaka.transmuxer.TsTransmuxer",ta),ta.prototype.transmux=ta.prototype.transmux,ta.prototype.getOriginalMimeType=ta.prototype.getOriginalMimeType,ta.prototype.convertCodecs=ta.prototype.convertCodecs,ta.prototype.isSupported=ta.prototype.isSupported,ta.prototype.destroy=ta.prototype.destroy;var BB=["aac","ac-3","ec-3","mp3","opus"],VB=["avc","hevc"];Oo("video/mp2t",function(){return new ta("video/mp2t")},sb);function i8(){}Te(i8,Qr),Ee("shaka.util.FairPlayUtils",i8);/*
 @license
 EME Encryption Scheme Polyfill
 Copyright 2019 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/function a8(){}var rf;function o8(){rf||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(rf=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=$B,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function $B(e,t){var n=this,r;return P(function(i){return i.g==1?(console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),T(i,rf.call(n,e,t),2)):(r=i.h,f8(r)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=rf,i.return(r)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=s8,i.return(s8.call(n,e,t))))})}function s8(e,t){var n=this,r,i,a,u,l,p,g,v,y,x,S,k;return P(function(C){if(C.g==1){for(console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),r=h8(e),i=[],a=w(t),u=a.next();!u.done;u=a.next())l=u.value,p=u8(l.videoCapabilities,r),g=u8(l.audioCapabilities,r),l.videoCapabilities&&l.videoCapabilities.length&&!p.length||l.audioCapabilities&&l.audioCapabilities.length&&!g.length||(v=Object.assign({},l),v.videoCapabilities=p,v.audioCapabilities=g,i.push(v));if(!i.length)throw y=Error("Unsupported keySystem or supportedConfigurations."),y.name="NotSupportedError",y.code=DOMException.NOT_SUPPORTED_ERR,y;return T(C,rf.call(n,e,i),2)}return x=C.h,k=S=null,i[0]&&(i[0].videoCapabilities&&(S=i[0].videoCapabilities[0].encryptionScheme),i[0].audioCapabilities&&(k=i[0].audioCapabilities[0].encryptionScheme)),C.return(new r0(x,S,k))})}function u8(e,t){return e&&e.filter(function(n){return ix(n.encryptionScheme,t)})}Ee("EmeEncryptionSchemePolyfill",a8),a8.install=o8;function l8(){}var af;function c8(){af||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(af=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=zB,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function zB(e){var t=this,n,r;return P(function(i){switch(i.g){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),T(i,af.call(t,e),2);case 2:if(n=i.h,!n.supported||!e.keySystemConfiguration)return i.return(n);if((r=n.keySystemAccess)&&f8(r))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=af,i.return(n);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=d8,r){i.s(3);break}return T(i,p8(e),4);case 4:return n.keySystemAccess=i.h,i.return(n);case 3:return i.return(d8.call(t,e))}})}function d8(e){var t=this,n,r,i,a,u,l,p;return P(function(g){switch(g.g){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),r=n=null,!e.keySystemConfiguration||(i=e.keySystemConfiguration,a=i.keySystem,r=i.audio&&i.audio.encryptionScheme,n=i.video&&i.video.encryptionScheme,u=h8(a),l={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},ix(r,u)&&ix(n,u))?T(g,af.call(t,e),2):g.return(l);case 2:if(p=g.h,p.keySystemAccess){p.keySystemAccess=new r0(p.keySystemAccess,n,r),g.s(3);break}if(!e.keySystemConfiguration){g.s(3);break}return T(g,p8(e),5);case 5:p.keySystemAccess=g.h;case 3:return g.return(p)}})}function p8(e){var t,n;return P(function(r){if(r.g==1){var i=e.keySystemConfiguration,a=[],u=[];return i.audio&&a.push({robustness:i.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:i.audio.encryptionScheme}),i.video&&u.push({robustness:i.video.robustness||"",contentType:e.video.contentType,encryptionScheme:i.video.encryptionScheme}),i={initDataTypes:i.initDataType?[i.initDataType]:[],distinctiveIdentifier:i.distinctiveIdentifier,persistentState:i.persistentState,sessionTypes:i.sessionTypes},a.length&&(i.audioCapabilities=a),u.length&&(i.videoCapabilities=u),t=i,T(r,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=r.h,r.return(n)})}Ee("McEncryptionSchemePolyfill",l8),l8.install=c8;function r0(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}r0.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=w(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(t=w(e.audioCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},r0.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function h8(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs":e.startsWith("com.huawei")?"cenc":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function f8(e){e=e.getConfiguration();var t=e.audioCapabilities&&e.audioCapabilities[0];return!!((e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&e.encryptionScheme!==void 0)}function ix(e,t){return!!(!e||e==t||(e=="cbcs"||e=="cbcs-1-9")&&(qB||GB||HB))}function ax(){}function g8(){o8(),c8()}Ee("EncryptionSchemePolyfills",ax),ax.install=g8;var HB=navigator.userAgent.includes("CrKey"),qB=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10),ox,m8=navigator.userAgent||"";if(m8.includes("Web0S")){var v8=m8.match(/Chrome\/(\d+)/);ox=v8?79<=parseInt(v8[1],10):!1}else ox=!1;var GB=ox;typeof b<"u"&&b.exports&&(b.exports=ax)}).call(c,s,s,void 0);for(var h in c.shaka)o[h]=c.shaka[h]})()})(r_);const gn=O8(r_);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Mx="lit-localize-status";/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const MV=o=>typeof o!="string"&&"strTag"in o,i_=(o,s,c)=>{let h=o[0];for(let d=1;d<o.length;d++)h+=s[c?c[d-1]:d-1],h+=o[d];return h};/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const a_=o=>MV(o)?i_(o.strings,o.values):o;let le=a_,o_=!1;function _V(o){if(o_)throw new Error("lit-localize can only be configured once");le=o,o_=!0}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class DV{constructor(s){this.__litLocalizeEventHandler=c=>{c.detail.status==="ready"&&this.host.requestUpdate()},this.host=s}hostConnected(){window.addEventListener(Mx,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(Mx,this.__litLocalizeEventHandler)}}const PV=o=>o.addController(new DV(o)),LV=PV;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const _x=()=>(o,s)=>(o.addInitializer(LV),o);/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class s_{constructor(){this.settled=!1,this.promise=new Promise((s,c)=>{this._resolve=s,this._reject=c})}resolve(s){this.settled=!0,this._resolve(s)}reject(s){this.settled=!0,this._reject(s)}}/**
 * @license
 * Copyright 2014 Travis Webb
 * SPDX-License-Identifier: MIT
 */const ts=[];for(let o=0;o<256;o++)ts[o]=(o>>4&15).toString(16)+(o&15).toString(16);function RV(o){let s=0,c=8997,h=0,d=33826,m=0,b=40164,f=0,A=52210;for(let M=0;M<o.length;M++)c^=o.charCodeAt(M),s=c*435,h=d*435,m=b*435,f=A*435,m+=c<<8,f+=d<<8,h+=s>>>16,c=s&65535,m+=h>>>16,d=h&65535,A=f+(m>>>16)&65535,b=m&65535;return ts[A>>8]+ts[A&255]+ts[b>>8]+ts[b&255]+ts[d>>8]+ts[d&255]+ts[c>>8]+ts[c&255]}/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const NV="",OV="h",UV="s";function FV(o,s){return(s?OV:UV)+RV(typeof o=="string"?o:o.join(NV))}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const u_=new WeakMap,l_=new Map;function jV(o,s,c){if(o){const h=c?.id??BV(s),d=o[h];if(d){if(typeof d=="string")return d;if("strTag"in d)return i_(d.strings,s.values,d.values);{let m=u_.get(d);return m===void 0&&(m=d.values,u_.set(d,m)),{...d,values:m.map(b=>s.values[b])}}}}return a_(s)}function BV(o){const s=typeof o=="string"?o:o.strings;let c=l_.get(s);return c===void 0&&(c=FV(s,typeof o!="string"&&!("strTag"in o)),l_.set(s,c)),c}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function Dx(o){window.dispatchEvent(new CustomEvent(Mx,{detail:o}))}let y0="",Px,c_,b0,Lx,d_,bl=new s_;bl.resolve();let w0=0;const VV=o=>(_V((s,c)=>jV(d_,s,c)),y0=c_=o.sourceLocale,b0=new Set(o.targetLocales),b0.add(o.sourceLocale),Lx=o.loadLocale,{getLocale:$V,setLocale:zV}),$V=()=>y0,zV=o=>{if(o===(Px??y0))return bl.promise;if(!b0||!Lx)throw new Error("Internal error");if(!b0.has(o))throw new Error("Invalid locale code");w0++;const s=w0;return Px=o,bl.settled&&(bl=new s_),Dx({status:"loading",loadingLocale:o}),(o===c_?Promise.resolve({templates:void 0}):Lx(o)).then(c=>{w0===s&&(y0=o,Px=void 0,d_=c.templates,Dx({status:"ready",readyLocale:o}),bl.resolve())},c=>{w0===s&&(Dx({status:"error",errorLocale:o,errorMessage:c.toString()}),bl.reject(c))}),bl.promise},Ar=Symbol("playerState");var HV=Object.defineProperty,qV=Object.getOwnPropertyDescriptor,p_=(o,s,c,h)=>{for(var d=h>1?void 0:h?qV(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&HV(s,c,d),d};let x0=class extends An{render(){return St`<div
      class="ump-visually-hidden"
      aria-live="assertive"
      data-testid="aria-announcer"
    >
      ${this.playerState.ended?le("Ended"):this.playerState.paused?le("Paused"):le("Playing")}
    </div>`}};x0.styles=Cn`
.ump-visually-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0,0,0,0) !important;white-space:nowrap !important;border:0 !important;z-index:-100}
  `,p_([Tr({context:Ar,subscribe:!0})],x0.prototype,"playerState",2),x0=p_([Xn("ump-aria-announcer")],x0);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const h_={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},f_=o=>(...s)=>({_$litDirective$:o,values:s});class g_{constructor(s){}get _$AU(){return this._$AM._$AU}_$AT(s,c,h){this.t=s,this._$AM=c,this.i=h}_$AS(s,c){return this.update(s,c)}update(s,c){return this.render(...c)}}/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const nt=f_(class extends g_{constructor(o){var s;if(super(o),o.type!==h_.ATTRIBUTE||o.name!=="class"||((s=o.strings)==null?void 0:s.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(s=>o[s]).join(" ")+" "}update(o,[s]){var c,h;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(m=>m!=="")));for(const m in s)s[m]&&!((c=this.nt)!=null&&c.has(m))&&this.st.add(m);return this.render(s)}const d=o.element.classList;for(const m of this.st)m in s||(d.remove(m),this.st.delete(m));for(const m in s){const b=!!s[m];b===this.st.has(m)||(h=this.nt)!=null&&h.has(m)||(b?(d.add(m),this.st.add(m)):(d.remove(m),this.st.delete(m)))}return Qs}});function m_(o,s,c){return o<s?s:o>c?c:o}function v_(o){const s=Math.round(m_(o,0,1)*255).toString(16).toUpperCase();return s.length===1?"0"+s:s}var GV=Object.defineProperty,KV=Object.getOwnPropertyDescriptor,Rx=(o,s,c,h)=>{for(var d=h>1?void 0:h?KV(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&GV(s,c,d),d};const WV=2.5;let hf=class extends An{render(){return St`
      <div
        class=${nt({"ump-caption-display-container":!0,"ump-caption-display-container-hidden":!this.playerState.captionSettings.enabled})}
      ></div>
    `}updated(){const{fontScale:o,textColor:s,textOpacity:c,backgroundColor:h,backgroundOpacity:d,fontFamily:m,textShadow:b}=this.playerState.captionSettings;this.style.setProperty("--ump-caption-display-font-size",`${o*WV}cqw`),this.style.setProperty("--ump-caption-display-color",`${s}${v_(c)}`),this.style.setProperty("--ump-caption-display-background",`${h}${v_(d)}`),this.style.setProperty("--ump-caption-display-font-family",m),this.style.setProperty("--ump-caption-display-text-shadow",b),this.dispatchEvent(new Event("captionsettingupdated"))}};hf.styles=Cn`
.ump-caption-display-container{display:inline-block;position:absolute;width:95%;bottom:90px;left:50%;transform:translateX(-50%)}.ump-caption-display-container span:not(:has(span)){font-size:var(--ump-caption-display-font-size);color:var(--ump-caption-display-color);background-color:var(--ump-caption-display-background) !important;font-family:var(--ump-caption-display-font-family),sans-serif;text-shadow:var(--ump-caption-display-text-shadow);max-width:100%}.ump-caption-display-container-hidden{display:none}*{opacity:1 !important}.ump-caption-display-container *{position:relative !important}
  `,Rx([Tr({context:Ar,subscribe:!0})],hf.prototype,"playerState",2),Rx([On(".ump-caption-display-container")],hf.prototype,"captionContainer",2),hf=Rx([Xn("ump-caption-display")],hf);const y_=["facebook","x","linkedin","mail","copy"],Nx={sources:[],ccFiles:[],downloadableFiles:[],adobeCms:null,ageGate:!1,aspectRatio:"16:9",autoplay:!1,checkpoints:[],debug:!1,dir:null,disableKeyboardEvents:!1,hideControls:null,hidePosterImage:!1,language:"en",layout:"fluid",loop:!1,maskLevel:0,muted:!1,partnerName:"",percentage:50,playButtonSize:"medium",playButtonTheme:"dark",playbackRates:[.5,.75,1,1.25,1.5,2],playFullScreen:!1,plugins:{},poster:"",qualityBehavior:"auto",reporting:!0,share:!0,shareOptions:[...y_],showDownloadMenu:!0,showFocusIndicator:"default",showImageOnError:!1,showQualityMenu:!0,startTime:0,title:"",unlocalizedTitle:""},Ad={videoId:-1,label:"Auto"},Ed={captionId:-1,language:"option for turning off caption",label:"Off"},Zs={enabled:!1,fontScale:1,textColor:"#FFFFFF",textOpacity:1,backgroundColor:"#000000",backgroundOpacity:1,fontFamily:"sans-serif",textShadow:"rgb(255, 255, 255) 0px 0px 0px"},b_={audioTracks:[],bigPlayButtonClicked:!1,buffered:[],captionSettings:Zs,captionTracks:[],controlsState:"controlbar",currentTime:0,dir:"ltr",disableKeyboardEvents:!1,downloadableTranscriptFiles:[],downloadableVideoFiles:[],duration:0,ended:!1,fullscreen:!1,loading:!1,maskLevel:0,muted:!1,paused:!0,playbackRate:1,playbackRates:[],playButtonSize:"medium",playButtonTheme:"dark",qualityBehavior:"auto",selectedVideoQualityId:Ad.videoId,shareDialogOpened:!1,shareOptions:[],showDownloadMenu:!0,showFocusIndicator:"default",showQualityMenu:!0,showVolumeSlider:!0,videoQualities:[],visible:!0,volume:1},S0=["HQ","HD","SD","LO"],w_=["application/dash+xml","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml","video/mp4"],x_={DASH:"application/dash+xml",MP4:"video/mp4",HLS:"application/vnd.apple.mpegurl",MSS:"application/vnd.ms-sstr+xml"},XV={VTT:"text/vtt",TTML:"application/ttml+xml"},yi="@back",YV=3e3,JV=25,QV=le("We're sorry, but something went wrong."),ZV="universal-media-player",S_="ump",k0={dashIdentifier:"description",hlsIdentifier:"public.accessibility.describes-video"};class Pt extends CustomEvent{constructor(s,c){super(s,{bubbles:!0,composed:!0,cancelable:!0,detail:c})}}function k_(o,s){let c=null;return(...h)=>{c!==null&&window.clearTimeout(c),c=window.setTimeout(()=>{o(...h)},s)}}const e$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10a7 7 0 0 1 14 0v1h-3.5a.5.5 0 0 0-.5.5v6c0 .28.22.5.5.5H16a2 2 0 0 0 2-2v-6a8 8 0 1 0-16 0v6c0 1.1.9 2 2 2h2.5a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H3v-1Z"/></svg>',t$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10a7 7 0 0 1 14 0v1h-3.5a.5.5 0 0 0-.5.5v6c0 .28.22.5.5.5H16a2 2 0 0 0 2-2v-6a8 8 0 1 0-16 0v6c0 1.1.9 2 2 2h2.5a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H3v-1Zm0 2h3v5H4a1 1 0 0 1-1-1v-4Zm14 0v4a1 1 0 0 1-1 1h-2v-5h3Z"/></svg>';/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class Ox extends g_{constructor(s){if(super(s),this.it=sr,s.type!==h_.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(s){if(s===sr||s==null)return this._t=void 0,this.it=s;if(s===Qs)return s;if(typeof s!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(s===this.it)return this._t;this.it=s;const c=[s];return c.raw=c,this._t={_$litType$:this.constructor.resultType,strings:c,values:[]}}}Ox.directiveName="unsafeHTML",Ox.resultType=1;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class Ux extends Ox{}Ux.directiveName="unsafeSVG",Ux.resultType=2;const cn=f_(Ux),n$='<svg fill="currentColor" viewBox="0 0 1316 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M288 567.990857h97.718857l-0.585143-151.442286z m586.276571-56.576c0-63.414857-36.571429-110.299429-112.566857-110.299428h-30.866285v221.696h29.696c71.424 0 113.700571-52.004571 113.700571-111.433143z m-327.972571-215.405714l0.585143 432.018286a19.126857 19.126857 0 0 1-18.870857 19.419428h-123.428572a19.163429 19.163429 0 0 1-18.870857-19.419428v-35.437715H219.428571l-31.414857 46.299429a19.748571 19.748571 0 0 1-16.018285 8.557714H19.419429c-16.018286 0-25.161143-17.700571-15.433143-30.281143L321.682286 284.598857a18.212571 18.212571 0 0 1 15.433143-8.009143h189.696c10.861714 0 19.419429 8.557714 19.419428 19.419429z m472.539429 215.405714c0 150.272-109.714286 235.995429-257.133715 235.995429h-154.294857a19.236571 19.236571 0 0 1-19.419428-19.419429V295.972571c0-10.861714 8.557714-19.419429 19.419428-19.419428h153.161143c148.553143 0 258.304 84.553143 258.304 234.861714z m89.161142 0.585143s2.304 148.553143-84.553142 235.995429h-29.147429c77.714286-92.562286 79.433143-236.580571 79.433143-236.580572s1.133714-113.152-77.129143-234.276571h24.576C1105.737143 373.723429 1108.041143 512 1108.041143 512z m105.142858 0s2.304 148.553143-85.138286 235.995429h-29.147429c77.714286-92.562286 79.433143-236.580571 79.433143-236.580572s1.133714-113.152-76.580571-234.276571h24.576C1210.843429 373.723429 1213.147429 512 1213.147429 512zM1316.571429 512s2.304 148.553143-84.553143 235.995429h-29.147429c77.129143-92.562286 78.848-236.580571 78.848-236.580572s1.133714-113.152-76.580571-234.276571h24.576C1314.267429 373.723429 1316.571429 512 1316.571429 512z" fill="" /></svg>';function lt(o){return{"focus-always":o.showFocusIndicator==="always","focus-default":o.showFocusIndicator==="default"}}function r$(o){return s=>(o.setValue({...o.value,showFocusIndicator:s.options.showFocusIndicator}),()=>{})}const so=Cn`
.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--spacing-s-nudge);margin:0;padding:var(--spacing-s-nudge) var(--spacing-m);border-radius:var(--border-radius-medium);color:var(--color-neutral-foreground-1);font-weight:var(--font-weight-semibold);font-family:var(--font-family-default);line-height:var(--line-height-base-300);transition-duration:var(--duration-faster);transition-property:background,color;transition-timing-function:var(--curve-easy-ease);cursor:pointer;-webkit-user-select:none;user-select:none;border:solid var(--stroke-width-thick) var(--color-transparent-stroke);background-color:var(--color-neutral-background-1)}.btn:hover{background-color:var(--color-neutral-background-1-hover);color:var(--color-neutral-foreground-1-hover)}.btn.focus-always:focus,.btn.focus-default:focus-visible{outline:var(--stroke-width-thick) solid var(--color-stroke-focus-2)}.btn svg{fill:currentcolor}.btn-xs{padding:var(--spacing-xs)}.btn-s{padding:var(--spacing-s)}.btn-xl{padding:var(--spacing-xl)}.btn-xxl{padding:var(--spacing-xxl)}.btn-xxl svg{width:var(--size-10);height:var(--size-10)}.btn-outline{background-color:transparent;border-color:var(--color-neutral-stroke-1)}.btn-outline:hover{background-color:transparent}.btn-outline.focus-always:focus,.btn-outline.focus-default:focus-visible{border-color:transparent}.btn-subtle{background-color:var(--color-subtle-background);color:var(--color-neutral-foreground-2);border-color:transparent}.btn-subtle:hover{background-color:var(--color-subtle-background-hover);color:var(--color-neutral-foreground-2-hover);border-color:transparent}.btn-subtle:active{background-color:var(--color-subtle-background-pressed);color:var(--color-neutral-foreground-2-pressed)}.btn-icon-only{padding:var(--spacing-s-nudge)}.btn-brand{background-color:var(--color-brand-background);color:var(--color-brand-foreground)}.btn-brand:hover{background-color:var(--color-brand-background-hover);color:var(--color-brand-foreground)}.btn-brand:active{background-color:var(--color-brand-background-pressed);color:var(--color-brand-foreground)}.btn-circle{border-radius:var(--border-radius-circular)}@media (forced-colors:active){.btn{color:ButtonText;background-color:ButtonFace;border-color:ButtonText}.btn:hover{background-color:Highlight;border-color:Highlight;color:HighlightText}.btn-brand{forced-color-adjust:none}.btn.focus-always:focus,.btn.focus-default:focus-visible{outline-color:Highlight}.btn-outline{background-color:ButtonFace;border-color:ButtonText}.btn-subtle{background-color:ButtonFace;color:ButtonText}}
`,T0=Cn`
hr{width:var(--size-full);height:var(--size-px);padding:0;margin:var(--spacing-s) 0;border:none;background-color:var(--color-neutral-stroke-alpha)}@media (forced-colors:active){hr{background-color:ButtonBorder}}
`,Cd=Cn`
.tooltip[data-tooltip]{position:relative;--tooltip-gap:var(--spacing-s);--tooltip-top:auto;--tooltip-left:50%;--tooltip-right:auto;--tooltip-bottom:100%;--tooltip-translate-x:-50%;--tooltip-translate-y:calc(0px - var(--tooltip-gap));--tooltip-width:auto}.tooltip[data-tooltip]::before{pointer-events:none;display:none;width:var(--tooltip-width);z-index:100;background-color:var(--color-grey-10-alpha-90);color:var(--color-neutral-foreground-1);content:attr(data-tooltip);padding:var(--spacing-xs) var(--spacing-s);border-radius:var(--border-radius-medium);font-weight:var(--font-weight-regular);font-size:var(--font-size-base-200);line-height:var(--line-height-base-200);font-family:var(--font-family-default);position:absolute;inset:var(--tooltip-top) var(--tooltip-right) var(--tooltip-bottom) var(--tooltip-left);transform:translate(var(--tooltip-translate-x),var(--tooltip-translate-y))}.tooltip[data-tooltip].tooltip-top::before{--tooltip-top:auto;--tooltip-bottom:100%;transform:translate(0,calc(0px - var(--tooltip-gap)))}.tooltip[data-tooltip].tooltip-top.tooltip-right::before{--tooltip-left:auto;--tooltip-right:0}.tooltip[data-tooltip].tooltip-top.tooltip-left::before{--tooltip-left:0;--tooltip-right:auto}.tooltip[data-tooltip].tooltip-disable-when-aria-expanded[aria-expanded='true']::before{display:none}.tooltip[data-tooltip]:hover::before,.tooltip[data-tooltip]:focus-visible::before,.tooltip[data-tooltip].tooltip-visible::before{display:block}@media (forced-colors:active){.tooltip[data-tooltip]::before{background-color:var(--color-grey-10)}.tooltip[data-tooltip]:hover::before,.tooltip[data-tooltip]:focus-visible::before,.tooltip[data-tooltip].tooltip-visible::before{color:ButtonText}}
`;var i$=Object.defineProperty,a$=Object.getOwnPropertyDescriptor,Fx=(o,s,c,h)=>{for(var d=h>1?void 0:h?a$(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&i$(s,c,d),d};let ff=class extends An{render(){var o;const s=this.playerState.audioTracks;return s.length<2?null:St`
      <ump-popup
        popupAriaLabel="${le("Audio")}"
        @ump-popup-changed=${()=>this.requestUpdate()}
      >
        <button
          type="button"
          slot="trigger"
          class=${nt({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...lt(this.playerState),tooltip:!0,"tooltip-disable-when-aria-expanded":!0})}
          data-tooltip="${le("Audio")}"
          aria-label="${le("Audio Menu")}"
          data-testid="audio-menu-button"
        >
          ${(o=this.popup)!=null&&o.opened?cn(e$):cn(t$)}
        </button>

        <ump-menu data-focusgroup>
          <ump-menu-label>${le("Audio Track")}</ump-menu-label>

          <hr aria-hidden="true" />

          <ump-submenu>
            ${s.map(c=>St`
                <ump-menu-item
                  class=${nt({...lt(this.playerState)})}
                  type="radio"
                  .checked=${c.shakaAudioTrack.active===!0}
                  @click=${this.onAudioTrackSelected(c)}
                >
                  <div
                    class="audio-track-menu-item-content"
                    aria-label=${T_(c)?`${c.displayName} ${le("Audio Description")}`:c.displayName}
                  >
                    ${c.displayName}
                    ${T_(c)?cn(n$):null}
                  </div>
                </ump-menu-item>
              `)}
          </ump-submenu>
        </ump-menu>
      </ump-popup>
    `}onAudioTrackSelected(o){return()=>{this.dispatchEvent(new Pt("audio-track-clicked",o))}}get opened(){var o;return(o=this.popup)==null?void 0:o.opened}};ff.styles=[so,T0,Cd,Cn`
.btn.tooltip{--tooltip-gap:var(--spacing-xxxl)}ump-popup{--ump-popup-spacing:var(--spacing-xxxl)}ump-menu{width:var(--size-64);display:block}.audio-track-menu-item-content{display:flex;align-items:flex-end;width:100%;gap:var(--spacing-xs)}.audio-track-menu-item-content svg{width:var(--size-6);height:var(--size-6);margin-bottom:calc(0px - var(--spacing-xs))}
    `],Fx([On("ump-popup")],ff.prototype,"popup",2),Fx([Tr({context:Ar,subscribe:!0})],ff.prototype,"playerState",2),ff=Fx([Xn("ump-audio-menu")],ff);function T_(o){return[k0.dashIdentifier,k0.hlsIdentifier].some(s=>o.shakaAudioTrack.roles.includes(s))}const o$='<svg width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><path d="M23.5 14A9.5 9.5 0 0 0 7.07 7.5h2.68a.75.75 0 0 1 0 1.5h-4A.75.75 0 0 1 5 8.25v-4a.75.75 0 0 1 1.5 0v1.7a11 11 0 1 1-3.42 6.7.75.75 0 1 1 1.49.2A9.5 9.5 0 1 0 23.5 14Z"/></svg>',s$='<svg width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><path d="M6.75 3A2.75 2.75 0 0 0 4 5.75v16.5A2.75 2.75 0 0 0 6.75 25h3a2.75 2.75 0 0 0 2.75-2.75V5.75A2.75 2.75 0 0 0 9.75 3h-3Zm11.5 0a2.75 2.75 0 0 0-2.75 2.75v16.5A2.75 2.75 0 0 0 18.25 25h3A2.75 2.75 0 0 0 24 22.25V5.75A2.75 2.75 0 0 0 21.25 3h-3Z"/></svg>',u$='<svg width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><path d="M10.14 3.38A2.75 2.75 0 0 0 6 5.76v16.48c0 2.13 2.3 3.45 4.14 2.38l14.7-8.6a2.35 2.35 0 0 0 0-4.05l-14.7-8.59Z"/></svg>';var l$=Object.defineProperty,c$=Object.getOwnPropertyDescriptor,A_=(o,s,c,h)=>{for(var d=h>1?void 0:h?c$(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&l$(s,c,d),d};let gf=class extends An{render(){return St`<button
      type="button"
      class=${nt({btn:!0,"btn-xl":this.playerState.playButtonSize==="medium","btn-xxl":this.playerState.playButtonSize==="large","btn-circle":!0,"big-play-button":!0,"big-play-button-light":this.playerState.playButtonTheme==="light","big-play-button-dark":this.playerState.playButtonTheme==="dark",...lt(this.playerState),tooltip:!0})}
      aria-label="${this.playerState.ended?le("Replay"):this.playerState.paused?le("Play"):le("Pause")}"
      data-tooltip="${this.playerState.ended?le("Replay"):this.playerState.paused?le("Play"):le("Pause")}"
      data-testid="big-play-button"
      @click=${this.onBigPlayButtonClick}
      @keydown=${this.onBigPlayButtonKeyDown}
    >
      ${this.playerState.ended?cn(o$):this.playerState.paused?cn(u$):cn(s$)}
    </button>`}onBigPlayButtonClick(){this.dispatchEvent(new Pt("big-play-button-triggered"))}onBigPlayButtonKeyDown(o){this.playerState.disableKeyboardEvents||(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),o.stopPropagation(),this.dispatchEvent(new Pt("big-play-button-triggered")))}};gf.shadowRootOptions={...An.shadowRootOptions,delegatesFocus:!0},gf.styles=[so,Cd,Cn`
.big-play-button{transition-property:background,color,outline}.big-play-button.tooltip{--tooltip-gap:var(--spacing-m)}.big-play-button-light{background-color:var(--color-white-alpha-90);outline:var(--stroke-width-thickest) solid var(--color-white-alpha-20)}.big-play-button-light:hover,.big-play-button-light:focus-visible{background-color:var(--color-white-alpha-20);outline:var(--stroke-width-thick) solid var(--color-white-alpha-90);outline-offset:-4px}.big-play-button-light svg{fill:var(--color-brand-40)}.big-play-button-dark{background-color:var(--color-black-alpha-60);outline:var(--stroke-width-thickest) solid var(--color-black-alpha-20)}.big-play-button-dark:hover,.big-play-button-dark:focus-visible{background-color:var(--color-black-alpha-80);outline:var(--stroke-width-thick) solid var(--color-white-alpha-90);outline-offset:-4px}.big-play-button-dark svg{fill:var(--color-neutral-foreground-1)}@media (forced-colors:active){.big-play-button-dark{background-color:ButtonText;outline:var(--stroke-width-thickest) solid Highlight}.big-play-button-dark:hover,.big-play-button-dark:focus-visible{background-color:Highlight;outline:var(--stroke-width-thick) solid ButtonText;outline-offset:-4px}.big-play-button-dark svg{fill:ButtonFace}.big-play-button-light{background-color:Highlight;outline:var(--stroke-width-thickest) solid ButtonText}.big-play-button-light:hover,.big-play-button-light:focus-visible{background-color:ButtonText;outline:var(--stroke-width-thick) solid Highlight;outline-offset:-4px}.big-play-button-light svg{fill:ButtonFace}}
    `],A_([Tr({context:Ar,subscribe:!0})],gf.prototype,"playerState",2),gf=A_([_x(),Xn("ump-big-play-button")],gf);const jx='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.35 15.85a.5.5 0 0 1-.7 0L6.16 10.4a.55.55 0 0 1 0-.78l5.49-5.46a.5.5 0 1 1 .7.7L7.2 10l5.16 5.15c.2.2.2.5 0 .7Z"/></svg>',Bx='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.65 4.15c.2-.2.5-.2.7 0l5.49 5.46c.21.22.21.57 0 .78l-5.49 5.46a.5.5 0 0 1-.7-.7L12.8 10 7.65 4.85a.5.5 0 0 1 0-.7Z"/></svg>',d$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 4a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3H5Zm1.4 3.24c.82-.41 1.8-.24 2.45.4a.5.5 0 0 1-.7.71 1.12 1.12 0 0 0-1.3-.22C6.44 8.34 6 8.9 6 10s.44 1.66.85 1.87c.43.21.95.13 1.3-.22a.5.5 0 1 1 .7.7c-.65.65-1.63.82-2.45.41C5.56 12.34 5 11.39 5 10c0-1.39.56-2.34 1.4-2.76Zm7.95.4a.5.5 0 0 1-.7.71 1.12 1.12 0 0 0-1.3-.22c-.41.21-.85.76-.85 1.87s.44 1.66.85 1.87c.43.21.95.13 1.3-.22a.5.5 0 0 1 .7.7c-.65.65-1.63.82-2.45.41-.84-.42-1.4-1.37-1.4-2.76 0-1.39.56-2.34 1.4-2.76.82-.41 1.8-.24 2.45.4Z"/></svg>',p$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.4 7.24c.82-.41 1.8-.24 2.45.4a.5.5 0 0 1-.7.71 1.12 1.12 0 0 0-1.3-.22C6.44 8.34 6 8.9 6 10s.44 1.66.85 1.87c.43.21.95.13 1.3-.22a.5.5 0 0 1 .7.7c-.65.65-1.63.82-2.45.41C5.56 12.34 5 11.39 5 10c0-1.39.56-2.34 1.4-2.76Zm7.95.4a2.12 2.12 0 0 0-2.45-.4c-.84.42-1.4 1.37-1.4 2.76 0 1.39.56 2.34 1.4 2.76.82.41 1.8.24 2.45-.4a.5.5 0 0 0-.7-.71c-.35.35-.87.43-1.3.22-.41-.21-.85-.76-.85-1.87s.44-1.66.85-1.87c.43-.21.95-.13 1.3.22a.5.5 0 0 0 .7-.7ZM2 7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7Zm3-2a2 2 0 0 0-2 2v6c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H5Z"/></svg>';/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Vx=o=>o??sr,h$=[.5,.75,1,1.25,1.5,1.75,2,3,4],Id=[{label:le("White"),hexCode:"#FFFFFF"},{label:le("Yellow"),hexCode:"#FFFF00"},{label:le("Black"),hexCode:"#000000"},{label:le("Green"),hexCode:"#008000"},{label:le("Blue"),hexCode:"#0000FF"},{label:le("Magenta"),hexCode:"#FF00FF"},{label:le("Cyan"),hexCode:"#00FFFF"}],$x=[{label:le("Proportional Sans Serif"),family:"sans-serif"},{label:le("Monospace Sans Serif"),family:'"Andale Mono", "Lucida Console", monospace'},{label:le("Proportional Serif"),family:"serif"},{label:le("Monospace Serif"),family:'"Courier New", monospace'},{label:le("Casual"),family:'"Comic Sans MS", Impact, fantasy'},{label:le("Cursive"),family:'"Monotype Corsiva", cursive'},{label:le("Small Capitals"),family:'"Andale Mono", "Lucida Console", monospace, sans-serif'}],E_=[0,.25,.5,.75,1],ya="rgb(34, 34, 34)",C_="rgb(204, 204, 204)",zx=[{label:le("None"),textShadow:"rgb(255, 255, 255) 0px 0px 0px"},{label:le("Drop Shadow"),textShadow:`${ya} 2px 2px 3px, ${ya} 2px 2px 4px, ${ya} 2px 2px 5px`},{label:le("Depressed"),textShadow:`${C_} 1px 1px 0px, ${C_} 0px 1px 0px, ${ya} -1px -1px 0px, ${ya} 0px -1px 0px`},{label:le("Uniform"),textShadow:`${ya} 0px 0px 4px, ${ya} 0px 0px 4px, ${ya} 0px 0px 4px, ${ya} 0px 0px 4px`},{label:le("Raised"),textShadow:`${ya} 1px 1px 0px, ${ya} 2px 2px 0px, ${ya} 3px 3px 0px`}];var f$=Object.defineProperty,g$=Object.getOwnPropertyDescriptor,Hx=(o,s,c,h)=>{for(var d=h>1?void 0:h?g$(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&f$(s,c,d),d};let mf=class extends An{render(){var o;const{captionTracks:s,selectedCaptionTrackId:c,captionSettings:h}=this.playerState;if(s.length<=1)return null;const d=this.playerState.disableKeyboardEvents?0:-1;return St`
      <ump-popup
        popupAriaLabel="${le("Captions")}"
        @ump-popup-changed=${()=>this.requestUpdate()}
      >
        <button
          type="button"
          slot="trigger"
          class=${nt({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...lt(this.playerState),tooltip:!0,"tooltip-disable-when-aria-expanded":!0})}
          data-tooltip="${le("Captions")}"
          aria-label="${le("Captions Menu")}"
          data-testid="captions-menu-button"
        >
          ${(o=this.popup)!=null&&o.opened?cn(d$):cn(p$)}
        </button>

        <ump-menu data-focusgroup>
          <!-- DEFAULT MENU -->
          <ump-submenu>
            <div class="menu-scrollable" data-scrollable>
              <ump-menu-label> ${le("Captions")} </ump-menu-label>

              <hr aria-hidden="true" />

              ${s.map(m=>St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    lang=${Vx(m.captionId!==Ed.captionId?m.language:void 0)}
                    type="radio"
                    .checked="${m.captionId===c}"
                    @click=${this.onCaptionClicked(m)}
                  >
                    ${m.captionId!==Ed.captionId?m.label:le(Ed.label)}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${nt({btn:!0,"btn-outline":!0,...lt(this.playerState)})}
                  role="menuitem"
                  submenu="captions-settings"
                  slot="suffix"
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  aria-roledescription="button"
                  aria-label="${le("Caption Settings")}, ${le("collapsed")}"
                  data-testid="captions-settings-button"
                >
                  ${le("Caption Settings")}
                  ${this.playerState.dir==="ltr"?cn(Bx):cn(jx)}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- SETTINGS MENU -->
          <ump-submenu id="captions-settings">
            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="${yi}"
              aria-label="${le("Caption Settings")}, ${le("Back")}"
            >
              ${le("Caption Settings")}
            </ump-menu-item>

            <hr aria-hidden="true" />
            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="captions-font-size"
              aria-label="${le("Font Size")}, ${h.fontScale*100}%, ${le("collapsed")}"
            >
              ${le("Font Size")}
              <div slot="suffix">${`${h.fontScale*100}%`}</div>
            </ump-menu-item>

            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="captions-font-color"
              aria-label="${le("Font Color")}, ${le(Id.find(m=>m.hexCode===h.textColor).label)}, ${le("collapsed")}"
            >
              ${le("Font Color")}
              <div slot="suffix">
                ${le(Id.find(m=>m.hexCode===h.textColor).label)}
              </div>
            </ump-menu-item>

            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="captions-font-opacity"
              aria-label="${le("Font Opacity")}, ${h.textOpacity===1?le("Opaque"):`${h.textOpacity*100}%`}, ${le("collapsed")}"
            >
              ${le("Font Opacity")}
              <div slot="suffix">
                ${h.textOpacity===1?le("Opaque"):`${h.textOpacity*100}%`}
              </div>
            </ump-menu-item>

            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="captions-background-color"
              aria-label="${le("Background Color")}, ${le(Id.find(m=>m.hexCode===h.backgroundColor).label)}, ${le("collapsed")}"
            >
              ${le("Background Color")}
              <div slot="suffix">
                ${le(Id.find(m=>m.hexCode===h.backgroundColor).label)}
              </div>
            </ump-menu-item>

            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="captions-background-opacity"
              aria-label="${le("Background Opacity")}, ${h.backgroundOpacity===1?le("Opaque"):`${h.backgroundOpacity*100}%`}, ${le("collapsed")}"
            >
              ${le("Background Opacity")}
              <div slot="suffix">
                ${h.backgroundOpacity===1?le("Opaque"):`${h.backgroundOpacity*100}%`}
              </div>
            </ump-menu-item>

            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="captions-font-family"
              aria-label="${le("Font Family")}, ${le($x.find(m=>m.family===h.fontFamily).label)}, ${le("collapsed")}"
            >
              ${le("Font Family")}
              <div slot="suffix">
                ${le($x.find(m=>m.family===h.fontFamily).label)}
              </div>
            </ump-menu-item>

            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="captions-text-edge-style"
              aria-label="${le("Text Edge Style")}, ${le(zx.find(m=>m.textShadow===h.textShadow).label)}, ${le("collapsed")}"
            >
              ${le("Text Edge Style")}
              <div slot="suffix">
                ${le(zx.find(m=>m.textShadow===h.textShadow).label)}
              </div>
            </ump-menu-item>
          </ump-submenu>

          <!-- FONT SIZE MENU -->
          <ump-submenu id="captions-font-size">
            <div class="menu-scrollable" data-scrollable>
              <ump-menu-item
                class=${nt({...lt(this.playerState)})}
                submenu="${yi}"
                aria-label="${le("Font Size")}, ${le("Back")}"
              >
                ${le("Font Size")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${h$.map(m=>St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    type="radio"
                    .checked=${h.fontScale===m}
                    @click=${this.onFontSizeClicked(m)}
                  >
                    ${`${m*100}%`}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${nt({btn:!0,"btn-outline":!0,...lt(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${le("Reset")}"
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-font-size"
                  @click=${this.onFontSizeClicked(Zs.fontScale)}
                >
                  ${le("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- TEXT COLOR MENU -->
          <ump-submenu id="captions-font-color">
            <div class="menu-scrollable" data-scrollable>
              <ump-menu-item
                class=${nt({...lt(this.playerState)})}
                submenu="${yi}"
                aria-label="${le("Font Color")}, ${le("Back")}}"
              >
                ${le("Font Color")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${Id.map(m=>St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    type="radio"
                    .checked=${m.hexCode===h.textColor}
                    @click=${this.onTextColorClicked(m.hexCode)}
                  >
                    <span
                      class="color-dot"
                      style="background-color: ${m.hexCode}"
                      aria-hidden="true"
                    ></span>
                    ${le(m.label)}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${nt({btn:!0,"btn-outline":!0,...lt(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${le("Reset")}"
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-font-color"
                  @click=${this.onTextColorClicked(Zs.textColor)}
                >
                  ${le("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- TEXT OPACITY MENU -->
          <ump-submenu id="captions-font-opacity">
            <div class="menu-scrollable" data-scrollable>
              <ump-menu-item
                class=${nt({...lt(this.playerState)})}
                submenu="${yi}"
                aria-label="${le("Font Opacity")}, ${le("Back")})}"
              >
                ${le("Font Opacity")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${E_.map(m=>St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    type="radio"
                    .checked=${m===h.textOpacity}
                    @click=${this.onTextOpacityClicked(m)}
                  >
                    ${`${m*100}%`}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${nt({btn:!0,"btn-outline":!0,...lt(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${le("Reset")}"
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-font-opacity"
                  @click=${this.onTextOpacityClicked(Zs.textOpacity)}
                >
                  ${le("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- BACKGROUND COLOR MENU -->
          <ump-submenu id="captions-background-color">
            <div class="menu-scrollable" data-scrollable>
              <ump-menu-item
                class=${nt({...lt(this.playerState)})}
                submenu="${yi}"
                aria-label="${le("Background Color")}, ${le("Back")}}"
              >
                ${le("Background Color")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${Id.map(m=>St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    type="radio"
                    .checked=${m.hexCode===h.backgroundColor}
                    @click=${this.onBackgroundColorClicked(m.hexCode)}
                  >
                    <span
                      class="color-dot"
                      style="background-color: ${m.hexCode}"
                      aria-hidden="true"
                    ></span>
                    ${le(m.label)}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${nt({btn:!0,"btn-outline":!0,...lt(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${le("Reset")}"
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-background-color"
                  @click=${this.onBackgroundColorClicked(Zs.backgroundColor)}
                >
                  ${le("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- BACKGROUND OPACITY MENU -->
          <ump-submenu id="captions-background-opacity">
            <div class="menu-scrollable" data-scrollable>
              <ump-menu-item
                class=${nt({...lt(this.playerState)})}
                submenu="${yi}"
                aria-label="${le("Background Opacity")}, ${le("Back")}}"
              >
                ${le("Background Opacity")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${E_.map(m=>St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    type="radio"
                    .checked=${m===h.backgroundOpacity}
                    @click=${this.onBackgroundOpacityClicked(m)}
                  >
                    ${`${m*100}%`}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${nt({btn:!0,"btn-outline":!0,...lt(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${le("Reset")}"
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-background-opacity"
                  @click=${this.onBackgroundOpacityClicked(Zs.backgroundOpacity)}
                >
                  ${le("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- FONT FAMILY MENU -->
          <ump-submenu id="captions-font-family">
            <div class="menu-scrollable" data-scrollable>
              <ump-menu-item
                class=${nt({...lt(this.playerState)})}
                submenu="${yi}"
                aria-label="${le("Font Family")}, ${le("Back")}}"
              >
                ${le("Font Family")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${$x.map(m=>St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    type="radio"
                    .checked=${m.family===h.fontFamily}
                    @click=${this.onFontFamilyClicked(m.family)}
                  >
                    ${le(m.label)}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${nt({btn:!0,"btn-outline":!0,...lt(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${le("Reset")}"
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-font-family"
                  @click=${this.onFontFamilyClicked(Zs.fontFamily)}
                >
                  ${le("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- TEXT EDGE STYLE MENU -->
          <ump-submenu id="captions-text-edge-style">
            <div class="menu-scrollable" data-scrollable>
              <ump-menu-item
                class=${nt({...lt(this.playerState)})}
                submenu="${yi}"
                aria-label="${le("Text Edge Style")}, ${le("Back")}}"
              >
                ${le("Text Edge Style")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${zx.map(m=>St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    type="radio"
                    .checked=${h.textShadow===m.textShadow}
                    @click=${this.onTextEdgeStyleClicked(m.textShadow)}
                  >
                    ${le(m.label)}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${nt({btn:!0,"btn-outline":!0,...lt(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${le("Reset")}"
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-text-edge-style"
                  @click=${this.onTextEdgeStyleClicked(Zs.textShadow)}
                >
                  ${le("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>
        </ump-menu>
      </ump-popup>
    `}onFooterButtonFocusIn(o){this.playerState.disableKeyboardEvents||(o.target.tabIndex=0)}onFooterButtonFocusOut(o){this.playerState.disableKeyboardEvents||(o.target.tabIndex=-1)}onCaptionClicked(o){return()=>{this.dispatchEvent(new Pt("caption-track-clicked",o)),this.dispatchEvent(new Pt("closedcaptionschanged"))}}captionSettingChanged(o){this.dispatchEvent(o),this.dispatchEvent(new Pt("closedcaptionsettingschanged"))}onFontSizeClicked(o){return s=>{s.stopPropagation(),this.captionSettingChanged(new Pt("caption-font-size-clicked",o))}}onTextColorClicked(o){return s=>{s.stopPropagation(),this.captionSettingChanged(new Pt("caption-text-color-clicked",o))}}onTextOpacityClicked(o){return s=>{s.stopPropagation(),this.captionSettingChanged(new Pt("caption-text-opacity-clicked",o))}}onBackgroundColorClicked(o){return s=>{s.stopPropagation(),this.captionSettingChanged(new Pt("caption-background-color-clicked",o))}}onBackgroundOpacityClicked(o){return s=>{s.stopPropagation(),this.captionSettingChanged(new Pt("caption-background-opacity-clicked",o))}}onFontFamilyClicked(o){return s=>{s.stopPropagation(),this.captionSettingChanged(new Pt("caption-font-family-clicked",o))}}onTextEdgeStyleClicked(o){return s=>{s.stopPropagation(),this.captionSettingChanged(new Pt("caption-text-edge-style-clicked",o))}}get opened(){var o;return(o=this.popup)==null?void 0:o.opened}};mf.styles=[so,T0,Cd,Cn`
.btn.tooltip{--tooltip-gap:var(--spacing-xxxl)}.color-dot{width:var(--spacing-m);height:var(--spacing-m);border-radius:50%}ump-popup{--ump-popup-spacing:var(--spacing-xxxl)}ump-menu{width:var(--size-80);display:block}@container universalmediaplayer (max-width:450px){ump-menu{width:calc(var(--size-80) - 3cqw)}}.menu-title-spacer{width:var(--size-6);height:var(--size-6)}@container universalmediaplayer (min-width:0){.menu-scrollable{scrollbar-base-color:green;overflow:hidden auto;max-height:calc(100cqh - var(--ump-lower-controls-height) - 4rem);flex-direction:column;padding:var(--spacing-xs)}}.menu-footer{width:100%;border-top:1px solid var(--color-neutral-stroke-alpha)}.menu-footer div:focus,.menu-footer div:focus-visible{outline:var(--stroke-width-thick) solid var(--color-stroke-focus-2)}.menu-footer div svg{fill:currentcolor}.color-suffix{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-m);padding:var(--spacing-s) var(--spacing-m)}.opacity-suffix{display:flex;gap:var(--spacing-xs)}.opacity-suffix .btn{font-weight:var(--font-weight-normal)}.cc-style-menu-item{display:flex;align-items:center;justify-content:space-between;padding:var(--spacing-s) 0}.text-color-list{display:flex;gap:var(--spacing-s)}@media (forced-colors:active){.menu-footer{border-top-color:ButtonBorder}}
    `],Hx([On("ump-popup")],mf.prototype,"popup",2),Hx([Tr({context:Ar,subscribe:!0})],mf.prototype,"playerState",2),mf=Hx([Xn("ump-caption-menu")],mf);const m$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M16 10A6 6 0 0 0 5.53 6H7.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 1 0v1.6a7 7 0 1 1-1.98 4.36.5.5 0 0 1 1 .08L4 10a6 6 0 0 0 12 0Z"/></svg>',v$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5.25C3 4.01 4 3 5.25 3h1.87a.75.75 0 1 1 0 1.5H5.25a.75.75 0 0 0-.75.75v1.87a.75.75 0 1 1-1.5 0V5.25Zm9.13-1.5c0-.41.34-.75.75-.75h1.87C15.99 3 17 4 17 5.25v1.87a.75.75 0 0 1-1.5 0V5.25a.75.75 0 0 0-.75-.75h-1.87a.75.75 0 0 1-.75-.75Zm-8.38 8.38c.41 0 .75.34.75.75v1.87c0 .41.34.75.75.75h1.87a.75.75 0 0 1 0 1.5H5.25C4.01 17 3 16 3 14.75v-1.87c0-.41.34-.75.75-.75Zm12.5 0c.41 0 .75.34.75.75v1.87c0 1.24-1 2.25-2.25 2.25h-1.87a.75.75 0 0 1 0-1.5h1.87c.41 0 .75-.34.75-.75v-1.87c0-.41.34-.75.75-.75Z"/></svg>',y$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15 5.5a.5.5 0 0 1-.5-.5V2.75a.75.75 0 0 0-1.5 0V5c0 1.1.9 2 2 2h2.25a.75.75 0 0 0 0-1.5H15ZM5.5 15a.5.5 0 0 0-.5-.5H2.75a.75.75 0 0 1 0-1.5H5a2 2 0 0 1 2 2v2.25a.75.75 0 0 1-1.5 0V15Zm9 0c0-.28.22-.5.5-.5h2.25a.75.75 0 0 0 0-1.5H15a2 2 0 0 0-2 2v2.25a.75.75 0 0 0 1.5 0V15Zm-9-10a.5.5 0 0 1-.5.5H2.75a.75.75 0 0 0 0 1.5H5a2 2 0 0 0 2-2V2.75a.75.75 0 0 0-1.5 0V5Z"/></svg>',b$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 2a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H5ZM4 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4Zm9-2a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-2Zm-1 2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V4Z"/></svg>',w$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M17.22 8.69a1.5 1.5 0 0 1 0 2.62l-10 5.5A1.5 1.5 0 0 1 5 15.5v-11A1.5 1.5 0 0 1 7.22 3.2l10 5.5Zm-.48 1.75a.5.5 0 0 0 0-.88l-10-5.5A.5.5 0 0 0 6 4.5v11c0 .38.4.62.74.44l10-5.5Z"/></svg>',x$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12 3a1 1 0 0 0-1.68-.73l-3.88 3.6A.5.5 0 0 1 6.1 6H3.5C2.67 6 2 6.67 2 7.5v5c0 .83.67 1.5 1.5 1.5h2.6a.5.5 0 0 1 .34.13l3.88 3.6a1 1 0 0 0 1.68-.74V3.01ZM7.12 6.6 11 3v14l-3.88-3.6A1.5 1.5 0 0 0 6.1 13H3.5a.5.5 0 0 1-.5-.5v-5c0-.28.22-.5.5-.5h2.6c.38 0 .75-.14 1.02-.4Zm8.14-1.97a.5.5 0 0 1 .7.04 8 8 0 0 1 0 10.66.5.5 0 0 1-.74-.66 7 7 0 0 0 0-9.34.5.5 0 0 1 .04-.7Zm-1.18 8.3a.5.5 0 0 1-.18-.68 4.5 4.5 0 0 0 0-4.5.5.5 0 1 1 .86-.5 5.5 5.5 0 0 1 0 5.5.5.5 0 0 1-.68.18Z"/></svg>',S$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.85 2.15a.5.5 0 1 0-.7.7L5.29 6H3.5C2.68 6 2 6.67 2 7.5v5c0 .83.68 1.5 1.5 1.5H6.1a.5.5 0 0 1 .34.13l3.88 3.6a1 1 0 0 0 1.68-.74V12.7l5.15 5.15a.5.5 0 0 0 .7-.7l-2.56-2.57L2.85 2.15ZM11 11.7V17l-3.88-3.6A1.5 1.5 0 0 0 6.1 13H3.5a.5.5 0 0 1-.5-.5v-5c0-.28.22-.5.5-.5h2.6l.18-.01L11 11.7ZM11 3v5.88l1 1V3a1 1 0 0 0-1.68-.74L7.24 5.12l.71.71L11 3.01Zm3.06 8.94.74.74a5.5 5.5 0 0 0-.04-5.43.5.5 0 1 0-.86.5 4.5 4.5 0 0 1 .16 4.19Zm1.84 1.84.72.72a8 8 0 0 0-.66-9.83.5.5 0 1 0-.74.66 7 7 0 0 1 .68 8.45Z"/></svg>',k$=(o,s,c)=>{const h=o[s];return h?typeof h=="function"?h():Promise.resolve(h):new Promise((d,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+s+(s.split("/").length!==c?". Note that variables only represent file names one level deep.":""))))})},T$="en-us",A$=["af-za","am-et","ar-sa","as-in","be-by","bg-bg","bn-in","ca-es","cs-cz","cy-gb","da-dk","de-at","de-ch","de-de","el-gr","en-au","en-ca","en-gb","en-hk","en-ie","en-in","en-my","en-nz","en-ph","en-sg","en-za","es-ar","es-cl","es-co","es-es","es-mx","et-ee","eu-es","fa-ir","fi-fi","fr-be","fr-ca","fr-ch","fr-fr","fr-ma","ga-ie","gd-gb","gl-es","gu-in","he-il","hi-in","hr-hr","hu-hu","hy-am","id-id","is-is","it-it","ja-jp","ka-ge","kk-kz","kn-in","ko-kr","ky-kg","lb-lu","lo-la","lt-lt","lv-lv","mi-nz","mk-mk","ml-in","mr-in","ms-bn","ms-my","mt-mt","nb-no","ne-np","nl-be","nl-nl","nn-no","or-in","pa-in","pl-pl","ps-af","pt-br","pt-pt","ro-ro","ru-ru","si-lk","sk-sk","sl-si","sq-al","sv-se","sw-ke","ta-in","te-in","tg-tj","th-th","ti-et","tk-tm","tr-tr","tt-ru","ug-cn","uk-ua","ur-in","ur-pk","uz-uz","vi-vn","wo-sn","xh-za","yo-ng","zh-cn","zh-hk","zh-tw","zu-za"],E$=["af-za","am-et","ar-sa","as-in","be-by","bg-bg","bn-in","ca-es","cs-cz","cy-gb","da-dk","de-at","de-ch","de-de","el-gr","en-au","en-ca","en-gb","en-hk","en-ie","en-in","en-my","en-nz","en-ph","en-sg","en-us","en-za","es-ar","es-cl","es-co","es-es","es-mx","et-ee","eu-es","fa-ir","fi-fi","fr-be","fr-ca","fr-ch","fr-fr","fr-ma","ga-ie","gd-gb","gl-es","gu-in","he-il","hi-in","hr-hr","hu-hu","hy-am","id-id","is-is","it-it","ja-jp","ka-ge","kk-kz","kn-in","ko-kr","ky-kg","lb-lu","lo-la","lt-lt","lv-lv","mi-nz","mk-mk","ml-in","mr-in","ms-bn","ms-my","mt-mt","nb-no","ne-np","nl-be","nl-nl","nn-no","or-in","pa-in","pl-pl","ps-af","pt-br","pt-pt","ro-ro","ru-ru","si-lk","sk-sk","sl-si","sq-al","sv-se","sw-ke","ta-in","te-in","tg-tj","th-th","ti-et","tk-tm","tr-tr","tt-ru","ug-cn","uk-ua","ur-in","ur-pk","uz-uz","vi-vn","wo-sn","xh-za","yo-ng","zh-cn","zh-hk","zh-tw","zu-za"],I_={s0289cd9e4bcf84c5:"Volume Level",s061cc20e3432dead:"Pause",s0622a6e6cb77254b:"Transcript",s080d032fc1b87b3f:"Audio Description",s08b06007b5567108:"of",s08e6bd98452e6bb9:"Audio",s1b4a36fce2456660:"Font Family",s1fa5be5a4f5d0f04:"Casual",s23537b5c9e7af982:"Captions",s24221a89168e9d21:"Font Size",s255857544a9d5ec0:"Reset",s25a858f0257e2879:"Captions Menu",s2df075aface0dab8:"Share",s2f5d5d2d1f92de26:"Download Video",s302cbb19bf9a174a:"Off",s308604b3ae13fbb5:"Playing",s344ea8f4939cdc98:"Colour",s3687049d1af562c4:"Copy",s36b979e4de5152b3:"Link Copied",s37a9e8aec5713460:"More",s3ca1bdfa8785f808:"Proportional Sans Serif",s49f06dca0feeb2f3:"Uniform",s4b023aafbd8d5ac8:"Share this video on",s4b10acae683d2978:"Fullscreen",s500caa88d20458d3:"You may not access this content",s5267658ceae3230f:"Share this video",s5c5db15dfc3a5376:"Playback rate",s5e3cb80d43a34044:"Black",s5e8250fb85d64c23:"Close",s669b18c6d2d9c95b:"None",s66d852e3c020e79e:"Opaque",s6a3bf589eaf72169:"Monospace Serif",s6baf78886c99db89:"Yellow",s6f59e9b81c5a47e0:"Drop Shadow",s711d047dea682c1a:"Audio Track",s7d148a08796094d2:"Playback Error",s81a19821f3e4a3d2:"Replay",s827bc70ebcb7bbc6:"Monospace Sans Serif",s85186a61e0d55bac:"Video",s889413eb7198ea01:"option for turning off caption",s8e408592fd4ae43a:"Text Edge Style",s8e985aeeca6a8166:"White",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Small Capitals",s95bc8722b2708f8b:"Paused",s973b83fb67a5865d:"Download Transcript",s9b3c2f9cc32d565a:"Cyan",s9c356016f81585f6:"Background Colour",s9d8b8aa2b404c2c8:"Settings",s9fbd543f2179c1ec:"Audio Menu",sa000eaf7092088c3:"Progress Bar",sa6f2645578b2d2bc:"Year",sa9011e79e3ca2d18:"Depressed",saf9b398ab363c174:"Please enter your date of birth",sb3d4f79d9d8b71e5:"Submit",sb47daaf9e1c4a905:"Month",sb9f16a5f9c29f41e:"We're sorry, but something went wrong.",sba64d8954d027206:"Opacity",sc07837c309cc699b:"Unmute",scd105819b5a10243:"Play",sce836928a17d96ed:"Text Colour",scf00d78fd5953f1c:"Green",sd3386a2ef42e80b9:"Download",sd8d4b1b613d28990:"Cursive",sdb02f53e62c1da05:"Raised",sdb73788b3c975f16:"Auto",se0955919920ee87d:"Day",se0f67eae944f8f94:"Mute",se73c59cc10f48c12:"Social",secf3d3a7c1693e2d:"Blue",sed31876562d94652:"Caption Settings",sf113fa256db9617b:"Ended",sf675f879b1c892c6:"Quality",sfc24a457269b13d4:"Volume Slider",sfcb817633bf70e1b:"Proportional Serif"},C$=Object.freeze(Object.defineProperty({__proto__:null,templates:I_},Symbol.toStringTag,{value:"Module"})),M_={s0289cd9e4bcf84c5:"Nivel de volumen",s061cc20e3432dead:"Pausar",s0622a6e6cb77254b:"Transcripci\xF3n",s080d032fc1b87b3f:"Descripci\xF3n de audio",s08b06007b5567108:"de",s08e6bd98452e6bb9:"Audio",s1b4a36fce2456660:"Familia de fuentes",s1fa5be5a4f5d0f04:"Informal",s23537b5c9e7af982:"Subt\xEDtulos",s24221a89168e9d21:"Tama\xF1o de fuente",s255857544a9d5ec0:"Restablecer",s25a858f0257e2879:"Men\xFA Subt\xEDtulos",s2df075aface0dab8:"Compartir",s2f5d5d2d1f92de26:"Descargar v\xEDdeo",s302cbb19bf9a174a:"Desactivado",s308604b3ae13fbb5:"Reproduciendo",s344ea8f4939cdc98:"Color",s3687049d1af562c4:"Copiar",s36b979e4de5152b3:"V\xEDnculo copiado",s37a9e8aec5713460:"M\xE1s",s3ca1bdfa8785f808:"Sans Serif proporcional",s49f06dca0feeb2f3:"Uniforme",s4b023aafbd8d5ac8:"Comparte este v\xEDdeo por",s4b10acae683d2978:"Pantalla completa",s500caa88d20458d3:"No puedes acceder a este contenido",s5267658ceae3230f:"Compartir este v\xEDdeo",s5c5db15dfc3a5376:"Velocidad de reproducci\xF3n",s5e3cb80d43a34044:"Negro",s5e8250fb85d64c23:"Cerrar",s669b18c6d2d9c95b:"Ninguna",s66d852e3c020e79e:"Opaco",s6a3bf589eaf72169:"Serif monoespaciada",s6baf78886c99db89:"Amarillo",s6f59e9b81c5a47e0:"Sombra paralela",s711d047dea682c1a:"Pista de audio",s7d148a08796094d2:"Error de reproducci\xF3n",s81a19821f3e4a3d2:"Reproducir",s827bc70ebcb7bbc6:"Sans Serif monoespaciada",s85186a61e0d55bac:"V\xEDdeo",s889413eb7198ea01:"opci\xF3n para desactivar los subt\xEDtulos",s8e408592fd4ae43a:"Estilo de borde del texto",s8e985aeeca6a8166:"Blanco",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Versalitas",s95bc8722b2708f8b:"En pausa",s973b83fb67a5865d:"Descargar transcripci\xF3n",s9b3c2f9cc32d565a:"Cian",s9c356016f81585f6:"Color de fondo",s9d8b8aa2b404c2c8:"Configuraci\xF3n",s9fbd543f2179c1ec:"Men\xFA Audio",sa000eaf7092088c3:"Barra de progreso",sa6f2645578b2d2bc:"A\xF1o",sa9011e79e3ca2d18:"Presionado",saf9b398ab363c174:"Escribe tu fecha de nacimiento",sb3d4f79d9d8b71e5:"Enviar",sb47daaf9e1c4a905:"Mes",sb9f16a5f9c29f41e:"Lo sentimos, se ha producido un error.",sba64d8954d027206:"Opacidad",sc07837c309cc699b:"Reactivar audio",scd105819b5a10243:"Reproducir",sce836928a17d96ed:"Color del texto",scf00d78fd5953f1c:"Verde",sd3386a2ef42e80b9:"Descargar",sd8d4b1b613d28990:"Cursiva",sdb02f53e62c1da05:"Elevado",sdb73788b3c975f16:"Autom\xE1tico",se0955919920ee87d:"D\xEDa",se0f67eae944f8f94:"Silenciar",se73c59cc10f48c12:"Redes sociales",secf3d3a7c1693e2d:"Azul",sed31876562d94652:"Configuraci\xF3n de las leyendas",sf113fa256db9617b:"Finalizado",sf675f879b1c892c6:"Calidad",sfc24a457269b13d4:"Control deslizante de volumen",sfcb817633bf70e1b:"Serif proporcional"},I$=Object.freeze(Object.defineProperty({__proto__:null,templates:M_},Symbol.toStringTag,{value:"Module"})),__={s0289cd9e4bcf84c5:"Nivel de volumen",s061cc20e3432dead:"Pausar",s0622a6e6cb77254b:"Transcripci\xF3n",s080d032fc1b87b3f:"Descripci\xF3n de audio",s08b06007b5567108:"de",s08e6bd98452e6bb9:"Audio",s1b4a36fce2456660:"Familia de fuentes",s1fa5be5a4f5d0f04:"Casual",s23537b5c9e7af982:"Subt\xEDtulos",s24221a89168e9d21:"Tama\xF1o de la fuente",s255857544a9d5ec0:"Restablecer",s25a858f0257e2879:"Men\xFA de subt\xEDtulos",s2df075aface0dab8:"Compartir",s2f5d5d2d1f92de26:"Descargar video",s302cbb19bf9a174a:"Desactivado",s308604b3ae13fbb5:"Reproduciendo",s344ea8f4939cdc98:"Color",s3687049d1af562c4:"Copiar",s36b979e4de5152b3:"V\xEDnculo copiado",s37a9e8aec5713460:"M\xE1s",s3ca1bdfa8785f808:"Sin serifa, proporcional",s49f06dca0feeb2f3:"Uniforme",s4b023aafbd8d5ac8:"Comparte este video en",s4b10acae683d2978:"Pantalla completa",s500caa88d20458d3:"No puedes acceder a este contenido",s5267658ceae3230f:"Compartir este video",s5c5db15dfc3a5376:"Velocidad de reproducci\xF3n",s5e3cb80d43a34044:"Negro",s5e8250fb85d64c23:"Cerrar",s669b18c6d2d9c95b:"Ninguno",s66d852e3c020e79e:"Opaco",s6a3bf589eaf72169:"Serif monoespaciada",s6baf78886c99db89:"Amarillo",s6f59e9b81c5a47e0:"Sombra paralela",s711d047dea682c1a:"Pista de audio",s7d148a08796094d2:"Error de reproducci\xF3n",s81a19821f3e4a3d2:"Repetir",s827bc70ebcb7bbc6:"Sin serifa, monoespaciada",s85186a61e0d55bac:"Video",s889413eb7198ea01:"opci\xF3n para desactivar subt\xEDtulos",s8e408592fd4ae43a:"Estilo del borde del texto",s8e985aeeca6a8166:"Blanco",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Versalitas",s95bc8722b2708f8b:"En pausa",s973b83fb67a5865d:"Descargar transcripci\xF3n",s9b3c2f9cc32d565a:"Cian",s9c356016f81585f6:"Color de fondo",s9d8b8aa2b404c2c8:"Configuraci\xF3n",s9fbd543f2179c1ec:"Men\xFA de audio",sa000eaf7092088c3:"Barra de progreso",sa6f2645578b2d2bc:"A\xF1o",sa9011e79e3ca2d18:"En relieve negativo",saf9b398ab363c174:"Introduce tu fecha de nacimiento",sb3d4f79d9d8b71e5:"Enviar",sb47daaf9e1c4a905:"Mes",sb9f16a5f9c29f41e:"Lo sentimos, pero algo sali\xF3 mal.",sba64d8954d027206:"Opacidad",sc07837c309cc699b:"Reactivar audio",scd105819b5a10243:"Reproducir",sce836928a17d96ed:"Color del texto",scf00d78fd5953f1c:"Verde",sd3386a2ef42e80b9:"Descargar",sd8d4b1b613d28990:"Cursiva",sdb02f53e62c1da05:"Elevado",sdb73788b3c975f16:"Autom\xE1tico",se0955919920ee87d:"D\xEDa",se0f67eae944f8f94:"Silenciar",se73c59cc10f48c12:"Redes sociales",secf3d3a7c1693e2d:"Azul",sed31876562d94652:"Configuraci\xF3n de subt\xEDtulos",sf113fa256db9617b:"Termin\xF3",sf675f879b1c892c6:"Calidad",sfc24a457269b13d4:"Control deslizante de volumen",sfcb817633bf70e1b:"Con serifa, proporcional"},M$=Object.freeze(Object.defineProperty({__proto__:null,templates:__},Symbol.toStringTag,{value:"Module"})),D_={s0289cd9e4bcf84c5:"Volume sonore",s061cc20e3432dead:"Pause",s0622a6e6cb77254b:"Transcription",s080d032fc1b87b3f:"Descriptions audio",s08b06007b5567108:"de",s08e6bd98452e6bb9:"Audio",s1b4a36fce2456660:"Famille de police",s1fa5be5a4f5d0f04:"Informel",s23537b5c9e7af982:"Sous-titres",s24221a89168e9d21:"Taille de police",s255857544a9d5ec0:"R\xE9initialiser",s25a858f0257e2879:"Menu des sous-titres",s2df075aface0dab8:"Partager",s2f5d5d2d1f92de26:"T\xE9l\xE9charger la vid\xE9o",s302cbb19bf9a174a:"D\xE9sactiv\xE9",s308604b3ae13fbb5:"Lecture",s344ea8f4939cdc98:"Couleur",s3687049d1af562c4:"Copier",s36b979e4de5152b3:"Lien copi\xE9",s37a9e8aec5713460:"Plus",s3ca1bdfa8785f808:"Sans Serif proportionnelle",s49f06dca0feeb2f3:"Uniforme",s4b023aafbd8d5ac8:"Partager cette vid\xE9o sur",s4b10acae683d2978:"Plein \xE9cran",s500caa88d20458d3:"Vous n\u2019\xEAtes pas autoris\xE9 \xE0 acc\xE9der \xE0 ce contenu",s5267658ceae3230f:"Partager cette vid\xE9o",s5c5db15dfc3a5376:"Vitesse de lecture",s5e3cb80d43a34044:"Noir",s5e8250fb85d64c23:"Fermer",s669b18c6d2d9c95b:"Aucune",s66d852e3c020e79e:"Opaque",s6a3bf589eaf72169:"Serif non proportionnelle",s6baf78886c99db89:"Jaune",s6f59e9b81c5a47e0:"Ombre port\xE9e",s711d047dea682c1a:"Piste audio",s7d148a08796094d2:"Erreur de lecture",s81a19821f3e4a3d2:"Relecture",s827bc70ebcb7bbc6:"Sans Serif non proportionnelle",s85186a61e0d55bac:"Vid\xE9o",s889413eb7198ea01:"option pour d\xE9sactiver les sous-titres",s8e408592fd4ae43a:"Style du bord du texte",s8e985aeeca6a8166:"Blanc",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Petites capitales",s95bc8722b2708f8b:"En pause",s973b83fb67a5865d:"T\xE9l\xE9charger la transcription",s9b3c2f9cc32d565a:"Cyan",s9c356016f81585f6:"Couleur de l\u2019arri\xE8re-plan",s9d8b8aa2b404c2c8:"Param\xE8tres",s9fbd543f2179c1ec:"Menu Audio",sa000eaf7092088c3:"Barre de progression",sa6f2645578b2d2bc:"Ann\xE9e",sa9011e79e3ca2d18:"Enfonc\xE9",saf9b398ab363c174:"Saisissez votre date de naissance",sb3d4f79d9d8b71e5:"Envoyer",sb47daaf9e1c4a905:"Mois",sb9f16a5f9c29f41e:"Nous sommes d\xE9sol\xE9s, mais une erreur s\u2019est produite.",sba64d8954d027206:"Opacit\xE9",sc07837c309cc699b:"Activer le son",scd105819b5a10243:"Lecture",sce836928a17d96ed:"Couleur du texte",scf00d78fd5953f1c:"Vert",sd3386a2ef42e80b9:"T\xE9l\xE9charger",sd8d4b1b613d28990:"Cursive",sdb02f53e62c1da05:"D\xE9clench\xE9",sdb73788b3c975f16:"Automatique",se0955919920ee87d:"Jour",se0f67eae944f8f94:"Couper le son",se73c59cc10f48c12:"R\xE9seaux sociaux",secf3d3a7c1693e2d:"Bleu",sed31876562d94652:"Param\xE8tres des sous-titres",sf113fa256db9617b:"Termin\xE9(e)s",sf675f879b1c892c6:"Qualit\xE9",sfc24a457269b13d4:"Curseur de volume",sfcb817633bf70e1b:"Serif proportionnelle"},_$=Object.freeze(Object.defineProperty({__proto__:null,templates:D_},Symbol.toStringTag,{value:"Module"})),P_={s0289cd9e4bcf84c5:"Livello volume",s061cc20e3432dead:"Sospendi",s0622a6e6cb77254b:"Trascrizione",s080d032fc1b87b3f:"Descrizione audio",s08b06007b5567108:"di",s08e6bd98452e6bb9:"Audio",s1b4a36fce2456660:"Famiglia di caratteri",s1fa5be5a4f5d0f04:"Informale",s23537b5c9e7af982:"Sottotitoli",s24221a89168e9d21:"Dimensioni carattere",s255857544a9d5ec0:"Reimposta",s25a858f0257e2879:"Menu Sottotitoli",s2df075aface0dab8:"Condividi",s2f5d5d2d1f92de26:"Scarica video",s302cbb19bf9a174a:"Disattiva",s308604b3ae13fbb5:"In riproduzione",s344ea8f4939cdc98:"Colore",s3687049d1af562c4:"Copia",s36b979e4de5152b3:"Collegamento copiato",s37a9e8aec5713460:"Altro",s3ca1bdfa8785f808:"Proportional Sans Serif",s49f06dca0feeb2f3:"Uniforme",s4b023aafbd8d5ac8:"Condividi questo video",s4b10acae683d2978:"Schermo intero",s500caa88d20458d3:"Non puoi accedere a questo contenuto",s5267658ceae3230f:"Condividi questo video",s5c5db15dfc3a5376:"Frequenza di riproduzione",s5e3cb80d43a34044:"Nero",s5e8250fb85d64c23:"Chiudi",s669b18c6d2d9c95b:"Nessuno",s66d852e3c020e79e:"Opaco",s6a3bf589eaf72169:"Monospace Serif",s6baf78886c99db89:"Giallo",s6f59e9b81c5a47e0:"Ombreggiatura",s711d047dea682c1a:"Traccia audio",s7d148a08796094d2:"Errore di riproduzione",s81a19821f3e4a3d2:"Riproduci",s827bc70ebcb7bbc6:"Monospace Sans Serif",s85186a61e0d55bac:"Video",s889413eb7198ea01:"opzione per disattivare i sottotitoli",s8e408592fd4ae43a:"Stile bordo testo",s8e985aeeca6a8166:"Bianco",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Maiuscoletto",s95bc8722b2708f8b:"In pausa",s973b83fb67a5865d:"Scarica trascrizione",s9b3c2f9cc32d565a:"Ciano",s9c356016f81585f6:"Colore di sfondo",s9d8b8aa2b404c2c8:"Impostazioni",s9fbd543f2179c1ec:"Menu Audio",sa000eaf7092088c3:"Indicatore di stato",sa6f2645578b2d2bc:"Anno",sa9011e79e3ca2d18:"Incassato",saf9b398ab363c174:"Immetti la tua data di nascita",sb3d4f79d9d8b71e5:"Invia",sb47daaf9e1c4a905:"Mese",sb9f16a5f9c29f41e:"Siamo spiacenti. Si \xE8 verificato un problema.",sba64d8954d027206:"Opacit\xE0",sc07837c309cc699b:"Attiva audio",scd105819b5a10243:"Riproduci",sce836928a17d96ed:"Colore testo",scf00d78fd5953f1c:"Verde",sd3386a2ef42e80b9:"Scarica",sd8d4b1b613d28990:"Corsivo",sdb02f53e62c1da05:"In rilievo",sdb73788b3c975f16:"Auto",se0955919920ee87d:"Giorno",se0f67eae944f8f94:"Disattiva audio",se73c59cc10f48c12:"Social",secf3d3a7c1693e2d:"Blu",sed31876562d94652:"Impostazioni sottotitolo",sf113fa256db9617b:"Completato",sf675f879b1c892c6:"Qualit\xE0",sfc24a457269b13d4:"Dispositivo di scorrimento volume",sfcb817633bf70e1b:"Proportional Serif"},D$=Object.freeze(Object.defineProperty({__proto__:null,templates:P_},Symbol.toStringTag,{value:"Module"})),L_={s0289cd9e4bcf84c5:"N\xEDvel de volume",s061cc20e3432dead:"Pausar",s0622a6e6cb77254b:"Transcri\xE7\xE3o",s080d032fc1b87b3f:"Descri\xE7\xE3o de \xE1udio",s08b06007b5567108:"de",s08e6bd98452e6bb9:"\xC1udio",s1b4a36fce2456660:"Fam\xEDlia de fontes",s1fa5be5a4f5d0f04:"Casual",s23537b5c9e7af982:"Legendas",s24221a89168e9d21:"Tamanho da fonte",s255857544a9d5ec0:"Redefinir",s25a858f0257e2879:"Menu Legendas",s2df075aface0dab8:"Compartilhar",s2f5d5d2d1f92de26:"Baixar o v\xEDdeo",s302cbb19bf9a174a:"Desligado",s308604b3ae13fbb5:"Reproduzindo",s344ea8f4939cdc98:"Cor",s3687049d1af562c4:"Copiar",s36b979e4de5152b3:"Link copiado",s37a9e8aec5713460:"Mais",s3ca1bdfa8785f808:"Sans Serif Proporcional",s49f06dca0feeb2f3:"Uniforme",s4b023aafbd8d5ac8:"Compartilhar este v\xEDdeo no",s4b10acae683d2978:"Tela inteira",s500caa88d20458d3:"Voc\xEA n\xE3o pode acessar este conte\xFAdo",s5267658ceae3230f:"Compartilhar este v\xEDdeo",s5c5db15dfc3a5376:"Taxa de reprodu\xE7\xE3o",s5e3cb80d43a34044:"Preto",s5e8250fb85d64c23:"Fechar",s669b18c6d2d9c95b:"Nenhum",s66d852e3c020e79e:"Opaco",s6a3bf589eaf72169:"Serifa monoespa\xE7ada",s6baf78886c99db89:"Amarelo",s6f59e9b81c5a47e0:"Sombra",s711d047dea682c1a:"Faixa de \xE1udio",s7d148a08796094d2:"Erro de reprodu\xE7\xE3o",s81a19821f3e4a3d2:"Repetir",s827bc70ebcb7bbc6:"Sans Serif Monoespa\xE7ado",s85186a61e0d55bac:"V\xEDdeo",s889413eb7198ea01:"op\xE7\xE3o para desativar a legenda",s8e408592fd4ae43a:"Estilo de borda de texto",s8e985aeeca6a8166:"Branco",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Letras min\xFAsculas",s95bc8722b2708f8b:"Pausado",s973b83fb67a5865d:"Baixar a transcri\xE7\xE3o",s9b3c2f9cc32d565a:"Ciano",s9c356016f81585f6:"Cor de fundo",s9d8b8aa2b404c2c8:"Configura\xE7\xF5es",s9fbd543f2179c1ec:"Menu \xC1udio",sa000eaf7092088c3:"Barra de progresso",sa6f2645578b2d2bc:"Ano",sa9011e79e3ca2d18:"Para baixo",saf9b398ab363c174:"Digite sua data de nascimento",sb3d4f79d9d8b71e5:"Enviar",sb47daaf9e1c4a905:"M\xEAs",sb9f16a5f9c29f41e:"Lamentamos, mas algo deu errado.",sba64d8954d027206:"Opacidade",sc07837c309cc699b:"Desativar mudo",scd105819b5a10243:"Jogar",sce836928a17d96ed:"Cor do texto",scf00d78fd5953f1c:"Verde",sd3386a2ef42e80b9:"Baixar",sd8d4b1b613d28990:"Cursiva",sdb02f53e62c1da05:"Para cima",sdb73788b3c975f16:"Autom\xE1tico",se0955919920ee87d:"Dia",se0f67eae944f8f94:"Ativar mudo",se73c59cc10f48c12:"Redes sociais",secf3d3a7c1693e2d:"Azul",sed31876562d94652:"Configura\xE7\xF5es de legenda",sf113fa256db9617b:"Finalizado",sf675f879b1c892c6:"Qualidade",sfc24a457269b13d4:"Controle deslizante de volume",sfcb817633bf70e1b:"Serifa proporcional"},P$=Object.freeze(Object.defineProperty({__proto__:null,templates:L_},Symbol.toStringTag,{value:"Module"})),R_={en:"en-us",es:"es-es",de:"de-de",fi:"fi-fi",fr:"fr-fr",hi:"hi-in",hu:"hu-hu",is:"is-is",it:"it-it",ja:"ja-jp",kk:"kk-kz",ko:"ko-kr",lt:"lt-lt",lv:"lv-lv",mk:"mk-mk",mt:"mt-mt",nb:"nb-no",nn:"nn-no",pl:"pl-pl",pt:"pt-pt",ro:"ro-ro",ru:"ru-ru",sk:"sk-sk",sl:"sl-si",sq:"sq-al",sv:"sv-se",ta:"ta-in",te:"te-in",th:"th-th",tr:"tr-tr",uk:"uk-ua",ur:"ur-pk",uz:"uz-uz",vi:"vi-vn",zh:"zh-cn"};function qx(o){try{return new Intl.DisplayNames([o],{type:"language",fallback:"none"}).of(o)}catch{return}}const A0=o=>{const s=new Map,c=o.map(h=>{const[d,m]=h.split("-");let b=qx(d),f=null;if(!b)b=h;else if(m){const D=qx(h);D&&D!==b&&(f=D)}else{const D=R_[d.toLowerCase()];if(D){const N=qx(D);N&&N!==b&&(f=N)}}let A=s.get(b);A||(A=[],s.set(b,A));const M={code:h,fallbackName:f,selectedName:b};return A.push(M),M});for(const[h,d]of s)if(d.length>1&&new Set(d.map(m=>m.fallbackName)).size>1)for(const m of d)m.selectedName=m.fallbackName||h;return Object.fromEntries(c.map(h=>[h.code,h.selectedName]))},E0=o=>{if(o)return o=o.toLowerCase(),E$.includes(o)?o:R_[o.split("-")[0]]},L$=new Set(["??-??-????????","???-????-??","??-????-??","???-????","??-????","???-??","??-??","???","??"]),R$=Array.from(L$).map(o=>`(?:${o.replace(/\?/g,"[a-zA-Z]")})`).join("|");function N$(){const o=new RegExp(`^https?://[^/]+/(${R$})/[^/]+.*`),s=window.location.href.match(o);return s&&E0(s[1])||null}const Gx=new Map,N_={"es-es":{templates:M_},"pt-br":{templates:L_},"en-gb":{templates:I_},"fr-fr":{templates:D_},"es-mx":{templates:__},"it-it":{templates:P_}};let O_=o=>k$(Object.assign({"../generated/locales/af-za.ts":()=>import("./chunks/af-za-ixl2wg25.mjs"),"../generated/locales/am-et.ts":()=>import("./chunks/am-et-f18276sz.mjs"),"../generated/locales/ar-sa.ts":()=>import("./chunks/ar-sa-ea6j9pts.mjs"),"../generated/locales/as-in.ts":()=>import("./chunks/as-in-e6x2exf8.mjs"),"../generated/locales/be-by.ts":()=>import("./chunks/be-by-bu06xfze.mjs"),"../generated/locales/bg-bg.ts":()=>import("./chunks/bg-bg-hnn2i45x.mjs"),"../generated/locales/bn-in.ts":()=>import("./chunks/bn-in-jfpzw5mj.mjs"),"../generated/locales/ca-es.ts":()=>import("./chunks/ca-es-ood0szkj.mjs"),"../generated/locales/cs-cz.ts":()=>import("./chunks/cs-cz-f6ra6ozr.mjs"),"../generated/locales/cy-gb.ts":()=>import("./chunks/cy-gb-gcfc3toi.mjs"),"../generated/locales/da-dk.ts":()=>import("./chunks/da-dk-ouft1qb5.mjs"),"../generated/locales/de-at.ts":()=>import("./chunks/de-at-ceegp3ro.mjs"),"../generated/locales/de-ch.ts":()=>import("./chunks/de-ch-nrq4g66c.mjs"),"../generated/locales/de-de.ts":()=>import("./chunks/de-de-i4mdhbb4.mjs"),"../generated/locales/el-gr.ts":()=>import("./chunks/el-gr-ghpky4be.mjs"),"../generated/locales/en-au.ts":()=>import("./chunks/en-au-b8j0ipdh.mjs"),"../generated/locales/en-ca.ts":()=>import("./chunks/en-ca-mhsqk44y.mjs"),"../generated/locales/en-gb.ts":()=>Promise.resolve().then(()=>C$),"../generated/locales/en-hk.ts":()=>import("./chunks/en-hk-l2g6wy0a.mjs"),"../generated/locales/en-ie.ts":()=>import("./chunks/en-ie-b8j0ipdh.mjs"),"../generated/locales/en-in.ts":()=>import("./chunks/en-in-l2g6wy0a.mjs"),"../generated/locales/en-my.ts":()=>import("./chunks/en-my-l2g6wy0a.mjs"),"../generated/locales/en-nz.ts":()=>import("./chunks/en-nz-l2g6wy0a.mjs"),"../generated/locales/en-ph.ts":()=>import("./chunks/en-ph-l2g6wy0a.mjs"),"../generated/locales/en-sg.ts":()=>import("./chunks/en-sg-l2g6wy0a.mjs"),"../generated/locales/en-za.ts":()=>import("./chunks/en-za-b8j0ipdh.mjs"),"../generated/locales/es-ar.ts":()=>import("./chunks/es-ar-m7ioz3my.mjs"),"../generated/locales/es-cl.ts":()=>import("./chunks/es-cl-m7ioz3my.mjs"),"../generated/locales/es-co.ts":()=>import("./chunks/es-co-m7ioz3my.mjs"),"../generated/locales/es-es.ts":()=>Promise.resolve().then(()=>I$),"../generated/locales/es-mx.ts":()=>Promise.resolve().then(()=>M$),"../generated/locales/et-ee.ts":()=>import("./chunks/et-ee-gbwem6dj.mjs"),"../generated/locales/eu-es.ts":()=>import("./chunks/eu-es-5rvohe1h.mjs"),"../generated/locales/fa-ir.ts":()=>import("./chunks/fa-ir-ggbh58b2.mjs"),"../generated/locales/fi-fi.ts":()=>import("./chunks/fi-fi-o9mahiu2.mjs"),"../generated/locales/fr-be.ts":()=>import("./chunks/fr-be-ntfxengq.mjs"),"../generated/locales/fr-ca.ts":()=>import("./chunks/fr-ca-kepykyyb.mjs"),"../generated/locales/fr-ch.ts":()=>import("./chunks/fr-ch-ibidugur.mjs"),"../generated/locales/fr-fr.ts":()=>Promise.resolve().then(()=>_$),"../generated/locales/fr-ma.ts":()=>import("./chunks/fr-ma-o4bbmbrv.mjs"),"../generated/locales/ga-ie.ts":()=>import("./chunks/ga-ie-dsbk1hdh.mjs"),"../generated/locales/gd-gb.ts":()=>import("./chunks/gd-gb-p5176ptt.mjs"),"../generated/locales/gl-es.ts":()=>import("./chunks/gl-es-g0vb8grd.mjs"),"../generated/locales/gu-in.ts":()=>import("./chunks/gu-in-eebpahey.mjs"),"../generated/locales/he-il.ts":()=>import("./chunks/he-il-myz8r1by.mjs"),"../generated/locales/hi-in.ts":()=>import("./chunks/hi-in-ix8pc849.mjs"),"../generated/locales/hr-hr.ts":()=>import("./chunks/hr-hr-gidaiu8p.mjs"),"../generated/locales/hu-hu.ts":()=>import("./chunks/hu-hu-eco9d76j.mjs"),"../generated/locales/hy-am.ts":()=>import("./chunks/hy-am-nim17b8l.mjs"),"../generated/locales/id-id.ts":()=>import("./chunks/id-id-ig5r2k54.mjs"),"../generated/locales/is-is.ts":()=>import("./chunks/is-is-lefctcbo.mjs"),"../generated/locales/it-it.ts":()=>Promise.resolve().then(()=>D$),"../generated/locales/ja-jp.ts":()=>import("./chunks/ja-jp-l0v2ypsl.mjs"),"../generated/locales/ka-ge.ts":()=>import("./chunks/ka-ge-d3prdyok.mjs"),"../generated/locales/kk-kz.ts":()=>import("./chunks/kk-kz-le5gf5kf.mjs"),"../generated/locales/kn-in.ts":()=>import("./chunks/kn-in-d0h6out0.mjs"),"../generated/locales/ko-kr.ts":()=>import("./chunks/ko-kr-oopl3hze.mjs"),"../generated/locales/ky-kg.ts":()=>import("./chunks/ky-kg-etlfkge4.mjs"),"../generated/locales/lb-lu.ts":()=>import("./chunks/lb-lu-bgq1kl88.mjs"),"../generated/locales/lo-la.ts":()=>import("./chunks/lo-la-hj4k99zi.mjs"),"../generated/locales/lt-lt.ts":()=>import("./chunks/lt-lt-luc325lx.mjs"),"../generated/locales/lv-lv.ts":()=>import("./chunks/lv-lv-lrio1ftx.mjs"),"../generated/locales/mi-nz.ts":()=>import("./chunks/mi-nz-ga73uumg.mjs"),"../generated/locales/mk-mk.ts":()=>import("./chunks/mk-mk-nem4p3mz.mjs"),"../generated/locales/ml-in.ts":()=>import("./chunks/ml-in-p8ny4f2j.mjs"),"../generated/locales/mr-in.ts":()=>import("./chunks/mr-in-lwtpac3u.mjs"),"../generated/locales/ms-bn.ts":()=>import("./chunks/ms-bn-k6nsdxk0.mjs"),"../generated/locales/ms-my.ts":()=>import("./chunks/ms-my-garoesp4.mjs"),"../generated/locales/mt-mt.ts":()=>import("./chunks/mt-mt-e4uv9ros.mjs"),"../generated/locales/nb-no.ts":()=>import("./chunks/nb-no-kxu5p51g.mjs"),"../generated/locales/ne-np.ts":()=>import("./chunks/ne-np-mgjw08gl.mjs"),"../generated/locales/nl-be.ts":()=>import("./chunks/nl-be-o1igpm94.mjs"),"../generated/locales/nl-nl.ts":()=>import("./chunks/nl-nl-g5scdy2t.mjs"),"../generated/locales/nn-no.ts":()=>import("./chunks/nn-no-hn6o1g7h.mjs"),"../generated/locales/or-in.ts":()=>import("./chunks/or-in-n2elk53p.mjs"),"../generated/locales/pa-in.ts":()=>import("./chunks/pa-in-cu6865fk.mjs"),"../generated/locales/pl-pl.ts":()=>import("./chunks/pl-pl-l81ocd5n.mjs"),"../generated/locales/ps-af.ts":()=>import("./chunks/ps-af-lv949dal.mjs"),"../generated/locales/pt-br.ts":()=>Promise.resolve().then(()=>P$),"../generated/locales/pt-pt.ts":()=>import("./chunks/pt-pt-jnt8hawj.mjs"),"../generated/locales/ro-ro.ts":()=>import("./chunks/ro-ro-ccol19en.mjs"),"../generated/locales/ru-ru.ts":()=>import("./chunks/ru-ru-eh7zf8tg.mjs"),"../generated/locales/si-lk.ts":()=>import("./chunks/si-lk-h9ad9058.mjs"),"../generated/locales/sk-sk.ts":()=>import("./chunks/sk-sk-m1jztb16.mjs"),"../generated/locales/sl-si.ts":()=>import("./chunks/sl-si-koqioh37.mjs"),"../generated/locales/sq-al.ts":()=>import("./chunks/sq-al-nzj00g5t.mjs"),"../generated/locales/sv-se.ts":()=>import("./chunks/sv-se-bw5cj65t.mjs"),"../generated/locales/sw-ke.ts":()=>import("./chunks/sw-ke-gtvztbrk.mjs"),"../generated/locales/ta-in.ts":()=>import("./chunks/ta-in-bwuizzqe.mjs"),"../generated/locales/te-in.ts":()=>import("./chunks/te-in-iu20fasc.mjs"),"../generated/locales/tg-tj.ts":()=>import("./chunks/tg-tj-j6uadteo.mjs"),"../generated/locales/th-th.ts":()=>import("./chunks/th-th-bdw4g6t5.mjs"),"../generated/locales/ti-et.ts":()=>import("./chunks/ti-et-l8jw4krw.mjs"),"../generated/locales/tk-tm.ts":()=>import("./chunks/tk-tm-mn7x5jxx.mjs"),"../generated/locales/tr-tr.ts":()=>import("./chunks/tr-tr-mqqp2dfn.mjs"),"../generated/locales/tt-ru.ts":()=>import("./chunks/tt-ru-hdruk2c8.mjs"),"../generated/locales/ug-cn.ts":()=>import("./chunks/ug-cn-jwk6dtwn.mjs"),"../generated/locales/uk-ua.ts":()=>import("./chunks/uk-ua-gbnmne9j.mjs"),"../generated/locales/ur-in.ts":()=>import("./chunks/ur-in-n4074pn5.mjs"),"../generated/locales/ur-pk.ts":()=>import("./chunks/ur-pk-n4074pn5.mjs"),"../generated/locales/uz-uz.ts":()=>import("./chunks/uz-uz-gi9gsaxu.mjs"),"../generated/locales/vi-vn.ts":()=>import("./chunks/vi-vn-molc9qeu.mjs"),"../generated/locales/wo-sn.ts":()=>import("./chunks/wo-sn-lsuzp9jp.mjs"),"../generated/locales/xh-za.ts":()=>import("./chunks/xh-za-kmwuquo5.mjs"),"../generated/locales/yo-ng.ts":()=>import("./chunks/yo-ng-lu15tgfy.mjs"),"../generated/locales/zh-cn.ts":()=>import("./chunks/zh-cn-gvaege75.mjs"),"../generated/locales/zh-hk.ts":()=>import("./chunks/zh-hk-jb0jt0k3.mjs"),"../generated/locales/zh-tw.ts":()=>import("./chunks/zh-tw-m1so7y8j.mjs"),"../generated/locales/zu-za.ts":()=>import("./chunks/zu-za-kwmv9pdq.mjs")}),`../generated/locales/${o}.ts`,4);function O$(o){let s=Gx.get(o);return s||(N_[o]?s=Promise.resolve(N_[o]):s=O_(o),Gx.set(o,s)),s}const{getLocale:U$,setLocale:F$}=VV({sourceLocale:T$,targetLocales:A$,loadLocale:O$}),j$=o=>{const s=E0(o),c=E0(document.documentElement.lang),h=N$(),d=E0(Nx.language)||Nx.language;return s||c||h||d};function B$(o,s){Gx.set(o,Promise.resolve(s))}function V$(o){O_=o}function Kx(o){const s=Math.floor(o/3600),c=Math.floor(o%3600/60),h=Math.floor(o%60),d=s>0?`${s}:`:"",m=`${c.toString().padStart(s>0?2:1,"0")}:`,b=h.toString().padStart(2,"0");return`${d}${m}${b}`}const U_=new Map;function $$(o){let s=U_.get(o);return s||(s={hour:new Intl.NumberFormat(o,{style:"unit",unit:"hour",unitDisplay:"long"}),minute:new Intl.NumberFormat(o,{style:"unit",unit:"minute",unitDisplay:"long"}),second:new Intl.NumberFormat(o,{style:"unit",unit:"second",unitDisplay:"long"})},U_.set(o,s)),s}function F_(o,s){const c=$$(s);if(Math.floor(o)===0)return c.second.format(0);const h=Math.floor(o/3600),d=Math.floor(o%3600/60),m=Math.floor(o%60),b=[];return h>0&&b.push(c.hour.format(h)),d>0&&b.push(c.minute.format(d)),m>0&&b.push(c.second.format(m)),b.join(", ")}const z$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.03 13.9 3.56 10a.75.75 0 0 0-1.12 1l4 4.5c.29.32.79.34 1.09.03l10.5-10.5a.75.75 0 0 0-1.06-1.06l-9.94 9.94Z"/></svg>',H$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m4.09 4.22.06-.07a.5.5 0 0 1 .63-.06l.07.06L10 9.29l5.15-5.14a.5.5 0 0 1 .63-.06l.07.06c.18.17.2.44.06.63l-.06.07L10.71 10l5.14 5.15c.18.17.2.44.06.63l-.06.07a.5.5 0 0 1-.63.06l-.07-.06L10 10.71l-5.15 5.14a.5.5 0 0 1-.63.06l-.07-.06a.5.5 0 0 1-.06-.63l.06-.07L9.29 10 4.15 4.85a.5.5 0 0 1-.06-.63l.06-.07-.06.07Z"/></svg>',q$='<svg width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><path d="m18.27 3.21 7.5 7.25a.75.75 0 0 1 0 1.08l-7.5 7.25a.73.73 0 0 1-.81.15.75.75 0 0 1-.46-.69v-3.74c-6.7.27-9.52 4.02-9.64 4.18a.77.77 0 0 1-.84.27.75.75 0 0 1-.52-.71c0-8.02 6.59-10.48 11-10.73V3.75a.75.75 0 0 1 1.27-.54Zm.23 10.54v2.71L24.17 11 18.5 5.52v2.73a.76.76 0 0 1-.75.75c-.97 0-8.85.22-10.09 7.28A15.58 15.58 0 0 1 17.75 13a.76.76 0 0 1 .75.75Zm4.22 5.47a.76.76 0 0 1 .53-.22.76.76 0 0 1 .75.75v.5A4.75 4.75 0 0 1 19.25 25H7.75A4.75 4.75 0 0 1 3 20.25V8.75A4.75 4.75 0 0 1 7.75 4h4.5a.75.75 0 1 1 0 1.5h-4.5A3.26 3.26 0 0 0 4.5 8.75v11.5a3.26 3.26 0 0 0 3.25 3.25h11.5a3.26 3.26 0 0 0 3.25-3.25v-.5c0-.2.08-.39.22-.53Z"/></svg>',C0=Cn`
.dialog{background-color:var(--color-brand-30);color:var(--color-neutral-foreground-1);border-radius:var(--border-radius-x-large);border:solid var(--stroke-width-thin) var(--color-white-alpha-30);box-shadow:var(--shadow-8)}
`;var G$=Object.defineProperty,K$=Object.getOwnPropertyDescriptor,Wx=(o,s,c,h)=>{for(var d=h>1?void 0:h?K$(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&G$(s,c,d),d};let vf=class extends An{render(){const{shareOptions:o}=this.playerState,s=o.find(h=>h.id==="copy"),c=o.filter(h=>h.id!=="copy");return St`
      <dialog
        data-focusgroup
        @click=${this.onDialogClick}
        @keydown=${this.onKeyDown}
        @close=${this.onClose}
      >
        <div class="dialog-backdrop"></div>
        <div class="dialog" role="dialog" aria-label="${le("Share")}">
          <div class="share-icon">${cn(q$)}</div>

          <button
            type="button"
            class=${nt({btn:!0,"btn-sm":!0,"btn-subtle":!0,"btn-icon-only":!0,"btn-close":!0,...lt(this.playerState)})}
            @click=${this.onClose}
            aria-label=${le("Close")}
            data-id="close-button"
            data-testid="share-dialog-close-button"
          >
            ${cn(H$)}
          </button>

          <div class="dialog-content">
            <h2>${le("Share this video")}</h2>

            ${s?St`
                  <label>
                    <span class="section-title">Link</span>
                    <div class="input">
                      <input
                        type="text"
                        readonly
                        value="${s.url}"
                        title="${s.url}"
                      />

                      <button
                        type="button"
                        class=${nt({btn:!0,"btn-outline":!0,"btn-copy":!0,...lt(this.playerState)})}
                        @click=${this.onCopyButtonClicked(s.url)}
                        data-testid="copy-share-url-button"
                        aria-label="${le("Copy")}"
                      >
                        ${le("Copy")}
                      </button>
                    </div>
                  </label>
                `:null}

            <div>
              <span class="section-title">${le("Social")}</span>
              <div class="share-dialog-icons">
                ${c.map(h=>St`
                    <a
                      href=${h.url}
                      class=${nt({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,"btn-social":!0,...lt(this.playerState)})}
                      target="_blank"
                      aria-label="${le("Share this video on")} ${h.id}"
                      data-testid="share-social-${h.id}"
                    >
                      ${cn(h.icon)}
                    </a>
                  `)}
              </div>
            </div>
          </div>
        </div>
      </dialog>
    `}disconnectedCallback(){super.disconnectedCallback(),this.copyTimeoutId&&clearTimeout(this.copyTimeoutId)}firstUpdated(o){super.firstUpdated(o)}show(){this.dialog.show()}get opened(){return this.dialog.open}onCopyButtonClicked(o){return async s=>{try{const c=s.target;await navigator.clipboard.writeText(o),c.ariaLabel=le("Link Copied"),c.innerHTML=z$,this.copyTimeoutId&&clearTimeout(this.copyTimeoutId),this.copyTimeoutId=setTimeout(()=>{c.ariaLabel=le("Copy"),c.innerText=le("Copy")},3e3)}catch(c){console.log("error copying text",c)}}}onDialogClick(o){o.target===this.dialog&&this.onClose()}onKeyDown(o){this.playerState.disableKeyboardEvents||o.key==="Escape"&&this.onClose()}onClose(){this.dialog.close(),this.dispatchEvent(new Pt("share-dialog-closed"))}};vf.styles=[C0,so,Cn`
dialog{border:none;display:none;position:absolute;inset:0;align-items:center;justify-content:center;width:100%;height:100%;background-color:transparent;max-width:100%;max-height:100%;box-sizing:border-box;text-align:left}dialog[open]{display:flex}.dialog{padding:var(--spacing-xxl) var(--size-0) var(--spacing-xxl) var(--spacing-xxxl);gap:var(--spacing-xxl);z-index:10;margin:var(--spacing-xxl);position:relative;font-family:var(--controls-font-family);color:var(--color-neutral-foreground-1)}.dialog-backdrop{position:absolute;inset:0;background-color:var(--color-black-alpha-50);pointer-events:none}.share-icon{stroke:currentcolor;fill:currentcolor}.btn-close{position:absolute;right:var(--spacing-xl);top:var(--spacing-xl)}.btn-close:hover{background-color:transparent}.dialog-content{display:flex;flex-direction:column;gap:var(--spacing-xxl);margin-right:var(--spacing-xxxl);line-height:var(--spacing-xxl);margin-bottom:var(--spacing-xxxl);letter-spacing:var(--spacing-xxs);word-spacing:var(--spacing-xxs)}h2{margin-top:0;margin-bottom:var(--spacing-s);flex-grow:1}.section-title{display:block;margin-bottom:var(--spacing-m);font-weight:var(--font-weight-semibold)}.input{display:flex;align-items:center;border-radius:var(--border-radius-medium);border:solid var(--stroke-width-thin) var(--color-neutral-stroke-1);padding:var(--spacing-s) var(--spacing-m);border-color:var(--color-grey-86);gap:var(--spacing-m)}.input input{background-color:transparent;border:none;outline:none;margin:0;padding:0;font-family:var(--controls-font-family);font-size:var(--font-size-base-400);flex-grow:1;white-space:nowrap;text-overflow:ellipsis;opacity:0.8;color:var(--color-neutral-foreground-1)}.input .btn-copy{color:var(--color-white-alpha-70);font-weight:var(--font-weight-normal);flex-shrink:0;flex-basis:0;border-color:var(--color-brand-150);border-width:var(--stroke-width-thick);border-radius:var(--border-radius-x-large);padding:var(--spacing-xxs) var(--spacing-s)}.share-dialog-icons{display:flex;align-items:center;gap:var(--spacing-m)}.btn-social{background-color:var(--color-brand-140)}.btn-social svg{width:var(--size-6);height:var(--size-6);fill:var(--color-brand-40)}.btn-social:hover{background-color:var(--color-brand-150)}.btn-social:active{background-color:var(--color-brand-130)}@media (forced-colors:active){.btn-close:hover{background-color:Highlight;color:HighlightText}.btn-copy:hover{border-color:Highlight;color:HighlightText;forced-color-adjust:none}.btn-social svg{fill:ButtonText}.btn-social:hover{background-color:Highlight;border-color:Highlight}.btn-social:hover svg{fill:HighlightText}}
    `],Wx([On("dialog")],vf.prototype,"dialog",2),Wx([Tr({context:Ar,subscribe:!0})],vf.prototype,"playerState",2),vf=Wx([Xn("ump-share-dialog")],vf);var W$=Object.defineProperty,X$=Object.getOwnPropertyDescriptor,eu=(o,s,c,h)=>{for(var d=h>1?void 0:h?X$(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&W$(s,c,d),d};let Rr=class extends An{constructor(){super(...arguments),this.onSeekbarPointerDown=()=>{this.dispatchEvent(new Pt("seekbar-pointer-down"))},this.onSeekbarPointerMove=o=>{const s=o.target,c=m_(o.offsetX/s.clientWidth,0,1);s.dataset.tooltip=Kx(this.playerState.duration*c),s.style.setProperty("--tooltip-pointer-x",`${o.offsetX}px`)},this.onSeekbarPointerUp=()=>{this.dispatchEvent(new Pt("seekbar-pointer-up"))}}render(){const o=U$();return St`<div
        class="lower-controls-area"
        @focusin=${this.onFocusIn}
        ?inert=${this.playerState.shareDialogOpened}
      >
        <ump-slider
          class="seekbar slider tooltip"
          dir="ltr"
          @pointerdown=${this.onSeekbarPointerDown}
          @pointermove=${this.onSeekbarPointerMove}
          @pointerup=${this.onSeekbarPointerUp}
          @input=${this.onSeekbarSliderChanged}
          sliderarialabel="${le("Progress Bar")}"
          sliderAriaValueText="${F_(this.playerState.currentTime,o)} ${le("of")} ${F_(this.playerState.duration,o)}"
          value=${this.playerState.currentTime}
          min="0"
          max=${this.playerState.duration}
          focusStep=${1}
          data-testid="seekbar-slider"
          .ranges=${this.playerState.buffered}
        ></ump-slider>

        <div class="buttons">
          <button
            type="button"
            class=${nt({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...lt(this.playerState),tooltip:!0,"tooltip-top":!0,"tooltip-left":this.playerState.dir==="ltr","tooltip-right":this.playerState.dir==="rtl"})}
            data-tooltip="${this.playerState.ended?le("Replay"):this.playerState.paused?le("Play"):le("Pause")}"
            aria-label="${this.playerState.ended?le("Replay"):this.playerState.paused?le("Play"):le("Pause")}"
            id="play-button"
            data-testid="play-button"
            @click=${this.onPlayClicked}
          >
            ${this.playerState.ended?cn(m$):this.playerState.paused?cn(w$):cn(b$)}
          </button>

          <div
            data-identifier="volume-container"
            class="volume-container"
            @focusin=${this.onVolumeContainerFocusIn}
            @focusout=${this.onVolumeContainerFocusOut}
            @pointerleave=${this.onVolumeContainerPointerLeave}
          >
            <button
              type="button"
              class=${nt({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...lt(this.playerState),tooltip:!0})}
              aria-label=${this.playerState.muted?le("Unmute"):le("Mute")}
              data-testid="volume-button"
              @click=${this.onVolumeClicked}
            >
              ${this.playerState.muted?cn(S$):cn(x$)}
            </button>

            ${this.playerState.showVolumeSlider?St`
                  <div class="volume-menu">
                    <div class="volume-menu-slider-container">
                      <ump-slider
                        class="volume-slider"
                        style="--ump-slide-percentage: ${this.playerState.volume*Rr.VOLUME_SCALER}%;"
                        orientation="vertical"
                        sliderarialabel="${le("Volume Level")}"
                        aria-label=${le("Volume Slider")}
                        min="0"
                        max="100"
                        focusStep=${1}
                        sliderAriaValueText="${(this.playerState.volume*Rr.VOLUME_SCALER).toFixed()+"%"}"
                        value=${this.playerState.volume*Rr.VOLUME_SCALER}
                        @click=${this.onVolumeSliderClicked}
                        @input=${this.onVolumeSliderChanged}
                        @pointerup=${this.onVolumeSliderPointerUp}
                      ></ump-slider>
                      <div
                        data-tooltip=${(this.playerState.volume*Rr.VOLUME_SCALER).toFixed()+"%"}
                        style="--ump-slide-percentage: ${this.playerState.volume*Rr.VOLUME_SCALER}%;"
                        class="volume-tooltip tooltip tooltip-visible"
                      ></div>
                    </div>
                    <div class="volume-menu-spacer"></div>
                  </div>
                `:null}
          </div>

          <div
            class=${nt({time:!0,"time-right":this.playerState.dir==="rtl"})}
            data-testid="time"
          >
            ${Kx(this.playerState.currentTime)} /
            ${Kx(this.playerState.duration)}
          </div>

          <ump-more-menu
            @share-clicked=${this.onShareClicked}
            id="more-menu"
          ></ump-more-menu>

          <ump-audio-menu></ump-audio-menu>

          <ump-caption-menu></ump-caption-menu>

          <ump-settings-menu></ump-settings-menu>

          <button
            type="button"
            class=${nt({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...lt(this.playerState),tooltip:!0,"tooltip-top":!0,"tooltip-left":this.playerState.dir==="rtl","tooltip-right":this.playerState.dir==="ltr"})}
            data-tooltip=${le("Fullscreen")}
            aria-label=${le("Fullscreen")}
            data-testid="fullscreen-button"
            @click=${this.onFullScreenClicked}
          >
            ${this.playerState.fullscreen?cn(y$):cn(v$)}
          </button>
        </div>
      </div>

      <ump-share-dialog></ump-share-dialog>`}get hasOpenControl(){return[this.audioMenu,this.captionMenu,this.settingsMenu,this.moreMenu,this.shareDialog].some(o=>o.opened)}onShareClicked(){this.shareDialog.show(),this.dispatchEvent(new Pt("share-button-clicked"))}onVolumeClicked(){this.dispatchEvent(new Pt("volume-button-clicked"))}onPlayClicked(){this.dispatchEvent(new Pt("play-button-clicked"))}onVolumeSliderChanged(o){const s=o.target;this.dispatchEvent(new Pt("volume-updated",s.value/Rr.VOLUME_SCALER))}onVolumeSliderPointerUp(o){const s=o.target;this.dispatchEvent(new Pt("volume-drag-released",s.value/Rr.VOLUME_SCALER))}onVolumeContainerFocusIn(){this.volumeContainer.classList.add("focused")}onVolumeContainerFocusOut(){this.volumeContainer.classList.remove("focused")}onVolumeContainerPointerLeave(){this.volumeContainer.classList.remove("focused")}onVolumeSliderClicked(o){o.stopPropagation()}onSeekbarSliderChanged(o){const s=o.target;this.dispatchEvent(new Pt("seekbar-updated",s.value))}onFullScreenClicked(){this.dispatchEvent(new Pt("fullscreen-button-clicked"))}onFocusIn(){this.dispatchEvent(new Pt("control-bar-focus-change"))}};Rr.VOLUME_SCALER=100,Rr.styles=[so,Cd,Cn`
:host{--ump-lower-controls-height:var(--size-28)}*{box-sizing:border-box;margin:0;padding:0}.controls{position:absolute;inset:0;opacity:1;visibility:visible}.controls.hidden{opacity:0;transition:opacity 1s ease-out;cursor:none}.lower-controls-area{position:absolute;bottom:0;width:100%;background:var(--color-black-alpha-70);background:linear-gradient(0deg,var(--color-black-alpha-80) 0%,var(--color-black-alpha-80) 40%,transparent 100%);height:var(--ump-lower-controls-height);display:flex;flex-direction:column;justify-content:flex-end;padding:var(--spacing-s) var(--spacing-m)}.buttons{display:flex;align-items:center;gap:var(--spacing-xs);width:100%;z-index:10}.buttons .btn.tooltip{--tooltip-gap:var(--spacing-xxxl)}.time{color:var(--color-neutral-foreground-2);flex-grow:1;-webkit-user-select:none;user-select:none;text-align:left}.time-right{text-align:right}.volume-menu{box-sizing:border-box;position:absolute;left:50%;bottom:100%;transform:translateX(-50%);z-index:100;opacity:0;transition:opacity var(--duration-faster) var(--curve-easy-ease);pointer-events:none;width:100%}.volume-container{position:relative}.volume-container:hover .volume-menu,.volume-container:focus .volume-menu,.volume-container:focus-visible .volume-menu,.volume-container.focused .volume-menu{display:block;opacity:1;pointer-events:auto}.seekbar{width:100%;height:var(--size-5)}.seekbar.slider.tooltip{--tooltip-gap:var(--spacing-s);--tooltip-width:var(--size-6);--tooltip-pointer-x:0px;--tooltip-left:clamp(calc(var(--tooltip-width) / 2),var(--tooltip-pointer-x),calc(100% - var(--tooltip-width) / 2));text-align:center}.volume-menu-slider-container{z-index:100;background-color:var(--color-grey-10-alpha-90);border-radius:var(--border-radius-large);height:var(--size-28);display:flex;justify-content:center;padding:var(--spacing-s) 0;position:relative}.volume-slider{width:var(--size-6);outline:border 1px orange}.volume-tooltip{position:absolute !important;width:100%;inset:0;margin-top:var(--size-5);margin-bottom:var(--size-5)}.volume-tooltip::before{--tooltip-top:auto;--tooltip-left:100%;--tooltip-right:auto;--tooltip-translate-x:10%;--tooltip-translate-y:50%;--tooltip-bottom:var(--ump-slide-percentage);--tooltip-width:var(--size-7);margin-left:var(--spacing-xs);text-align:center}.volume-menu-spacer{height:var(--size-8);width:100%}@media (forced-colors:active){.time{color:ButtonText}}
    `],eu([On("ump-more-menu")],Rr.prototype,"moreMenu",2),eu([On("ump-audio-menu")],Rr.prototype,"audioMenu",2),eu([On("ump-caption-menu")],Rr.prototype,"captionMenu",2),eu([On("ump-settings-menu")],Rr.prototype,"settingsMenu",2),eu([On("ump-share-dialog")],Rr.prototype,"shareDialog",2),eu([On(".volume-container")],Rr.prototype,"volumeContainer",2),eu([Tr({context:Ar,subscribe:!0})],Rr.prototype,"playerState",2),Rr=eu([_x(),Xn("ump-control-bar")],Rr);const j_="menu",Y$='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.37 10.17a.5.5 0 0 0-.74.66l4 4.5c.19.22.52.23.72.02l10.5-10.5a.5.5 0 0 0-.7-.7L7.02 14.27l-3.65-4.1Z"/></svg>';var J$=Object.defineProperty,Q$=Object.getOwnPropertyDescriptor,tu=(o,s,c,h)=>{for(var d=h>1?void 0:h?Q$(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&J$(s,c,d),d};let ba=class extends An{constructor(){super(...arguments),this.type="normal",this.checked=!1,this.submenu=null,this.focusable=!0,this.isFocused=!1,this.onFocusIn=()=>{this.isFocused=!0},this.onFocusOut=()=>{this.isFocused=!1},this.onClick=o=>{if(!o.bubbles){const s=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});o.stopPropagation(),o.preventDefault(),this.dispatchEvent(s)}}}get tabindex(){var o;return this.focusable&&((o=this.playerState)!=null&&o.disableKeyboardEvents||this.isFocused)?0:-1}render(){return St`
      <div
        class=${nt({"menu-item":!0,"menu-item-checked":this.checked,"menu-item-radio":this.type==="radio","menu-item-has-submenu":!!this.submenu&&!this.isBackButton(),"menu-item-back-button":this.isBackButton()})}
      >
        <div class="menu-item-check-mark" aria-hidden="true">
          ${cn(Y$)}
        </div>

        <div class="menu-item-chevron-left" aria-hidden="true">
          ${this.playerState.dir==="ltr"?cn(jx):cn(Bx)}
        </div>

        <slot name="prefix"></slot>

        <slot></slot>

        <slot name="suffix"></slot>

        <div class="menu-item-chevron" aria-hidden="true">
          ${this.playerState.dir==="ltr"?cn(Bx):cn(jx)}
        </div>
      </div>
    `}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.onFocusIn),this.addEventListener("focusout",this.onFocusOut),this.addEventListener("click",this.onClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),this.removeEventListener("click",this.onClick)}isBackButton(){return this.submenu===yi}updated(o){(o.has("type")||o.has("checked"))&&this.updateAriaAttributes(),o.has("isFocused")&&this.requestUpdate("tabindex")}updateAriaAttributes(){this.setAttribute("role",this.type==="radio"?"menuitemradio":"menuitem"),this.type==="radio"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}static isMenuItem(o){return o instanceof HTMLElement&&o.tagName.toLowerCase()==="ump-menu-item"}};ba.styles=[Cn`
.menu-item{display:flex;align-items:center;justify-content:flex-start;gap:var(--spacing-s);margin:0;box-sizing:border-box;padding:var(--spacing-s) var(--spacing-xs);border-radius:var(--border-radius-medium);color:var(--color-neutral-foreground-1);font-weight:var(--font-weight-regular);line-height:var(--line-height-base-300);transition-duration:var(--duration-faster);transition-property:background,color;transition-timing-function:var(--curve-easy-ease);cursor:pointer;-webkit-user-select:none;user-select:none;background-color:transparent}.menu-item-check-mark{stroke:currentcolor;justify-content:center;align-items:center;display:none;visibility:hidden}.menu-item-radio .menu-item-check-mark{display:flex}.menu-item-checked .menu-item-check-mark{visibility:visible}.menu-item-chevron{stroke:currentcolor;visibility:hidden;display:flex;justify-content:center;align-items:center}.menu-item-has-submenu .menu-item-chevron{visibility:visible}.menu-item-chevron-left{display:none;justify-content:center;align-items:center;stroke:currentcolor}.menu-item-back-button .menu-item-chevron-left{display:flex}slot:not([name]){display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;gap:var(--spacing-s);flex-grow:1}slot[name='prefix']{flex:0 0 auto;display:flex;align-items:center;stroke:currentcolor}slot[name='prefix']::slotted(*){display:contents}slot[name='suffix']{flex:0 0 auto;display:flex;align-items:center;stroke:currentcolor}:host(:hover) .menu-item{background-color:var(--color-white-alpha-10);color:var(--color-neutral-foreground-2-hover)}:host(:active) .menu-item{background-color:var(--color-white-alpha-5);color:var(--color-neutral-foreground-2-pressed)}:host(.focus-always:focus) .menu-item,:host(.focus-default:focus-visible) .menu-item{outline:var(--stroke-width-thick) solid var(--color-stroke-focus-2);border:none}:host(.cc-style-menu-item:hover) .menu-item,:host(.cc-style-menu-item:active) .menu-item{background-color:initial}@media (forced-colors:active){.menu-item{forced-color-adjust:none;color:ButtonText}:host(:hover) .menu-item{background-color:Highlight;color:HighlightText}:host(.focus-default:focus-visible) .menu-item,:host(.cc-style-menu-item:active) .menu-item{outline:var(--stroke-width-thick) solid Highlight}:host(.cc-style-menu-item:hover) .menu-item,:host(.cc-style-menu-item:active) .menu-item{color:ButtonText}}
    `],tu([tr({attribute:!0})],ba.prototype,"type",2),tu([tr({attribute:!0,type:Boolean,reflect:!0})],ba.prototype,"checked",2),tu([tr({attribute:!0,type:String})],ba.prototype,"submenu",2),tu([Tr({context:Ar,subscribe:!0})],ba.prototype,"playerState",2),tu([tr({type:Boolean})],ba.prototype,"focusable",2),tu([tr({type:Number,reflect:!0})],ba.prototype,"tabindex",1),tu([tr({type:Boolean})],ba.prototype,"isFocused",2),ba=tu([Xn("ump-menu-item")],ba);var Z$=Object.defineProperty,ez=Object.getOwnPropertyDescriptor,B_=(o,s,c,h)=>{for(var d=h>1?void 0:h?ez(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&Z$(s,c,d),d};let I0=class extends An{render(){return this.isActive()?St`<slot></slot>`:null}getMenuItems(){return Array.from(this.querySelectorAll('[role="menuitemradio"],[role="menuitem"]'))}isActive(){return!this.menuContext.history.length&&!this.id?!0:this.menuContext.history[this.menuContext.history.length-1]===this.id}};B_([Tr({context:j_,subscribe:!0}),v0()],I0.prototype,"menuContext",2),I0=B_([Xn("ump-submenu")],I0);var tz=Object.defineProperty,nz=Object.getOwnPropertyDescriptor,yf=(o,s,c,h)=>{for(var d=h>1?void 0:h?nz(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&tz(s,c,d),d};let nu=class extends An{constructor(){super(...arguments),this.role="menu",this.menuContext={history:[]}}render(){return St`<slot
      @click=${this.onClick}
      @keydown=${this.onKeyDown}
      data-scrollable
    ></slot>`}async onClick(o){const s=nu.findSubmenuId(o.composedPath());s&&(o.stopPropagation(),s===yi?this.pop():this.push(s),await this.updateComplete,this.focusFirstItem())}onKeyDown(o){if(!this.playerState.disableKeyboardEvents){if(o.key===" "||o.key==="Enter"){const s=this.getActiveItem();s&&(o.preventDefault(),o.stopPropagation(),s.click())}else if(o.key==="ArrowDown"||o.key==="ArrowUp"||o.key==="Home"||o.key==="End"){o.preventDefault(),o.stopPropagation();const s=this.getMenuItems();let c=s.findIndex(h=>h.tabIndex===0);o.key==="ArrowDown"?c+=1:o.key==="ArrowUp"?c-=1:o.key==="Home"?c=0:o.key==="End"&&(c=s.length-1),c>=s.length&&(c=0),c<0&&(c=s.length-1),this.setActiveIndex(c)}}}focusFirstItem(){this.setActiveIndex(0)}focusLastItem(){this.setActiveIndex(this.getMenuItems().length-1)}setActiveIndex(o){var s;(s=this.getMenuItems()[o])==null||s.focus()}getMenuItems(){const o=this.defaultSlot.assignedElements({flatten:!0}).filter(c=>ba.isMenuItem(c));if(o.length)return o;const s=this.defaultSlot.assignedElements({flatten:!0}).find(c=>c instanceof I0&&c.isActive());return s?.getMenuItems()??[]}getActiveItem(){return this.getMenuItems().find(o=>o.tabIndex===0)}pop(){this.menuContext={...this.menuContext,history:this.menuContext.history.slice(0,-1)}}push(o){this.menuContext={...this.menuContext,history:[...this.menuContext.history,o]}}clearHistory(){this.menuContext={...this.menuContext,history:[]}}static findSubmenuId(o){for(const s of o)if(s instanceof HTMLElement){const c=s.getAttribute("submenu");if(c)return c}}};nu.styles=[Cn`
:host{border-radius:var(--border-radius-x-large);overflow:hidden}slot{display:flex;flex-direction:column;overflow:hidden auto;border:none;padding:var(--spacing-s);background-color:var(--color-grey-10-alpha-90);box-shadow:var(--shadow-4)}@container universalmediaplayer (min-width:0){slot{max-height:calc(100cqh - var(--ump-lower-controls-height))}}@media (forced-colors:active){slot{background-color:var(--color-grey-10)}}
    `],yf([Tr({context:Ar,subscribe:!0})],nu.prototype,"playerState",2),yf([tr({reflect:!0})],nu.prototype,"role",2),yf([On("slot")],nu.prototype,"defaultSlot",2),yf([aV({context:j_}),v0()],nu.prototype,"menuContext",2),nu=yf([Xn("ump-menu")],nu);var rz=Object.defineProperty,iz=Object.getOwnPropertyDescriptor,az=(o,s,c,h)=>{for(var d=h>1?void 0:h?iz(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&rz(s,c,d),d};let Xx=class extends An{render(){return St` <slot class="footer-button" name="suffix"></slot> `}};Xx.styles=Cn`
:host{display:flex;justify-content:flex-end;padding:var(--spacing-s);gap:var(--spacing-s)}:host(:focus),:host(:focus-visible){outline:none}.footer-button{display:inline-flex;border-radius:var(--border-radius-medium)}.footer-button:hover{background-color:var(--color-neutral-background-1-hover);border-color:transparent;color:var(--color-neutral-foreground-1-hover)}:host(:focus) .footer-button,:host(:focus-visible) .footer-button{outline:var(--stroke-width-thick) solid var(--color-stroke-focus-2);outline-offset:calc(var(--stroke-width-thick) * -1);border:none}@media (forced-colors:active){.footer-button{forced-color-adjust:none}}
  `,Xx=az([Xn("ump-menu-footer")],Xx);var oz=Object.defineProperty,sz=Object.getOwnPropertyDescriptor,uz=(o,s,c,h)=>{for(var d=h>1?void 0:h?sz(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&oz(s,c,d),d};let Yx=class extends An{render(){return St`
      <slot class="prefix-slot" name="prefix"></slot>
      <slot class="default-slot"></slot>
      <slot class="suffix-slot" name="suffix"></slot>
    `}};Yx.styles=Cn`
:host{display:flex;padding:var(--spacing-s);gap:var(--spacing-s)}.default-slot{flex-grow:1;display:flex;align-items:center;justify-content:flex-start;margin:0;box-sizing:border-box;border-radius:var(--border-radius-medium);color:var(--color-neutral-foreground-1);font-weight:var(--font-weight-semibold);line-height:var(--line-height-base-300);-webkit-user-select:none;user-select:none;background-color:transparent}@media (forced-colors:active){.default-slot{color:ButtonText}}
  `,Yx=uz([Xn("ump-menu-label")],Yx);const lz='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 17a.5.5 0 0 1 .09 1H4.5a.5.5 0 0 1-.09-1H15.5ZM10 2a.5.5 0 0 1 .5.41V14.3l3.64-3.65a.5.5 0 0 1 .64-.06l.07.06c.17.17.2.44.06.63l-.06.07-4.5 4.5a.5.5 0 0 1-.25.14L10 16a.5.5 0 0 1-.4-.2l-4.46-4.45a.5.5 0 0 1 .64-.76l.07.06 3.65 3.64V2.5c0-.27.22-.5.5-.5Z"/></svg>',cz='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.25 10a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm5 0a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM15 11.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"/></svg>',dz='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.35 2.15a.5.5 0 0 0-.7 0l-4.5 4.5a.5.5 0 1 0 .7.7L9.5 3.71v8.79a.5.5 0 0 0 1 0V3.7l3.65 3.65a.5.5 0 0 0 .7-.7l-4.5-4.5ZM4 9.5a.5.5 0 0 0-1 0V14a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V9.5a.5.5 0 0 0-1 0V14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9.5Z"/></svg>';var pz=Object.defineProperty,hz=Object.getOwnPropertyDescriptor,Jx=(o,s,c,h)=>{for(var d=h>1?void 0:h?hz(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&pz(s,c,d),d};let bf=class extends An{render(){const{downloadableVideoFiles:o,downloadableTranscriptFiles:s,shareOptions:c}=this.playerState,h=s.length===0&&o.length===0;return h&&c.length===0?null:St`
      <ump-popup popupAriaLabel="${le("More")}">
        <button
          type="button"
          slot="trigger"
          class=${nt({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...lt(this.playerState),tooltip:!0,"tooltip-disable-when-aria-expanded":!0})}
          data-tooltip="${le("More")}"
          aria-label="${le("More")}"
          data-id="more-menu-button"
          data-testid="more-menu-button"
        >
          ${cn(cz)}
        </button>

        <ump-menu data-focusgroup>
          <!-- DEFAULT MENU -->
          <ump-submenu>
            ${!h&&this.playerState.showDownloadMenu?St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    submenu="download"
                    data-testid="download-menu-item"
                  >
                    <span slot="prefix">${cn(lz)}</span>
                    ${le("Download")}
                  </ump-menu-item>
                `:null}
            ${c.length>0?St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    @click=${this.onShareClicked}
                    data-testid="share-menu-item"
                  >
                    <span slot="prefix">${cn(dz)}</span>
                    ${le("Share")}
                  </ump-menu-item>
                `:null}
          </ump-submenu>

          <ump-submenu id="download">
            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="${yi}"
              >${le("Download")}</ump-menu-item
            >

            <hr aria-hidden="true" />

            ${o.length>0?St`<ump-menu-item
                  class=${nt({...lt(this.playerState)})}
                  submenu="download-video"
                >
                  ${le("Video")}
                </ump-menu-item>`:null}
            ${s.length>0?St`<ump-menu-item
                  class=${nt({...lt(this.playerState)})}
                  submenu="download-transcript"
                >
                  ${le("Transcript")}
                </ump-menu-item>`:null}
          </ump-submenu>

          <ump-submenu id="download-video">
            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="${yi}"
              >${le("Download Video")}</ump-menu-item
            >

            <hr aria-hidden="true" />

            ${o.map(d=>St` <ump-menu-item
                  class=${nt({...lt(this.playerState)})}
                  lang=${Vx(d.lang)}
                  @click=${this.onDownloadClicked(d)}
                >
                  ${d.locale}
                </ump-menu-item>`)}
          </ump-submenu>

          <ump-submenu id="download-transcript">
            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="${yi}"
              >${le("Download Transcript")}</ump-menu-item
            >

            <hr aria-hidden="true" />

            ${s.map(d=>St`<ump-menu-item
                  class=${nt({...lt(this.playerState)})}
                  lang=${Vx(d.lang)}
                  @click=${this.onDownloadClicked(d)}
                  >${d.locale}</ump-menu-item
                >`)}
          </ump-submenu>
        </ump-menu>
      </ump-popup>
    `}onShareClicked(){this.dispatchEvent(new Pt("share-clicked"))}onDownloadClicked(o){return()=>{this.dispatchEvent(new Pt("download-file-clicked",o))}}get opened(){var o;return(o=this.popup)==null?void 0:o.opened}};bf.styles=[so,T0,Cd,Cn`
.btn.tooltip{--tooltip-gap:var(--spacing-xxxl)}ump-popup{--ump-popup-spacing:var(--spacing-xxxl)}ump-menu{width:var(--size-64);display:block}
    `],Jx([On("ump-popup")],bf.prototype,"popup",2),Jx([Tr({context:Ar,subscribe:!0})],bf.prototype,"playerState",2),bf=Jx([Xn("ump-more-menu")],bf);var fz=Object.defineProperty,gz=Object.getOwnPropertyDescriptor,wl=(o,s,c,h)=>{for(var d=h>1?void 0:h?gz(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&fz(s,c,d),d};let wa=class extends An{constructor(){super(...arguments),this._opened=!1,this.popupAriaLabel="",this.documentMouseDown=o=>{o.composedPath().includes(this)||this.close()},this.documentKeyDown=o=>{!o.composedPath().includes(this)&&(o.key===" "||o.key==="Enter")&&this.close()}}static detectIOS(){const o=/iPad|iPhone|iPod/.test(navigator.userAgent),s=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,c="ontouchstart"in window;return(o||s)&&c}render(){return St`
      <div
        class=${nt({"popup-container":!0,"ump-ios":wa.isIOS})}
        @click=${this.onClick}
      >
        <slot
          name="trigger"
          @click=${this.onClicked}
          @keydown=${this.onKeyDown}
          @slotchange=${this.onSlotChanged}
        ></slot>

        <dialog
          class=${nt({"ump-rtl":this.playerState.dir==="rtl"})}
          .open=${this._opened}
          aria-hidden="${this._opened?"false":"true"}"
          aria-label="${this.popupAriaLabel}"
          @keydown=${this.dialogKeyDown}
          @close=${this.close}
        >
          <slot class="popup-panel"></slot>
        </dialog>
      </div>
    `}show(){this._opened=!0,this.updateAccessibleTrigger(),document.addEventListener("mousedown",this.documentMouseDown),document.addEventListener("keydown",this.documentKeyDown),this.dispatchEvent(new Pt("ump-popup-changed"))}close(){var o;this.dialog.close(),this._opened=!1,this.updateAccessibleTrigger(),document.removeEventListener("mousedown",this.documentMouseDown),document.removeEventListener("keydown",this.documentKeyDown),this.dispatchEvent(new Pt("ump-popup-changed")),(o=this.getMenu())==null||o.clearHistory(),this.focusTrigger()}get opened(){return this._opened}updateAccessibleTrigger(){const o=this.getTriggerElement();o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded",this._opened?"true":"false")}focusTrigger(){this.getTriggerElement().focus()}getTriggerElement(){return this.trigger.assignedElements({flatten:!0})[0]}getMenu(){return this.popupPanel.assignedElements({flatten:!0}).find(o=>o.tagName.toLowerCase()==="ump-menu")}onClick(o){o.composedPath().find(s=>ba.isMenuItem(s))&&this.close()}onClicked(){this._opened?this.close():this.show()}onSlotChanged(){this.updateAccessibleTrigger()}async onKeyDown(o){if(!this.playerState.disableKeyboardEvents)if(o.key==="ArrowDown"||o.key==="ArrowUp"||o.key==="Home"||o.key==="End"){o.preventDefault(),this._opened||(this.show(),await this.updateComplete);const s=this.getMenu();if(!s)return;o.key==="ArrowUp"||o.key==="End"?s.focusLastItem():s.focusFirstItem()}else(o.key==="Escape"||o.key==="Tab")&&this.close()}dialogKeyDown(o){this.playerState.disableKeyboardEvents||(o.key==="Escape"||o.key==="Tab")&&this._opened&&(o.preventDefault(),this.close())}};wa.isIOS=wa.detectIOS(),wa.styles=Cn`
:host{--ump-popup-spacing:var(--spacing-s)}.popup-container{position:relative}dialog{display:none;padding:0;border:none;outline:none;background-color:transparent;position:absolute;left:100%;bottom:100%;transform:translateX(-100%);margin-bottom:var(--ump-popup-spacing)}dialog.ump-rtl{transform:translateX(calc(100% - var(--spacing-xxxxl)))}dialog[open]{display:block}@media (width <= 450px){.ump-ios.popup-container{position:unset}.ump-ios dialog{bottom:34.29%;left:98%}}@container universalmediaplayer (max-width:450px){.popup-container{position:unset}dialog{bottom:15cqh;left:98cqw}}
  `,wl([On("dialog")],wa.prototype,"dialog",2),wl([Tr({context:Ar,subscribe:!0})],wa.prototype,"playerState",2),wl([v0()],wa.prototype,"_opened",2),wl([tr({type:String})],wa.prototype,"popupAriaLabel",2),wl([On('slot[name="trigger"]')],wa.prototype,"trigger",2),wl([On(".popup-panel")],wa.prototype,"popupPanel",2),wa=wl([Xn("ump-popup")],wa);const mz='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2c-.53 0-1.06.05-1.56.15a.5.5 0 0 0 .2.98 7.04 7.04 0 0 1 2.73 0 .5.5 0 0 0 .2-.98C11.05 2.05 10.52 2 10 2Zm4.45 1.35a.5.5 0 0 0-.56.83 7.04 7.04 0 0 1 1.93 1.93.5.5 0 1 0 .83-.56 8.04 8.04 0 0 0-2.2-2.2Zm-8.34.83a.5.5 0 1 0-.56-.83 8.04 8.04 0 0 0-2.2 2.2.5.5 0 1 0 .83.56A7.04 7.04 0 0 1 6.1 4.18ZM3.13 8.63a.5.5 0 0 0-.98-.2 8.04 8.04 0 0 0 0 3.13.5.5 0 0 0 .98-.2 7.04 7.04 0 0 1 0-2.73Zm14.72-.2a.5.5 0 1 0-.98.2 7.04 7.04 0 0 1 0 2.74.5.5 0 1 0 .98.2 8.03 8.03 0 0 0 0-3.13ZM4.18 13.9a.5.5 0 1 0-.83.56 8.04 8.04 0 0 0 2.2 2.2.5.5 0 1 0 .56-.83 7.04 7.04 0 0 1-1.93-1.93Zm12.47.56a.5.5 0 0 0-.83-.56 7.04 7.04 0 0 1-1.93 1.93.5.5 0 1 0 .56.83 8.04 8.04 0 0 0 2.2-2.2Zm-8.02 2.42a.5.5 0 1 0-.2.98 8.03 8.03 0 0 0 3.13 0 .5.5 0 0 0-.2-.98 7.04 7.04 0 0 1-2.73 0ZM8 7.83c0-.57.63-.94 1.13-.65l4.12 2.39a.5.5 0 0 1 0 .86l-4.12 2.39A.75.75 0 0 1 8 12.17V7.83Z"/></svg>',vz='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 3H6a3 3 0 0 0-3 3v.5a.5.5 0 0 0 1 0V6c0-1.1.9-2 2-2h2.5a.5.5 0 0 0 0-1ZM5.8 15.99A2 2 0 0 1 4 14v-3c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H6l-.2-.01ZM3 14a3 3 0 0 0 3 3h3a3 3 0 0 0 3-3v-3a3 3 0 0 0-3-3H6a3 3 0 0 0-3 3v3Zm10.5 3a.5.5 0 0 1 0-1h.5a2 2 0 0 0 2-2v-2.5a.5.5 0 0 1 1 0V14a3 3 0 0 1-3 3h-.5ZM17 8.5a.5.5 0 0 1-1 0V6a2 2 0 0 0-2-2h-2.5a.5.5 0 0 1 0-1H14a3 3 0 0 1 3 3v2.5Z"/></svg>',yz='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.91 7.38A8.5 8.5 0 0 1 3.7 4.3a.5.5 0 0 1 .54-.13l1.92.68a1 1 0 0 0 1.32-.76l.36-2a.5.5 0 0 1 .4-.4 8.53 8.53 0 0 1 3.55 0c.2.04.35.2.38.4l.37 2a1 1 0 0 0 1.32.76l1.92-.68a.5.5 0 0 1 .54.13 8.5 8.5 0 0 1 1.78 3.08c.06.2 0 .4-.15.54l-1.56 1.32a1 1 0 0 0 0 1.52l1.56 1.32a.5.5 0 0 1 .15.54 8.5 8.5 0 0 1-1.78 3.08.5.5 0 0 1-.54.13l-1.92-.68a1 1 0 0 0-1.32.76l-.37 2a.5.5 0 0 1-.38.4 8.53 8.53 0 0 1-3.56 0 .5.5 0 0 1-.39-.4l-.36-2a1 1 0 0 0-1.32-.76l-1.92.68a.5.5 0 0 1-.54-.13 8.5 8.5 0 0 1-1.78-3.08.5.5 0 0 1 .15-.54l1.56-1.32a1 1 0 0 0 0-1.52L2.06 7.92a.5.5 0 0 1-.15-.54ZM8 10a2 2 0 1 0 4 0 2 2 0 0 0-4 0Z"/></svg>',bz='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.91 7.38A8.5 8.5 0 0 1 3.7 4.3a.5.5 0 0 1 .54-.13l1.92.68a1 1 0 0 0 1.32-.76l.36-2a.5.5 0 0 1 .4-.4 8.53 8.53 0 0 1 3.55 0c.2.04.35.2.38.4l.37 2a1 1 0 0 0 1.32.76l1.92-.68a.5.5 0 0 1 .54.13 8.5 8.5 0 0 1 1.78 3.08c.06.2 0 .4-.15.54l-1.56 1.32a1 1 0 0 0 0 1.52l1.56 1.32a.5.5 0 0 1 .15.54 8.5 8.5 0 0 1-1.78 3.08.5.5 0 0 1-.54.13l-1.92-.68a1 1 0 0 0-1.32.76l-.37 2a.5.5 0 0 1-.38.4 8.53 8.53 0 0 1-3.56 0 .5.5 0 0 1-.39-.4l-.36-2a1 1 0 0 0-1.32-.76l-1.92.68a.5.5 0 0 1-.54-.13 8.5 8.5 0 0 1-1.78-3.08.5.5 0 0 1 .15-.54l1.56-1.32a1 1 0 0 0 0-1.52L2.06 7.92a.5.5 0 0 1-.15-.54Zm1.06 0 1.3 1.1a2 2 0 0 1 0 3.04l-1.3 1.1c.3.79.72 1.51 1.25 2.16l1.6-.58a2 2 0 0 1 2.63 1.53l.3 1.67a7.56 7.56 0 0 0 2.5 0l.3-1.67a2 2 0 0 1 2.64-1.53l1.6.58a7.5 7.5 0 0 0 1.24-2.16l-1.3-1.1a2 2 0 0 1 0-3.04l1.3-1.1a7.5 7.5 0 0 0-1.25-2.16l-1.6.58a2 2 0 0 1-2.63-1.53l-.3-1.67a7.55 7.55 0 0 0-2.5 0l-.3 1.67A2 2 0 0 1 5.81 5.8l-1.6-.58a7.5 7.5 0 0 0-1.24 2.16ZM7.5 10a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0Zm1 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0Z"/></svg>';var wz=Object.defineProperty,xz=Object.getOwnPropertyDescriptor,Qx=(o,s,c,h)=>{for(var d=h>1?void 0:h?xz(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&wz(s,c,d),d};let wf=class extends An{render(){var o,s;let c,h;for(const m of this.playerState.videoQualities)m.videoId===this.playerState.activeVideoQualityId&&(c=m),m.videoId===this.playerState.selectedVideoQualityId&&(h=m);const d=(o=this.playerState.playbackRates.find(m=>m.value===this.playerState.playbackRate))==null?void 0:o.label;return this.playerState.playbackRates.length<2&&this.playerState.videoQualities.length<2?null:St`
      <ump-popup
        popupAriaLabel="${le("Settings")}"
        @ump-popup-changed=${()=>this.requestUpdate()}
      >
        <button
          type="button"
          slot="trigger"
          class=${nt({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...lt(this.playerState),tooltip:!0,"tooltip-disable-when-aria-expanded":!0})}
          data-tooltip="${le("Settings")}"
          aria-label="${le("Settings")}"
          data-testid="settings-menu-button"
        >
          ${(s=this.popup)!=null&&s.opened?cn(yz):cn(bz)}
        </button>

        <ump-menu data-focusgroup>
          <!-- DEFAULT MENU -->
          <ump-submenu>
            ${this.playerState.playbackRates.length>=2?St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    submenu="playbackRate"
                    aria-label="${le("Playback rate")}, ${d}, ${le("Collapsed")}}"
                  >
                    <span slot="prefix">${cn(mz)}</span>
                    ${le("Playback rate")}

                    <span slot="suffix">${d}</span>
                  </ump-menu-item>
                `:null}
            ${this.playerState.showQualityMenu&&this.playerState.videoQualities.length>=2?St`
                  <ump-menu-item
                    class=${nt({...lt(this.playerState)})}
                    submenu="quality"
                    aria-label="${le("Quality")}, ${h?.label}, ${le("Collapsed")}}"
                  >
                    <span slot="prefix">${cn(vz)}</span>
                    ${le("Quality")}
                    <span slot="suffix"
                      ><span class="quality-label"
                        >${h?.label}</span
                      >
                      ${c&&h?.videoId===Ad.videoId?St`<span>${c.label}</span>`:null}
                    </span>
                  </ump-menu-item>
                `:null}
          </ump-submenu>

          <!-- PLAYBACK RATE SUBMENU -->
          <ump-submenu id="playbackRate">
            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="${yi}"
              aria-label="${le("Playback rate")}, ${le("Back")}"
              >${le("Playback rate")}
            </ump-menu-item>

            <hr aria-hidden="true" />

            ${this.playerState.playbackRates.map(m=>St`
                <ump-menu-item
                  class=${nt({...lt(this.playerState)})}
                  type="radio"
                  @click=${this.playbackRateClicked(m.value)}
                  .checked=${m.value===this.playerState.playbackRate}
                >
                  ${m.label}
                </ump-menu-item>
              `)}
          </ump-submenu>

          <!-- QUALITY SUBMENU -->
          <ump-submenu id="quality">
            <ump-menu-item
              class=${nt({...lt(this.playerState)})}
              submenu="${yi}"
              aria-label="${le("Quality")}, ${le("Back")}"
              >${le("Quality")}
            </ump-menu-item>

            <hr aria-hidden="true" />

            ${this.playerState.videoQualities.map(m=>St`
                <ump-menu-item
                  class=${nt({...lt(this.playerState)})}
                  type="radio"
                  .checked=${m.videoId===this.playerState.selectedVideoQualityId}
                  @click=${this.onQualitySelected(m)}
                >
                  ${m.label}
                </ump-menu-item>
              `)}
          </ump-submenu>
        </ump-menu>
      </ump-popup>
    `}onQualitySelected(o){return()=>{this.dispatchEvent(new Pt("video-quality-clicked",o)),this.dispatchEvent(new Pt("videoqualitychanged"))}}playbackRateClicked(o){return()=>{this.dispatchEvent(new Pt("playback-rate-clicked",o))}}get opened(){var o;return(o=this.popup)==null?void 0:o.opened}};wf.styles=[so,T0,Cd,Cn`
.btn.tooltip{--tooltip-gap:var(--spacing-xxxl)}ump-popup{--ump-popup-spacing:var(--spacing-xxxl)}ump-menu{width:var(--size-64);display:block}.quality-label{font-weight:var(--font-weight-semibold)}
    `],Qx([On("ump-popup")],wf.prototype,"popup",2),Qx([Tr({context:Ar,subscribe:!0})],wf.prototype,"playerState",2),wf=Qx([Xn("ump-settings-menu")],wf);function Zx(o,s,c){return(c-o)/(s-o)}var Sz=Object.defineProperty,kz=Object.getOwnPropertyDescriptor,xa=(o,s,c,h)=>{for(var d=h>1?void 0:h?kz(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&Sz(s,c,d),d};let Ui=class extends An{constructor(){super(...arguments),this.min=0,this.max=1,this.value=0,this.step=1,this.focusStep=1,this.orientation="horizontal",this.sliderarialabel="",this.sliderAriaValueText="",this.ranges=[],this.onInputChange=o=>{this.value=Number(o.target.value)},this.onInputFocusIn=o=>{const s=o.target;s.matches(":focus-visible")&&(s.step=this.focusStep.toString())},this.onInputFocusOut=o=>{const s=o.target;s.step=this.step.toString()}}render(){return St`
      <!-- Track -->
      <div aria-hidden="true" aria-busy="false" value="0" class="track"></div>

      <!-- Ranges -->
      ${this.ranges.map(o=>St`
          <div
            data-testid="ump-slider-range"
            class="range"
            style="width: ${Zx(this.min,this.max,o.end-o.start)*100}%; left: ${Zx(this.min,this.max,o.start)*100}%"
          ></div>
        `)}

      <!-- Progress -->
      <div aria-hidden="true" aria-busy="false" class="progress"></div>

      <!-- Thumb -->
      <div class="thumb"></div>

      <!-- HTML Input Range -->
      <input
        class=${nt({...lt(this.playerState),input:!0})}
        data-testid="ump-slider"
        type="range"
        min="${this.min}"
        max="${this.max}"
        step="${this.step}"
        aria-label="${this.sliderarialabel}"
        aria-live="polite"
        aria-orientation="${this.orientation}"
        aria-valuetext="${this.sliderAriaValueText}"
        @input=${this.onInputChange}
        @focusin=${this.onInputFocusIn}
        @focusout=${this.onInputFocusOut}
      />
    `}updated(o){o.has("value")&&(this.inputElement.value=this.value.toString()),(o.has("value")||o.has("min")||o.has("max"))&&this.updateSliderThumb()}updateSliderThumb(){const o=Zx(this.min,this.max,this.value);this.style.setProperty("--ump-slide-percentage",`${o*100}%`)}};Ui.styles=[Cn`
:host{--ump-slider-track-thickness:var(--size-1);--ump-slider-track-color:var(--color-white-alpha-40);--ump-slider-thumb-inline-size:var(--size-5);--ump-slider-thumb-block-size:var(--size-3);--ump-half-slider-thumb-inline-size:calc(var(--ump-slider-thumb-inline-size) / 2);--ump-half-slider-thumb-block-size:calc(var(--ump-slider-thumb-block-size) / 2);--ump-slider-thumb-color:var(--color-neutral-foreground-1);--ump-slider-progress-color:var(--color-neutral-foreground-1);--ump-slider-range-color:var(--color-white-alpha-30);--ump-slide-percentage:0%;--ump-slider-padding:var(--spacing-xs);position:relative;display:block;writing-mode:horizontal-tb;z-index:10}:host(:hover){--ump-slider-thumb-transform:scale(1);--ump-slider-track-thickness:var(--size-1-5)}:host([orientation='vertical']){writing-mode:vertical-lr;direction:rtl;-webkit-appearance:none;appearance:none}*{box-sizing:border-box;margin:0;padding:0}.input{-webkit-appearance:none;appearance:none;background:transparent;display:block;cursor:pointer;border-radius:var(--border-radius-medium);color:var(--color-neutral-foreground-1);padding-block:var(--ump-slider-padding);position:absolute;inset:0}.input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--ump-slider-thumb-block-size);inline-size:var(--ump-slider-thumb-inline-size);border-radius:var(--border-radius-circular);background-color:transparent}.input::-moz-range-thumb{appearance:none;background-color:transparent;border:none;block-size:var(--ump-slider-thumb-block-size);inline-size:var(--ump-slider-thumb-inline-size)}.input.focus-always:focus,.input.focus-default:focus-visible{outline:var(--stroke-width-thick) solid var(--color-stroke-focus-2)}.thumb{pointer-events:none;position:absolute;inset:0;display:grid;align-items:center;margin-inline:var(--ump-half-slider-thumb-inline-size) var(--ump-half-slider-thumb-inline-size)}.thumb::after{position:absolute;z-index:50;inline-size:var(--ump-slider-thumb-inline-size);block-size:var(--ump-slider-thumb-block-size);margin-inline-start:calc(var(--ump-slide-percentage) - var(--ump-half-slider-thumb-inline-size));margin-block-start:self-block;background-color:var(--ump-slider-thumb-color);border-radius:var(--border-radius-circular);transform:var(--ump-slider-thumb-transform);display:block;transition:transform var(--duration-faster) var(--curve-easy-ease);transform-origin:center;content:''}.track{z-index:10;position:absolute;inset:0;overflow:hidden;pointer-events:none;display:flex;align-items:center}.track::before{content:'';background-color:var(--ump-slider-track-color);inline-size:100%;block-size:var(--ump-slider-track-thickness);position:absolute;border-radius:var(--border-radius-circular);transition:block-size var(--duration-faster) var(--curve-easy-ease)}.range{position:absolute;background-color:var(--ump-slider-range-color);height:var(--ump-slider-track-thickness);width:0;pointer-events:none;z-index:20;top:50%;transform:translateY(-50%);border-radius:var(--border-radius-circular);transition:height var(--duration-faster) var(--curve-easy-ease)}.progress{position:absolute;z-index:40;inset:0;display:flex;align-items:center;margin-inline:var(--ump-half-slider-thumb-inline-size);pointer-events:none}.progress::before{content:'';position:absolute;display:block;block-size:var(--ump-slider-track-thickness);inline-size:var(--ump-slide-percentage);background:var(--ump-slider-progress-color);transition:block-size var(--duration-faster) var(--curve-easy-ease)}.progress::after{content:'';position:absolute;display:block;block-size:var(--ump-slider-track-thickness);inline-size:var(--ump-half-slider-thumb-inline-size);margin-inline-start:calc(-1 * var(--ump-half-slider-thumb-inline-size));border-start-start-radius:var(--border-radius-circular);border-end-start-radius:var(--border-radius-circular);background:var(--ump-slider-progress-color);transition:block-size var(--duration-faster) var(--curve-easy-ease)}@media (forced-colors:active){:host{--ump-slider-track-color:ButtonText;--ump-slider-progress-color:Highlight}.thumb::after{background:Highlight}}
    `],xa([tr({type:Number,attribute:!0})],Ui.prototype,"min",2),xa([tr({type:Number,attribute:!0})],Ui.prototype,"max",2),xa([tr({type:Number,attribute:!0,reflect:!0})],Ui.prototype,"value",2),xa([tr({type:Number,attribute:!0})],Ui.prototype,"step",2),xa([tr({type:Number,attribute:!0})],Ui.prototype,"focusStep",2),xa([tr({type:String,attribute:!0})],Ui.prototype,"orientation",2),xa([tr({type:String,attribute:!0})],Ui.prototype,"sliderarialabel",2),xa([tr({type:String,attribute:!0})],Ui.prototype,"sliderAriaValueText",2),xa([tr({type:Array})],Ui.prototype,"ranges",2),xa([On("input")],Ui.prototype,"inputElement",2),xa([Tr({context:Ar,subscribe:!0})],Ui.prototype,"playerState",2),Ui=xa([Xn("ump-slider")],Ui);var Tz=Object.defineProperty,Az=Object.getOwnPropertyDescriptor,xl=(o,s,c,h)=>{for(var d=h>1?void 0:h?Az(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&Tz(s,c,d),d};let uo=class extends An{constructor(){super(...arguments),this.userActive=!0,this.handleUserInteraction=k_(()=>{this.userActive=!1},YV)}render(){var o;return St`<div
      ?inert=${this.playerState.ageGate&&this.playerState.ageGate!=="verified"}
      class="controls-wrapper"
      data-testid="controls-wrapper"
      tabindex=${!this.playerState.disableKeyboardEvents&&this.playerState.controlsState!=="bigplaybutton"?"0":""}
      @keydown=${this.onControlsWrapperKeyDown}
    >
      <div
        class=${nt({controls:!0,loading:this.playerState.loading,hidden:this.userActive===!1&&this.playerState.paused===!1&&(this.playerState.controlsState==="bigplaybutton"||((o=this.controlBar)==null?void 0:o.hasOpenControl)===!1)})}
        data-testid="controls"
        @pointermove=${this.onUserInteraction}
        @control-bar-focus-change=${this.onUserInteraction}
        @input=${this.onUserInteraction}
        @keydown=${this.onUserInteraction}
        @mousedown=${this.onControlsMouseDown}
        @touchstart=${this.onControlsTouchStart}
      >
        <div
          class=${nt({overlay:!0,mask20:this.playerState.maskLevel===20,mask40:this.playerState.maskLevel===40,mask60:this.playerState.maskLevel===60,mask80:this.playerState.maskLevel===80,mask100:this.playerState.maskLevel===100})}
          data-testid="mask-level-overlay"
        ></div>
        ${this.renderControls()}
      </div>
    </div>`}get hasOpenControl(){var o;return((o=this.controlBar)==null?void 0:o.hasOpenControl)??!1}focusPlayButton(){var o,s;if(this.bigPlayButton){this.bigPlayButton.focus();return}(s=(o=this.controlBar)==null?void 0:o.renderRoot.querySelector("#play-button"))==null||s.focus()}renderControls(){if(this.playerState.controlsState==="bigplaybutton")return St`<ump-big-play-button></ump-big-play-button>`;if(this.playerState.controlsState==="controlbar")return St`<ump-control-bar></ump-control-bar>`}onUserInteraction(){this.userActive=!0,this.handleUserInteraction()}onControlsMouseDown(o){o.target===this.controlsContainer&&o.button===0&&this.dispatchEvent(new Pt("controls-triggered")),this.onUserInteraction()}onControlsTouchStart(o){o.target===this.controlsContainer&&(o.preventDefault(),o.stopPropagation(),this.userActive&&this.dispatchEvent(new Pt("controls-triggered")),this.onUserInteraction())}onControlsWrapperKeyDown(o){this.playerState.disableKeyboardEvents||o.target!==this.controlsWrapper||(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this.dispatchEvent(new Pt("controls-triggered")))}};uo.shadowRootOptions={...An.shadowRootOptions,delegatesFocus:!0},uo.styles=Cn`
.controls-wrapper{position:absolute;inset:0}.controls-wrapper:focus-visible{outline:var(--stroke-width-thick) dashed var(--color-stroke-focus-2);outline-offset:calc(-1 * var(--stroke-width-thicker));box-shadow:inset 0 0 0 var(--border-radius-medium) var(--color-black)}.controls{position:absolute;inset:0;opacity:1;visibility:visible}.controls.hidden{opacity:0;transition:opacity 1s ease-out;cursor:none}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:-1}.overlay.mask20{background:var(--color-black-alpha-20)}.overlay.mask40{background:var(--color-black-alpha-40)}.overlay.mask60{background:var(--color-black-alpha-60)}.overlay.mask80{background:var(--color-black-alpha-80)}.overlay.mask100{background:var(--color-black)}ump-big-play-button{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.controls.loading ump-big-play-button{opacity:0}
  `,xl([On(".controls-wrapper")],uo.prototype,"controlsWrapper",2),xl([On(".controls")],uo.prototype,"controlsContainer",2),xl([On("ump-control-bar")],uo.prototype,"controlBar",2),xl([On("ump-big-play-button")],uo.prototype,"bigPlayButton",2),xl([Tr({context:Ar,subscribe:!0})],uo.prototype,"playerState",2),xl([v0()],uo.prototype,"userActive",2),uo=xl([_x(),Xn("ump-controls")],uo);function Ez(o,s,c,h){return o.addEventListener(s,c,h),()=>o.removeEventListener(s,c)}function xf(o){const s=[];return{addEventListener(c,h,d){const m=Ez(o,c,h,d);s.push(m)},removeAllListeners(){s.forEach(c=>c())}}}function Cz(o,s){return c=>{const h=xf(o);h.addEventListener("big-play-button-triggered",D),h.addEventListener("play-button-clicked",N),h.addEventListener("volume-button-clicked",F),h.addEventListener("fullscreen-button-clicked",U),h.addEventListener("seekbar-updated",A),h.addEventListener("volume-updated",L),h.addEventListener("volume-drag-released",w),h.addEventListener("audio-track-clicked",G),h.addEventListener("video-quality-clicked",Z),h.addEventListener("caption-track-clicked",fe),h.addEventListener("playback-rate-clicked",ve),h.addEventListener("controls-triggered",ie),h.addEventListener("seekbar-pointer-down",b),h.addEventListener("seekbar-pointer-up",M),h.addEventListener("caption-font-size-clicked",Me),h.addEventListener("caption-text-color-clicked",Te),h.addEventListener("caption-text-opacity-clicked",re),h.addEventListener("caption-background-color-clicked",Pe),h.addEventListener("caption-background-opacity-clicked",ke),h.addEventListener("caption-font-family-clicked",T),h.addEventListener("caption-text-edge-style-clicked",oe),c.options.hideControls==null&&c.addEventListener("play",()=>{d("controlbar")},{once:!0}),c.options.autoplay||d("bigplaybutton"),c.options.hideControls==="controlbar"&&d("bigplaybutton"),c.options.hideControls==="all"&&d("none"),s.setValue({...s.value,playButtonSize:c.options.playButtonSize,playButtonTheme:c.options.playButtonTheme}),s.setValue({...s.value,maskLevel:c.options.maskLevel}),c.options.maskLevel!==0&&c.addEventListener("play",()=>{s.setValue({...s.value,maskLevel:0})},{once:!0});function d(be){s.setValue({...s.value,controlsState:be})}let m=!1;function b(){m=c.paused,c.pause()}const f=k_(be=>{c.currentTime=be.detail},JV);function A(be){f(be)}function M(){m||c.play()}function D(){var be,V;if(s.setValue({...s.value,bigPlayButtonClicked:!0}),ge(),c.options.hideControls!=="all"&&c.options.hideControls!=="controlbar"){const W=o.renderRoot.querySelector("video");W&&W.setAttribute("tabindex","-1")}if(!s.value.disableKeyboardEvents&&c.options.hideControls!=="all"&&c.options.hideControls!=="controlbar"){const W=(V=(be=o.renderRoot.querySelector("ump-controls"))==null?void 0:be.renderRoot)==null?void 0:V.querySelector(".controls-wrapper");W&&(W.tabIndex=0,W.focus())}}function N(){ge()}function F(){c.muted=!c.muted}function L(be){c.volume=be.detail}function w(be){c.saveLastSelectedVolume(be.detail)}function U(){c.fullscreen?c.exitFullscreen():c.requestFullscreen(o)}function G(be){c.audioTrack=be.detail.shakaAudioTrack}function Z(be){c.selectVideoQuality(be.detail)}function ie(){ge()}function ge(){c.ended?(c.dispatchEvent(new gn.util.FakeEvent("replay")),c.play()):c.paused?(c.currentTime===0&&c.dispatchEvent(new gn.util.FakeEvent("umpplay")),c.currentTime!==0&&c.dispatchEvent(new gn.util.FakeEvent("resume")),c.play()):(c.dispatchEvent(new gn.util.FakeEvent("umppause")),c.pause())}function fe(be){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,enabled:be.detail.captionId!==-1}}),c.captionTrack=be.detail}function Me(be){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,fontScale:be.detail}})}function Te(be){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,textColor:be.detail}})}function re(be){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,textOpacity:be.detail}})}function Pe(be){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,backgroundColor:be.detail}})}function ke(be){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,backgroundOpacity:be.detail}})}function T(be){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,fontFamily:be.detail}})}function oe(be){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,textShadow:be.detail}})}function ve(be){c.playbackRate=be.detail}return()=>{h.removeAllListeners()}}}const Iz=import.meta.url;/*! https://github.com/nevware21/ts-utils v0.11.4 */function ns(o,s){return o||s}function Fi(o,s){return o[s]}var ra=void 0,Er=null,eS="",M0="function",Sf="object",rs="prototype",tS="__proto__",Sl="undefined",_0="constructor",nS="Symbol",Mz="_polyfill",Md="length",D0="name",Hr="call",P0="toString",za=ns(Object),rS=Fi(za,rs),V_=ns(String),kl=Fi(V_,rs),_z=ns(Math),$_=ns(Array),L0=Fi($_,rs),is=Fi(L0,"slice");function Nr(o,s){try{return{v:o.apply(this,s)}}catch(c){return{e:c}}}function Dz(o,s){var c=Nr(o);return c.e?s:c.v}var iS;function R0(o){return function(s){return typeof s===o}}function z_(o){var s="[object "+o+"]";return function(c){return!!(c&&Pz(c)===s)}}function Pz(o){return rS[P0].call(o)}function Yn(o){return typeof o===Sl||o===Sl}function Lz(o){return!aS(o)}function _e(o){return o===Er||Yn(o)}function Rz(o){return o===Er||!aS(o)}function aS(o){return!!o||o!==ra}function Nz(o){return!iS&&(iS=["string","number","boolean",Sl,"symbol","bigint"]),o!==Sf&&iS.indexOf(o)!==-1}var Dt=R0("string"),Bt=R0(M0);function ji(o){return!o&&_e(o)?!1:!!o&&typeof o===Sf}var Yt=Fi($_,"isArray"),Oz=z_("Date"),kf=R0("number"),H_=R0("boolean"),oS=z_("Error");function as(o){return!!(o&&o.then&&Bt(o.then))}function N0(o){return!(!o||Dz(function(){return!(o&&0+o)},!o))}var sS=Fi(za,"getOwnPropertyDescriptor");function Sa(o,s){return!!o&&rS.hasOwnProperty[Hr](o,s)}var ru=ns(Fi(za,"hasOwn"),Uz);function Uz(o,s){return Sa(o,s)||!!sS(o,s)}function en(o,s,c){if(o&&ji(o)){for(var h in o)if(ru(o,h)&&s[Hr](o,h,o[h])===-1)break}}var O0={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function Fz(o){var s={};if(s[O0.c]=!0,s[O0.e]=!0,o.l){s.get=function(){return o.l.v};var c=sS(o.l,"v");c&&c.set&&(s.set=function(h){o.l.v=h})}return en(o,function(h,d){s[O0[h]]=Lz(d)?s[O0[h]]:d}),s}var os=Fi(za,"defineProperty");function mn(o,s,c){return os(o,s,Fz(c))}function q_(o,s,c,h,d){var m={};return en(o,function(b,f){U0(m,b,s?f:b,d),U0(m,f,b,d)}),h?h(m):m}function U0(o,s,c,h){os(o,s,{value:c,enumerable:!0,writable:!!h})}var Bi=ns(V_),jz="[object Error]";function it(o,s){var c=eS,h=rS[P0][Hr](o);h===jz&&(o={stack:Bi(o.stack),message:Bi(o.message),name:Bi(o.name)});try{c=JSON.stringify(o,Er,s?typeof s=="number"?s:4:ra),c=(c?c.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):Er)||Bi(o)}catch(d){c=" - "+it(d,s)}return h+": "+c}function ia(o){throw new Error(o)}function Ha(o){throw new TypeError(o)}var G_=Fi(za,"freeze");function Bz(o){return o}function Vz(o){return o[tS]||Er}var uS=Fi(za,"assign"),ss=Fi(za,"keys");function _d(o){return G_&&en(o,function(s,c){(Yt(c)||ji(c))&&_d(c)}),us(o)}var us=ns(G_,Bz),lS=ns(Fi(za,"getPrototypeOf"),Vz);function $z(o){return q_(o,1,0,us)}function zz(o){return q_(o,0,0,us)}function Hz(o){var s={};return en(o,function(c,h){U0(s,c,h[1]),U0(s,h[0],h[1])}),us(s)}function qz(o){return Hz(o)}var K_=zz({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),W_="__tsUtils$gblCfg",cS;function X_(){var o;return typeof globalThis!==Sl&&(o=globalThis),!o&&typeof self!==Sl&&(o=self),!o&&typeof window!==Sl&&(o=window),!o&&typeof global!==Sl&&(o=global),o}function Y_(){if(!cS){var o=Nr(X_).v||{};cS=o[W_]=o[W_]||{}}return cS}var Tl=F0;function F0(o,s,c){var h=s?s[o]:Er;return function(d){var m=(d?d[o]:Er)||h;if(m||c){var b=arguments;return(m||c).apply(d,m?is[Hr](b,1):b)}Ha('"'+Bi(o)+'" not defined for '+it(d))}}function Gz(o){return function(s){return s[o]}}var Kz=Fi(_z,"max"),J_=Tl("slice",kl),lo=Tl("substring",kl),iu=F0("substr",kl,Wz);function Wz(o,s,c){return _e(o)&&Ha("Invalid "+it(o)),c<0?eS:(s=s||0,s<0&&(s=Kz(s+o[Md],0)),Yn(c)?J_(o,s):J_(o,s,s+c))}function dS(o,s){return lo(o,0,s)}var Q_="_urid",pS;function Xz(){if(!pS){var o=Y_();pS=o.gblSym=o.gblSym||{k:{},s:{}}}return pS}var j0;function hS(o){var s={description:Bi(o),toString:function(){return nS+"("+o+")"}};return s[Mz]=!0,s}function Yz(o){var s=Xz();if(!ru(s.k,o)){var c=hS(o),h=ss(s.s).length;c[Q_]=function(){return h+"_"+c[P0]()},s.k[o]=c,s.s[c[Q_]()]=Bi(o)}return s.k[o]}function Jz(o){!j0&&(j0={});var s,c=K_[o];return c&&(s=j0[c]=j0[c]||hS(nS+"."+c)),s}var hr;function au(){hr=Y_()}function Qz(o){var s={};return!hr&&au(),s.b=hr.lzy,os(s,"v",{configurable:!0,get:function(){var c=o();return hr.lzy||os(s,"v",{value:c}),s.b=hr.lzy,c}}),s}function ka(o){return os({toJSON:function(){return o}},"v",{value:o})}var Z_="window",Tf;function Dd(o,s){var c;return function(){return!hr&&au(),(!c||hr.lzy)&&(c=ka(Nr(o,s).v)),c.v}}function Ta(o){return!hr&&au(),(!Tf||o===!1||hr.lzy)&&(Tf=ka(Nr(X_).v||Er)),Tf.v}function Jn(o,s){var c;if(!Tf||s===!1?c=Ta(s):c=Tf.v,c&&c[o])return c[o];if(o===Z_)try{return window}catch{}return Er}function e6(){return!!qr()}var qr=Dd(Jn,["document"]);function B0(){return!!aa()}var aa=Dd(Jn,[Z_]);function Zz(){return!!co()}var co=Dd(Jn,["navigator"]);function eH(){return!!t6()}var t6=Dd(Jn,["history"]),tH=Dd(function(){return!!Nr(function(){return process&&(process.versions||{}).node}).v}),n6=Dd(function(){return!!Nr(function(){return self&&self instanceof WorkerGlobalScope}).v}),Pd,fS;function V0(){return Pd=ka(Nr(Jn,[nS]).v),Pd}function nH(o){var s=(hr.lzy?0:Pd)||V0();return s.v?s.v[o]:ra}function rH(){return!!iH()}function iH(){return!hr&&au(),((hr.lzy?0:Pd)||V0()).v}function gS(o,s){var c=K_[o];!hr&&au();var h=(hr.lzy?0:Pd)||V0();return h.v?h.v[c||o]:Jz(o)}function Af(o,s){!hr&&au();var c=(hr.lzy?0:Pd)||V0();return c.v?c.v(o):hS(o)}function mS(o){return!hr&&au(),fS=(hr.lzy?0:fS)||ka(Nr(nH,["for"]).v),(fS.v||Yz)(o)}function vS(o){return!!o&&Bt(o.next)}function r6(o){return!Rz(o)&&Bt(o[gS(3)])}var $0;function yS(o,s,c){if(o&&(vS(o)||(!$0&&($0=ka(gS(3))),o=o[$0.v]?o[$0.v]():Er),vS(o))){var h=ra,d=ra;try{for(var m=0;!(d=o.next()).done&&s[Hr](c||o,d.value,m,o)!==-1;)m++}catch(b){h={e:b},o.throw&&(d=Er,o.throw(h))}finally{try{d&&!d.done&&o.return&&o.return(d)}finally{if(h)throw h.e}}}}function Ld(o,s,c){return o.apply(s,c)}function Rd(o,s){return!Yn(s)&&o&&(Yt(s)?Ld(o.push,o,s):vS(s)||r6(s)?yS(s,function(c){o.push(c)}):o.push(s)),o}function rt(o,s,c){if(o)for(var h=o[Md]>>>0,d=0;d<h&&!(d in o&&s[Hr](o,o[d],d,o)===-1);d++);}var ni=Tl("indexOf",L0),Ef=Tl("map",L0);function z0(o,s,c){return((o?o.slice:Er)||is).apply(o,is[Hr](arguments,1))}var aH=Tl("reduce",L0),ou=ns(Fi(za,"create"),oH);function oH(o){if(!o)return{};var s=typeof o;s!==Sf&&s!==M0&&Ha("Prototype must be an Object or function: "+it(o));function c(){}return c[rs]=o,new c}var bS;function i6(o,s){var c=za.setPrototypeOf||function(h,d){var m;!bS&&(bS=ka((m={},m[tS]=[],m instanceof Array))),bS.v?h[tS]=d:en(d,function(b,f){return h[b]=f})};return c(o,s)}function sH(o,s,c){Nr(mn,[s,D0,{v:o,c:!0,e:!1}]),s=i6(s,c);function h(){this[_0]=s,Nr(mn,[this,D0,{v:o,c:!0,e:!1}])}return s[rs]=c===Er?ou(c):(h[rs]=c[rs],new h),s}function a6(o,s){s&&(o[D0]=s)}function o6(o,s,c){var h=Error,d=h[rs][D0],m=Error.captureStackTrace;return sH(o,function(){var b=this,f=arguments;try{Nr(a6,[h,o]);var A=Ld(h,b,is[Hr](f))||b;if(A!==b){var M=lS(b);M!==lS(A)&&i6(A,M)}return m&&m(A,b[_0]),s&&s(A,f),A}finally{Nr(a6,[h,d])}},h)}var wS;function uH(o){throw wS||(wS=o6("UnsupportedError")),new wS(o)}function po(){return(Date.now||lH)()}function lH(){return new Date().getTime()}function cH(o){return function(s){return _e(s)&&Ha("strTrim called ["+it(s)+"]"),s&&s.replace&&(s=s.replace(o,eS)),s}}var dH=cH(/^\s+|(?=\s)\s+$/g),fr=F0("trim",kl,dH),xS,SS,kS;function bi(o){if(!o||typeof o!==Sf)return!1;kS||(kS=B0()?aa():!0);var s=!1;if(o!==kS){SS||(xS=Function[rs][P0],SS=xS[Hr](za));try{var c=lS(o);s=!c,s||(Sa(c,_0)&&(c=c[_0]),s=!!(c&&typeof c===M0&&xS[Hr](c)===SS))}catch{}}return s}function pH(o){return o.value&&l6(o),!0}var s6=[mH,l6,yH,vH];function hH(o,s,c,h){var d;return rt(o,function(m){if(m.k===s)return d=m,-1}),d||(d={k:s,v:s},o.push(d),h(d)),d.v}function TS(o,s,c,h){var d=c.handler,m=c.path?h?c.path.concat(h):c.path:[],b={handler:c.handler,src:c.src,path:m},f=typeof s,A=!1,M=s===Er;M||(s&&f===Sf?A=bi(s):M=Nz(f));var D={type:f,isPrim:M,isPlain:A,value:s,result:s,path:m,origin:c.src,copy:function(N,F){return TS(o,N,F?b:c,F)},copyTo:function(N,F){return u6(o,N,F,b)}};return D.isPrim?d&&d[Hr](c,D)?D.result:s:hH(o,s,m,function(N){mn(D,"result",{g:function(){return N.v},s:function(w){N.v=w}});for(var F=0,L=d;!(L||(F<s6.length?s6[F++]:pH))[Hr](c,D);)L=Er})}function u6(o,s,c,h){if(!_e(c))for(var d in c)s[d]=TS(o,c[d],h,d);return s}function fH(o,s,c){var h={handler:c,src:s,path:[]};return u6([],o,s,h)}function gH(o,s){var c={handler:s,src:o};return TS([],o,c)}function mH(o){var s=o.value;if(Yt(s)){var c=o.result=[];return c.length=s.length,o.copyTo(c,s),!0}return!1}function vH(o){var s=o.value;return Oz(s)?(o.result=new Date(s.getTime()),!0):!1}function yH(o){return o.type===M0}function l6(o){var s=o.value;if(s&&o.isPlain){var c=o.result={};return o.copyTo(c,s),!0}return!1}function c6(o,s){return rt(s,function(c){fH(o,c)}),o}function d6(o,s,c,h,d,m,b){return c6(gH(o)||{},is[Hr](arguments))}function bH(o,s,c,h,d,m,b){return c6(o||{},is[Hr](arguments))}var wH=Gz(Md),AS;function ls(){return!hr&&au(),(!AS||hr.lzy)&&(AS=ka(Nr(Jn,["performance"]).v)),AS.v}var p6=Tl("split",kl);function h6(o,s,c){if(o&&s){var h=p6(s,"."),d=h.pop();rt(h,function(m){_e(o[m])&&(o[m]={}),o=o[m]}),o[d]=c}}var f6=F0("endsWith",kl,xH);function xH(o,s,c){Dt(o)||Ha("'"+it(o)+"' is not a string");var h=Dt(s)?s:Bi(s),d=!Yn(c)&&c<o[Md]?c:o[Md];return lo(o,d-h[Md],d)===h}var Vi=Tl("indexOf",kl),ES="ref",CS="unref",IS="hasRef",SH="enabled";function kH(o,s,c){var h=!0,d=o?s(Er):Er,m;function b(){return h=!1,d&&d[CS]&&d[CS](),m}function f(){d&&c(d),d=Er}function A(){return d=s(d),h||b(),m}function M(D){!D&&d&&f(),D&&!d&&A()}return m={cancel:f,refresh:A},m[IS]=function(){return d&&d[IS]?d[IS]():h},m[ES]=function(){return h=!0,d&&d[ES]&&d[ES](),m},m[CS]=b,m=os(m,SH,{get:function(){return!!d},set:M}),{h:m,dn:function(){d=Er}}}function g6(o,s,c){var h=Yt(s),d=h?s.length:0,m=(d>0?s[0]:h?ra:s)||setTimeout,b=(d>1?s[1]:ra)||clearTimeout,f=c[0];c[0]=function(){A.dn(),Ld(f,ra,is[Hr](arguments))};var A=kH(o,function(M){if(M){if(M.refresh)return M.refresh(),M;Ld(b,ra,[M])}return Ld(m,ra,c)},function(M){Ld(b,ra,[M])});return A.h}function Aa(o,s){return g6(!0,ra,is[Hr](arguments))}function TH(o,s){return g6(!1,ra,is[Hr](arguments))}var H0,q0="constructor",cs="prototype",G0="function",K0="_dynInstFuncs",MS="_isDynProxy",Nd="_dynClass",AH="_dynCls$",_S="_dynInstChk",Cf=_S,m6="_dfOpts",v6="_unknown_",DS="__proto__",W0="_dyn"+DS,y6="__dynProto$Gbl",PS="_dynInstProto",X0="useBaseInst",LS="setInstFuncs",RS=Object,If=RS.getPrototypeOf,b6=RS.getOwnPropertyNames,w6=Ta(),NS=w6[y6]||(w6[y6]={o:(H0={},H0[LS]=!0,H0[X0]=!0,H0),n:1e3});function Y0(o){return o&&(o===RS[cs]||o===Array[cs])}function OS(o){return Y0(o)||o===Function[cs]}function Al(o){var s;if(o){if(If)return If(o);var c=o[DS]||o[cs]||(o[q0]?o[q0][cs]:null);s=o[W0]||c,Sa(o,W0)||(delete o[PS],s=o[W0]=o[PS]||o[W0],o[PS]=c)}return s}function J0(o,s){var c=[];if(b6)c=b6(o);else for(var h in o)typeof h=="string"&&Sa(o,h)&&c.push(h);if(c&&c.length>0)for(var d=0;d<c.length;d++)s(c[d])}function US(o,s,c){return s!==q0&&typeof o[s]===G0&&(c||Sa(o,s))&&s!==DS&&s!==cs}function Q0(o){Ha("DynamicProto: "+o)}function EH(o){var s=ou(null);return J0(o,function(c){!s[c]&&US(o,c,!1)&&(s[c]=o[c])}),s}function FS(o,s){for(var c=o.length-1;c>=0;c--)if(o[c]===s)return!0;return!1}function CH(o,s,c,h){function d(A,M,D){var N=M[D];if(N[MS]&&h){var F=A[K0]||{};F[Cf]!==!1&&(N=(F[M[Nd]]||{})[D]||N)}return function(){return N.apply(A,arguments)}}var m=ou(null);J0(c,function(A){m[A]=d(s,c,A)});for(var b=Al(o),f=[];b&&!OS(b)&&!FS(f,b);)J0(b,function(A){!m[A]&&US(b,A,!If)&&(m[A]=d(s,b,A))}),f.push(b),b=Al(b);return m}function IH(o,s,c,h){var d=null;if(o&&Sa(c,Nd)){var m=o[K0]||ou(null);if(d=(m[c[Nd]]||ou(null))[s],d||Q0("Missing ["+s+"] "+G0),!d[_S]&&m[Cf]!==!1){for(var b=!Sa(o,s),f=Al(o),A=[];b&&f&&!OS(f)&&!FS(A,f);){var M=f[s];if(M){b=M===h;break}A.push(f),f=Al(f)}try{b&&(o[s]=d),d[_S]=1}catch{m[Cf]=!1}}}return d}function MH(o,s,c){var h=s[o];return h===c&&(h=Al(s)[o]),typeof h!==G0&&Q0("["+o+"] is not a "+G0),h}function _H(o,s,c,h,d){function m(A,M){var D=function(){var N=IH(this,M,A,D)||MH(M,A,D);return N.apply(this,arguments)};return D[MS]=1,D}if(!Y0(o)){var b=c[K0]=c[K0]||ou(null);if(!Y0(b)){var f=b[s]=b[s]||ou(null);b[Cf]!==!1&&(b[Cf]=!!d),Y0(f)||J0(c,function(A){US(c,A,!1)&&c[A]!==h[A]&&(f[A]=c[A],delete c[A],(!Sa(o,A)||o[A]&&!o[A][MS])&&(o[A]=m(o,A)))})}}}function DH(o,s){if(If){for(var c=[],h=Al(s);h&&!OS(h)&&!FS(c,h);){if(h===o)return!0;c.push(h),h=Al(h)}return!1}return!0}function jS(o,s){return Sa(o,cs)?o.name||s||v6:((o||{})[q0]||{}).name||s||v6}function Un(o,s,c,h){Sa(o,cs)||Q0("theClass is an invalid class definition.");var d=o[cs];DH(d,s)||Q0("["+jS(o)+"] not in hierarchy of ["+jS(s)+"]");var m=null;Sa(d,Nd)?m=d[Nd]:(m=AH+jS(o,"_")+"$"+NS.n,NS.n++,d[Nd]=m);var b=Un[m6],f=!!b[X0];f&&h&&h[X0]!==void 0&&(f=!!h[X0]);var A=EH(s),M=CH(d,s,A,f);c(s,M);var D=!!If&&!!b[LS];D&&h&&(D=!!h[LS]),_H(d,m,s,A,D!==!1)}Un[m6]=NS.o;var x6="function",S6="object",BS="undefined",ho="prototype",VS=Object,PH=VS[ho];(Ta()||{}).Symbol,(Ta()||{}).Reflect;var k6="hasOwnProperty",LH=function(o){for(var s,c=1,h=arguments.length;c<h;c++){s=arguments[c];for(var d in s)PH[k6].call(s,d)&&(o[d]=s[d])}return o},wi=uS||LH,$S=function(o,s){return $S=VS.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var d in h)h[k6](d)&&(c[d]=h[d])},$S(o,s)};function ds(o,s){typeof s!==x6&&s!==null&&Ha("Class extends value "+String(s)+" is not a constructor or null"),$S(o,s);function c(){this.constructor=o}o[ho]=s===null?ou(s):(c[ho]=s[ho],new c)}function T6(o,s){for(var c=0,h=s.length,d=o.length;c<h;c++,d++)o[d]=s[c];return o}var A6=$z,RH=qz,su=A6({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2}),Od="toLowerCase",Z0="blkVal",Nt="length",ey="rdOnly",ty="notify",ny="warnToConsole",Mf="throwInternal",Ud="setDf",uu="watch",ur="logger",El="apply",vn="push",Fd="splice",E6="hdlr",jd="cancel",_f="initialize",lu="identifier",ry="removeNotificationListener",iy="addNotificationListener",fo="isInitialized",C6="instrumentationKey",zS="INACTIVE",Df="value",ay="getNotifyMgr",Pf="getPlugin",ps="name",Lf="iKey",Bd="time",xi="processNext",I6="getProcessTelContext",M6="pollInternalLogs",Vd="enabled",_6="stopPollingInternalLogs",cu="unload",oy="onComplete",sy="version",D6="loggingLevelConsole",Cl="createNew",hs="teardown",uy="messageId",Il="message",$d="isAsync",fs="diagLog",ly="_doTeardown",Rf="update",go="getNext",Nf="setNextPlugin",P6="protocol",HS="userAgent",zd="split",qS="nodeType",Ml="replace",L6="logInternalMessage",gs="type",GS="handler",Of="status",R6="getResponseHeader",N6="getAllResponseHeaders",KS="isChildEvt",Hd="data",qd="getCtx",mo="setCtx",WS="complete",O6="itemsReceived",Uf="urlString",U6="sendPOST",XS="headers",Gd="timeout",F6="setRequestHeader",YS="traceId",JS="spanId",QS="traceFlags",ZS="getAttribute",ek;function NH(o,s){ek||(ek=o6("AggregationError",function(h,d){d[Nt]>1&&(h.errors=d[1])}));var c=o;throw rt(s,function(h,d){c+=`
`.concat(d," > ").concat(it(h))}),new ek(c,s||[])}/*!
 * NevWare21 Solutions LLC - ts-async, 0.5.2
 * https://github.com/nevware21/ts-async
 * Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.
 * Licensed under the MIT license.
 */var cy="Promise",tk="rejected";function ms(o,s){return j6(o,function(c){return s?s({status:"fulfilled",rejected:!1,value:c}):c},function(c){return s?s({status:tk,rejected:!0,reason:c}):c})}function j6(o,s,c,h){var d=o;try{if(as(o))(s||c)&&(d=o.then(s,c));else try{s&&(d=s(o))}catch(m){if(c)d=c(m);else throw m}}finally{}return d}var B6=["pending","resolving","resolved",tk],V6="dispatchEvent",dy;function OH(o){var s;return o&&o.createEvent&&(s=o.createEvent("Event")),!!s&&s.initEvent}function UH(o,s,c,h){var d=qr();!dy&&(dy=ka(!!Nr(OH,[d]).v));var m=dy.v?d.createEvent("Event"):h?new Event(s):{};if(c&&c(m),dy.v&&m.initEvent(s,!1,!0),m&&o[V6])o[V6](m);else{var b=o["on"+s];if(b)b(m);else{var f=Jn("console");f&&(f.error||f.log)(s,it(m))}}}var $6="unhandledRejection",FH=$6.toLowerCase(),z6=[],jH=0,BH=10,nk;function H6(o){return Bt(o)?o.toString():it(o)}function q6(o,s,c){var h=z0(arguments,3),d=0,m=!1,b,f=[],A=jH++,M=!1,D=null,N;function F(fe,Me){try{z6.push(A),M=!0,D&&D.cancel(),D=null;var Te=o(function(re,Pe){f.push(function(){try{var ke=d===2?fe:Me,T=Yn(ke)?b:Bt(ke)?ke(b):ke;as(T)?T.then(re,Pe):ke?re(T):d===3?Pe(T):re(T)}catch(oe){Pe(oe)}}),m&&G()},h);return Te}finally{z6.pop()}}function L(fe){return F(void 0,fe)}function w(fe){var Me=fe,Te=fe;return Bt(fe)&&(Me=function(re){return fe&&fe(),re},Te=function(re){throw fe&&fe(),re}),F(Me,Te)}function U(){return B6[d]}function G(){if(f.length>0){var fe=f.slice();f=[],M=!0,D&&D.cancel(),D=null,s(fe)}}function Z(fe,Me){return function(Te){if(d===Me){if(fe===2&&as(Te)){d=1,Te.then(Z(2,1),Z(3,1));return}d=fe,m=!0,b=Te,G(),!M&&fe===3&&!D&&(D=Aa(ie,BH))}}}function ie(){if(!M)if(M=!0,tH())process.emit($6,b,N);else{var fe=aa()||Ta();!nk&&(nk=ka(Nr(Jn,[cy+"RejectionEvent"]).v)),UH(fe,FH,function(Me){return mn(Me,"promise",{g:function(){return N}}),Me.reason=b,Me},!!nk.v)}}N={then:F,catch:L,finally:w},os(N,"state",{get:U}),rH()&&(N[gS(11)]="IPromise");function ge(){return"IPromise "+U()+(m?" - "+H6(b):"")}return N.toString=ge,function(){Bt(c)||Ha(cy+": executor is not a function - "+H6(c));var fe=Z(3,0);try{c.call(N,Z(2,0),fe)}catch(Me){fe(Me)}}(),N}function VH(o){return function(s){var c=z0(arguments,1);return o(function(h,d){try{var m=[],b=1;yS(s,function(f,A){f&&(b++,j6(f,function(M){m[A]=M,--b===0&&h(m)},d))}),b--,b===0&&h(m)}catch(f){d(f)}},c)}}function $H(o){return ka(function(s){var c=z0(arguments,1);return o(function(h,d){var m=[],b=1;function f(A,M){b++,ms(A,function(D){D.rejected?m[M]={status:tk,reason:D.reason}:m[M]={status:"fulfilled",value:D.value},--b===0&&h(m)})}try{Yt(s)?rt(s,f):r6(s)?yS(s,f):Ha("Input is not an iterable"),b--,b===0&&h(m)}catch(A){d(A)}},c)})}function G6(o){rt(o,function(s){try{s()}catch{}})}function zH(o){var s=kf(o)?o:0;return function(c){Aa(function(){G6(c)},s)}}function K6(o,s){return q6(K6,zH(s),o,s)}var rk;function HH(o,s){!rk&&(rk=ka(Nr(Jn,[cy]).v||null));var c=rk.v;if(!c)return K6(o);Bt(o)||Ha(cy+": executor is not a function - "+it(o));var h=0;function d(){return B6[h]}var m=new c(function(b,f){function A(D){h=2,b(D)}function M(D){h=3,f(D)}o(A,M)});return os(m,"state",{get:d}),m}var ik;function Ff(o){return q6(Ff,G6,o)}function qH(o,s){return!ik&&(ik=$H(Ff)),ik.v(o,s)}var ak;function du(o,s){return!ak&&(ak=ka(HH)),ak.v.call(this,o,s)}var GH=VH(du),vo=void 0,dn="",_l="channels",Cr="core",ok="createPerfMgr",sk="disabled",Kd="extensionConfig",Wd="extensions",yo="processTelemetry",py="priority",hy="eventsSent",jf="eventsDiscarded",fy="eventsSendRequest",Dl="perfEvent",uk="offlineEventsStored",lk="offlineBatchSent",ck="offlineBatchDrop",gy="getPerfMgr",dk="domain",pk="path",KH="Not dynamic - ",WH="getPrototypeOf",XH=/-([a-z])/g,YH=/([^\w\d_$])/g,JH=/^(\d+[\w\d_$])/,QH=Object[WH];function Pl(o){return!_e(o)}function my(o){var s=o;return s&&Dt(s)&&(s=s[Ml](XH,function(c,h){return h.toUpperCase()}),s=s[Ml](YH,"_"),s=s[Ml](JH,function(c,h){return"_"+h})),s}function ri(o,s){return o&&s?Vi(o,s)!==-1:!1}function Xd(o){return o&&o.toISOString()||""}function wn(o){return oS(o)?o[ps]:dn}function Ln(o,s,c,h,d){var m=c;return o&&(m=o[s],m!==c&&(!d||d(m))&&(!h||h(c))&&(m=c,o[s]=m)),m}function Si(o,s,c){var h;return o?(h=o[s],!h&&_e(h)&&(h=Yn(c)?{}:c,o[s]=h)):h=Yn(c)?{}:c,h}function W6(o,s){var c=null,h=null;return Bt(o)?c=o:h=o,function(){var d=arguments;if(c&&(h=c()),h)return h[s][El](h,d)}}function ZH(o,s,c){if(o&&s&&ji(o)&&ji(s)){var h=function(m){if(Dt(m)){var b=s[m];Bt(b)?(!c||c(m,!0,s,o))&&(o[m]=W6(s,m)):(!c||c(m,!1,s,o))&&(ru(o,m)&&delete o[m],mn(o,m,{g:function(){return s[m]},s:function(f){s[m]=f}}))}};for(var d in s)h(d)}return o}function vy(o,s,c,h,d){o&&s&&c&&(o[s]=W6(c,h))}function Bf(o,s,c,h){return o&&s&&ji(o)&&Yt(c)&&rt(c,function(d){Dt(d)&&vy(o,d,s,d)}),o}function eq(o){return function(){function s(){var c=this;o&&en(o,function(h,d){c[h]=d})}return s}()}function X6(o){return o&&uS&&(o=VS(uS({},o))),o}function Y6(o,s,c,h,d,m){var b=arguments,f=b[0]||{},A=b[Nt],M=!1,D=1;for(A>0&&H_(f)&&(M=f,f=b[D]||{},D++),ji(f)||(f={});D<A;D++){var N=b[D],F=Yt(N),L=ji(N);for(var w in N){var U=F&&w in N||L&&ru(N,w);if(U){var G=N[w],Z=void 0;if(M&&G&&((Z=Yt(G))||bi(G))){var ie=f[w];Z?Yt(ie)||(ie=[]):bi(ie)||(ie={}),G=Y6(M,ie,G)}G!==void 0&&(f[w]=G)}}}return f}function hk(o,s){var c=!1,h=s&&s.featureOptIn&&s.featureOptIn[o];if(o&&h){var d=h.mode;c=d==3||d==1}return c}function yy(o){try{return o.responseText}catch{}return null}function J6(o,s){return o?"XDomainRequest,Response:"+yy(o)||"":s}function by(o,s){return o?"XMLHttpRequest,Status:"+o[Of]+",Response:"+yy(o)||o.response||"":s}function Q6(o,s){return s&&(kf(s)?o=[s].concat(o):Yt(s)&&(o=s.concat(o))),o}var tq="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Z6="withCredentials",nq="timeout";function rq(o,s,c,h,d,m){d===void 0&&(d=!1);function b(A,M,D){try{A[M]=D}catch{}}var f=new XMLHttpRequest;return b(f,tq,h),c&&b(f,Z6,c),f.open(o,s,!d),c&&b(f,Z6,c),!d&&m&&b(f,nq,m),f}function iq(o){var s={};if(Dt(o)){var c=fr(o)[zd](/[\r\n]+/);rt(c,function(h){if(h){var d=h.indexOf(": ");if(d!==-1){var m=fr(h.substring(0,d))[Od](),b=fr(h.substring(d+1));s[m]=b}else s[fr(h)]=1}})}return s}function fk(o,s,c){if(!o[c]&&s&&s[R6]){var h=s[R6](c);h&&(o[c]=fr(h))}return o}var aq="kill-duration",oq="kill-duration-seconds",sq="time-delta-millis";function gk(o,s){var c={};return o[N6]?c=iq(o[N6]()):s&&(c=fk(c,o,sq),c=fk(c,o,aq),c=fk(c,o,oq)),c}var uq="documentMode",lq="location",cq="console",eD="JSON",dq="crypto",pq="msCrypto",hq="ReactNative",mk="msie",vk="trident/",tD="XMLHttpRequest",yk=null,bk=null,fq=!1,Yd=null,wk=null;function nD(o,s){var c=!1;if(o){try{if(c=s in o,!c){var h=o[ho];h&&(c=s in h)}}catch{}if(!c)try{var d=new o;c=!Yn(d[s])}catch{}}return c}function bo(o){if(o&&fq){var s=Jn("__mockLocation");if(s)return s}return typeof location===S6&&location?location:Jn(lq)}function gq(){return typeof console!==BS?console:Jn(cq)}function Vf(){return!!(typeof JSON===S6&&JSON||Jn(eD)!==null)}function qa(){return Vf()?JSON||Jn(eD):null}function mq(){return Jn(dq)}function vq(){return Jn(pq)}function yq(){var o=co();return o&&o.product?o.product===hq:!1}function xk(){var o=co();if(o&&(o[HS]!==bk||yk===null)){bk=o[HS];var s=(bk||dn)[Od]();yk=ri(s,mk)||ri(s,vk)}return yk}function rD(o){if(o===void 0&&(o=null),!o){var s=co()||{};o=s?(s.userAgent||dn)[Od]():dn}var c=(o||dn)[Od]();if(ri(c,mk)){var h=qr()||{};return Math.max(parseInt(c[zd](mk)[1]),h[uq]||0)}else if(ri(c,vk)){var d=parseInt(c[zd](vk)[1]);if(d)return d+4}return null}function $f(o){return(wk===null||o===!1)&&(wk=Zz()&&!!co().sendBeacon),wk}function Sk(o){var s=!1;try{s=!!Jn("fetch");var c=Jn("Request");s&&o&&c&&(s=nD(c,"keepalive"))}catch{}return s}function bq(){return Yd===null&&(Yd=typeof XDomainRequest!==BS,Yd&&wy()&&(Yd=Yd&&!nD(Jn(tD),"withCredentials"))),Yd}function wy(){var o=!1;try{var s=Jn(tD);o=!!s}catch{}return o}function wq(o,s){return o&&o.dispatchEvent&&s?(o.dispatchEvent(s),!0):!1}function xq(o,s){var c=null,h={detail:s||null};if(Bt(CustomEvent))c=new CustomEvent(o,h);else{var d=qr();d&&d.createEvent&&(c=d.createEvent("CustomEvent"),c.initCustomEvent(o,!0,!0,h))}return c}function Sq(o,s,c){var h=Ta();if(h&&h.CustomEvent)try{var d={cfg:s||null,customDetails:c||null};return wq(h,xq(o,d))}catch{}return!1}var iD=4294967296,pu=4294967295,aD=123456789,oD=987654321,sD=!1,zf=aD,Hf=oD;function kq(o){o<0&&(o>>>=0),zf=aD+o&pu,Hf=oD-o&pu,sD=!0}function Tq(){try{var o=po()&2147483647;kq((Math.random()*iD^o)+o)}catch{}}function Aq(o){return Math.floor(qf()/pu*(o+1))>>>0}function qf(o){var s=0,c=mq()||vq();return c&&c.getRandomValues&&(s=c.getRandomValues(new Uint32Array(1))[0]&pu),s===0&&xk()&&(sD||Tq(),s=Eq()&pu),s===0&&(s=Math.floor(iD*Math.random()|0)),s>>>=0,s}function Eq(o){Hf=36969*(Hf&65535)+(Hf>>16)&pu,zf=18e3*(zf&65535)+(zf>>16)&pu;var s=(Hf<<16)+(zf&65535)>>>0&pu|0;return s>>>=0,s}function kk(o){o===void 0&&(o=22);for(var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=qf()>>>0,h=0,d=dn;d[Nt]<o;)h++,d+=s.charAt(c&63),c>>>=6,h===5&&(c=(qf()<<2&4294967295|c&3)>>>0,h=0);return d}var uD="3.3.3",Cq="."+kk(6),Iq=0;function lD(o){return o[qS]===1||o[qS]===9||!+o[qS]}function Mq(o,s){var c=s[o.id];if(!c){c={};try{lD(s)&&mn(s,o.id,{e:!1,v:c})}catch{}}return c}function Ea(o,s){return s===void 0&&(s=!1),my(o+Iq+++(s?"."+uD:dn)+Cq)}function cD(o){var s={id:Ea("_aiData-"+(o||dn)+"."+uD),accept:function(c){return lD(c)},get:function(c,h,d,m){var b=c[s.id];return b?b[my(h)]:(m&&(b=Mq(s,c),b[my(h)]=d),d)},kill:function(c,h){if(c&&c[h])try{delete c[h]}catch{}}};return s}function xy(o){return o&&ji(o)&&(o.isVal||o.fb||ru(o,"v")||ru(o,"mrg")||ru(o,"ref")||o.set)}function dD(o,s,c){var h,d=c.dfVal||aS;if(s&&c.fb){var m=c.fb;Yt(m)||(m=[m]);for(var b=0;b<m[Nt];b++){var f=m[b],A=s[f];if(d(A)?h=A:o&&(A=o.cfg[f],d(A)&&(h=A),o.set(o.cfg,Bi(f),A)),d(h))break}}return!d(h)&&d(c.v)&&(h=c.v),h}function Tk(o,s,c){var h=c;if(c&&xy(c)&&(h=dD(o,s,c)),h){xy(h)&&(h=Tk(o,s,h));var d;Yt(h)?(d=[],d[Nt]=h[Nt]):bi(h)&&(d={}),d&&(en(h,function(m,b){b&&xy(b)&&(b=Tk(o,s,b)),d[m]=b}),h=d)}return h}function Ak(o,s,c,h){var d,m,b,f=h,A,M,D,N;xy(f)?(d=f.isVal,m=f.set,D=f[ey],N=f[Z0],A=f.mrg,M=f.ref,!M&&Yn(M)&&(M=!!A),b=dD(o,s,f)):b=h,N&&o[Z0](s,c);var F,L=!0,w=s[c];(w||!_e(w))&&(F=w,L=!1,d&&F!==b&&!d(F)&&(F=b,L=!0),m&&(F=m(F,b,s),L=F===b)),L?b?F=Tk(o,s,b):F=b:(bi(F)||Yt(b))&&A&&b&&(bi(b)||Yt(b))&&en(b,function(U,G){Ak(o,F,U,G)}),o.set(s,c,F),M&&o.ref(s,c),D&&o[ey](s,c)}var hu=mS("[[ai_dynCfg_1]]"),pD=mS("[[ai_blkDynCfg_1]]"),_q=mS("[[ai_frcDynCfg_1]]");function hD(o){if(o){var s;if(Yt(o)?(s=[],s[Nt]=o[Nt]):bi(o)&&(s={}),s)return en(o,function(c,h){s[c]=hD(h)}),s}return o}function Dq(o){if(o){var s=o[hu]||o;if(s.cfg&&(s.cfg===o||s.cfg[hu]===s))return s}return null}function Pq(o){if(o&&(bi(o)||Yt(o)))try{o[pD]=!0}catch{}return o}function Ek(o,s,c){var h=!1;return c&&!o[s.blkVal]&&(h=c[_q],!h&&!c[pD]&&(h=bi(c)||Yt(c))),h}function fD(o){Ha("InvalidAccess:"+o)}var Lq=["push","pop","shift","unshift","splice"],Gf=function(o,s,c,h){o&&o[Mf](3,108,"".concat(c," [").concat(s,"] failed - ")+it(h))};function Rq(o,s,c){Yt(s)&&rt(Lq,function(h){var d=s[h];s[h]=function(){for(var m=[],b=0;b<arguments.length;b++)m[b]=arguments[b];var f=d[El](this,m);return Ty(o,s,c,"Patching"),f}})}function Sy(o,s){var c=sS(o,s);return c&&c.get}function Nq(o,s,c,h){var d={n:c,h:[],trk:function(M){M&&M.fn&&(ni(d.h,M)===-1&&d.h[vn](M),o.trk(M,d))},clr:function(M){var D=ni(d.h,M);D!==-1&&d.h[Fd](D,1)}},m=!0,b=!1;function f(){m&&(b=b||Ek(f,o,h),h&&!h[hu]&&b&&(h=Ty(o,h,c,"Converting")),m=!1);var M=o.act;return M&&d.trk(M),h}f[o.prop]={chng:function(){o.add(d)}};function A(M){if(h!==M){f[o.ro]&&!o.upd&&fD("["+c+"] is read-only:"+it(s)),m&&(b=b||Ek(f,o,h),m=!1);var D=b&&f[o.rf];if(b)if(D){en(h,function(F){h[F]=M?M[F]:vo});try{en(M,function(F,L){ky(o,h,F,L)}),M=h}catch(F){Gf((o.hdlr||{})[ur],c,"Assigning",F),b=!1}}else h&&h[hu]&&en(h,function(F){var L=Sy(h,F);if(L){var w=L[o.prop];w&&w.chng()}});if(M!==h){var N=M&&Ek(f,o,M);!D&&N&&(M=Ty(o,M,c,"Converting")),h=M,b=N}o.add(d)}}mn(s,d.n,{g:f,s:A})}function ky(o,s,c,h){if(s){var d=Sy(s,c),m=d&&!!d[o.prop];m?s[c]=h:Nq(o,s,c,h)}return s}function Ck(o,s,c,h){if(s){var d=Sy(s,c),m=d&&!!d[o.prop],b=h&&h[0],f=h&&h[1],A=h&&h[2];if(!m){if(A)try{Pq(s)}catch(M){Gf((o.hdlr||{})[ur],c,"Blocking",M)}try{ky(o,s,c,s[c]),d=Sy(s,c)}catch(M){Gf((o.hdlr||{})[ur],c,"State",M)}}b&&(d[o.rf]=b),f&&(d[o.ro]=f),A&&(d[o.blkVal]=!0)}return s}function Ty(o,s,c,h){try{en(s,function(d,m){ky(o,s,d,m)}),s[hu]||(os(s,hu,{get:function(){return o[E6]}}),Rq(o,s,c))}catch(d){Gf((o.hdlr||{})[ur],c,h,d)}return s}var Kf="[[ai_",Wf="]]";function Oq(o){var s,c=Af(Kf+"get"+o.uid+Wf),h=Af(Kf+"ro"+o.uid+Wf),d=Af(Kf+"rf"+o.uid+Wf),m=Af(Kf+"blkVal"+o.uid+Wf),b=Af(Kf+"dtl"+o.uid+Wf),f=null,A=null,M;function D(w,U){var G=M.act;try{M.act=w,w&&w[b]&&(rt(w[b],function(ie){ie.clr(w)}),w[b]=[]),U({cfg:o.cfg,set:o.set.bind(o),setDf:o[Ud].bind(o),ref:o.ref.bind(o),rdOnly:o[ey].bind(o)})}catch(ie){var Z=o[ur];throw Z&&Z[Mf](1,107,it(ie)),ie}finally{M.act=G||null}}function N(){if(f){var w=f;f=null,A&&A[jd](),A=null;var U=[];if(rt(w,function(G){if(G&&(G[b]&&(rt(G[b],function(Z){Z.clr(G)}),G[b]=null),G.fn))try{D(G,G.fn)}catch(Z){U[vn](Z)}}),f)try{N()}catch(G){U[vn](G)}U[Nt]>0&&NH("Watcher error(s): ",U)}}function F(w){if(w&&w.h[Nt]>0){f||(f=[]),A||(A=Aa(function(){A=null,N()},0));for(var U=0;U<w.h[Nt];U++){var G=w.h[U];G&&ni(f,G)===-1&&f[vn](G)}}}function L(w,U){if(w){var G=w[b]=w[b]||[];ni(G,U)===-1&&G[vn](U)}}return M=(s={prop:c,ro:h,rf:d},s[Z0]=m,s[E6]=o,s.add=F,s[ty]=N,s.use=D,s.trk=L,s),M}function Uq(o,s){var c={fn:s,rm:function(){c.fn=null,o=null,s=null}};return mn(c,"toJSON",{v:function(){return"WatcherHandler"+(c.fn?"":"[X]")}}),o.use(c,s),c}function Fq(o,s,c){var h,d=Dq(s);if(d)return d;var m=Ea("dyncfg",!0),b=s&&c!==!1?s:hD(s),f;function A(){f[ty]()}function M(Z,ie,ge){try{Z=ky(f,Z,ie,ge)}catch(fe){Gf(o,ie,"Setting value",fe)}return Z[ie]}function D(Z){return Uq(f,Z)}function N(Z,ie){f.use(null,function(ge){var fe=f.upd;try{Yn(ie)||(f.upd=ie),Z(ge)}finally{f.upd=fe}})}function F(Z,ie){var ge;return Ck(f,Z,ie,(ge={},ge[0]=!0,ge))[ie]}function L(Z,ie){var ge;return Ck(f,Z,ie,(ge={},ge[1]=!0,ge))[ie]}function w(Z,ie){var ge;return Ck(f,Z,ie,(ge={},ge[2]=!0,ge))[ie]}function U(Z,ie){return ie&&en(ie,function(ge,fe){Ak(G,Z,ge,fe)}),Z}var G=(h={uid:null,cfg:b},h[ur]=o,h[ty]=A,h.set=M,h[Ud]=U,h[uu]=D,h.ref=F,h[ey]=L,h[Z0]=w,h._block=N,h);return mn(G,"uid",{c:!1,e:!1,w:!1,v:m}),f=Oq(G),Ty(f,b,"config","Creating"),G}function jq(o,s){o?(o[ny](s),o[Mf](2,108,s)):fD(s)}function Ca(o,s,c,h){var d=Fq(c,o||{},h);return s&&d[Ud](d.cfg,s),d}function lr(o,s,c){var h=o[hu]||o;return h.cfg&&(h.cfg===o||h.cfg[hu]===h)?h[uu](s):(jq(c,KH+it(o)),Ca(o,null,c)[uu](s))}function Jd(o,s){if(o&&o[cu])return o[cu](s)}function gD(o,s,c){var h;return c||(h=du(function(d){c=d})),o&&wH(o)>0?ms(Jd(o[0],s),function(){gD(z0(o,1),s,c)}):c(),h}var Bq=500,mD="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";function Vq(o,s,c){return!o&&_e(o)?s:H_(o)?o:Bi(o)[Od]()==="true"}function Ga(o){return{mrg:!0,v:o}}function vD(o,s){return{set:o,v:s}}function Ay(o,s,c){return{fb:c,isVal:o,v:s}}function gr(o,s){return{fb:s,set:Vq,v:!!o}}function $q(o){return{isVal:Dt,v:Bi(dn)}}var Ik=[hy,jf,fy,Dl],Ey=null,Cy;function zq(o,s){return function(){var c=arguments,h=yD(s);if(h){var d=h.listener;d&&d[o]&&d[o][El](d,c)}}}function Hq(){var o=Jn("Microsoft");return o&&(Ey=o.ApplicationInsights),Ey}function yD(o){var s=Ey;return!s&&o.disableDbgExt!==!0&&(s=Ey||Hq()),s?s.ChromeDbgExt:null}function qq(o){if(!Cy){Cy={};for(var s=0;s<Ik[Nt];s++)Cy[Ik[s]]=zq(Ik[s],o)}return Cy}var Qd,bD="warnToConsole",Gq="AI (Internal): ",Kq="AI: ",Wq="AITR_",Xq={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},Yq=(Qd={},Qd[0]=null,Qd[1]="errorToConsole",Qd[2]=bD,Qd[3]="debugToConsole",Qd);function wD(o){return o?'"'+o[Ml](/\"/g,dn)+'"':dn}function Mk(o,s){var c=gq();if(c){var h="log";c[o]&&(h=o),Bt(c[h])&&c[h](s)}}var Xf=function(){function o(s,c,h,d){h===void 0&&(h=!1);var m=this;m[uy]=s,m[Il]=(h?Kq:Gq)+s;var b=dn;Vf()&&(b=qa().stringify(d));var f=(c?" message:"+wD(c):dn)+(d?" props:"+wD(b):dn);m[Il]+=f}return o.dataType="MessageData",o}();function Ll(o,s){return(o||{})[ur]||new Iy(s)}var Iy=function(){function o(s){this.identifier="DiagnosticLogger",this.queue=[];var c=0,h={},d,m,b,f,A;Un(o,this,function(M){A=N(s||{}),M.consoleLoggingLevel=function(){return d},M[Mf]=function(w,U,G,Z,ie){ie===void 0&&(ie=!1);var ge=new Xf(U,G,ie,Z);if(f)throw it(ge);var fe=Yq[w]||bD;if(Yn(ge[Il]))L("throw"+(w===1?"Critical":"Warning"),ge);else{if(ie){var Me=+ge[uy];!h[Me]&&d>=w&&(M[fe](ge[Il]),h[Me]=!0)}else d>=w&&M[fe](ge[Il]);D(w,ge)}},M.debugToConsole=function(w){Mk("debug",w),L("warning",w)},M[ny]=function(w){Mk("warn",w),L("warning",w)},M.errorToConsole=function(w){Mk("error",w),L("error",w)},M.resetInternalMessageCount=function(){c=0,h={}},M[L6]=D,M[cu]=function(w){A&&A.rm(),A=null};function D(w,U){if(!F()){var G=!0,Z=Wq+U[uy];if(h[Z]?G=!1:h[Z]=!0,G&&(w<=m&&(M.queue[vn](U),c++,L(w===1?"error":"warn",U)),c===b)){var ie="Internal events throttle limit per PageView reached for this app.",ge=new Xf(23,ie,!1);M.queue[vn](ge),w===1?M.errorToConsole(ie):M[ny](ie)}}}function N(w){return lr(Ca(w,Xq,M).cfg,function(U){var G=U.cfg;d=G[D6],m=G.loggingLevelTelemetry,b=G.maxMessageLimit,f=G.enableDebug})}function F(){return c>=b}function L(w,U){var G=yD(s||{});G&&G[fs]&&G[fs](w,U)}})}return o.__ieDyn=1,o}();function _k(o){return o||new Iy}function je(o,s,c,h,d,m){m===void 0&&(m=!1),_k(o)[Mf](s,c,h,d,m)}function Rl(o,s){_k(o)[ny](s)}function Jq(o,s,c){_k(o)[L6](s,c)}var Dk,Nl,xD="toGMTString",SD="toUTCString",Pk="cookie",Lk="expires",kD="isCookieUseDisabled",Rk="disableCookiesUsage",Zd="_ckMgr",My=null,Nk=null,TD=null,wo,AD={},_y={},Qq=(Dk={cookieCfg:Ga((Nl={},Nl[dk]={fb:"cookieDomain",dfVal:Pl},Nl.path={fb:"cookiePath",dfVal:Pl},Nl.enabled=vo,Nl.ignoreCookies=vo,Nl.blockedCookies=vo,Nl)),cookieDomain:vo,cookiePath:vo},Dk[Rk]=vo,Dk);function Ok(){!wo&&(wo=Qz(function(){return qr()}))}function Zq(o,s){var c=Py[Zd]||_y[Zd];return c||(c=Py[Zd]=Py(o,s),_y[Zd]=c),c}function Dy(o){return o?o.isEnabled():!0}function ED(o,s){return s&&o&&Yt(o.ignoreCookies)?ni(o.ignoreCookies,s)!==-1:!1}function eG(o,s){return s&&o&&Yt(o.blockedCookies)&&ni(o.blockedCookies,s)!==-1?!0:ED(o,s)}function CD(o,s){var c=s[Vd];if(_e(c)){var h=void 0;Yn(o[kD])||(h=!o[kD]),Yn(o[Rk])||(h=!o[Rk]),c=h}return c}function Uk(o,s){var c;return o&&(c=o.getCookieMgr()),c||(c=Zq(s,(o||{})[ur])),c}function Py(o,s){var c,h,d,m,b,f,A,M,D;o=Ca(o||_y,null,s).cfg,b=lr(o,function(F){F[Ud](F.cfg,Qq),h=F.ref(F.cfg,"cookieCfg"),d=h[pk]||"/",m=h[dk],f=CD(o,h)!==!1,A=h.getCookie||tG,M=h.setCookie||PD,D=h.delCookie||PD},s);var N=(c={isEnabled:function(){var F=CD(o,h)!==!1&&f&&ID(s),L=_y[Zd];return F&&L&&N!==L&&(F=Dy(L)),F},setEnabled:function(F){f=F!==!1,h[Vd]=F},set:function(F,L,w,U,G){var Z=!1;if(Dy(N)&&!eG(h,F)){var ie={},ge=fr(L||dn),fe=Vi(ge,";");if(fe!==-1&&(ge=fr(dS(L,fe)),ie=MD(lo(L,fe+1))),Ln(ie,dk,U||m,N0,Yn),!_e(w)){var Me=xk();if(Yn(ie[Lk])){var Te=po(),re=Te+w*1e3;if(re>0){var Pe=new Date;Pe.setTime(re),Ln(ie,Lk,_D(Pe,Me?xD:SD)||_D(Pe,Me?xD:SD)||dn,N0)}}Me||Ln(ie,"max-age",dn+w,null,Yn)}var ke=bo();ke&&ke[P6]==="https:"&&(Ln(ie,"secure",null,null,Yn),Nk===null&&(Nk=!nG((co()||{})[HS])),Nk&&Ln(ie,"SameSite","None",null,Yn)),Ln(ie,pk,G||d,null,Yn),M(F,DD(ge,ie)),Z=!0}return Z},get:function(F){var L=dn;return Dy(N)&&!ED(h,F)&&(L=A(F)),L},del:function(F,L){var w=!1;return Dy(N)&&(w=N.purge(F,L)),w},purge:function(F,L){var w,U=!1;if(ID(s)){var G=(w={},w[pk]=L||"/",w[Lk]="Thu, 01 Jan 1970 00:00:01 GMT",w);xk()||(G["max-age"]="0"),D(F,DD(dn,G)),U=!0}return U}},c[cu]=function(F){b&&b.rm(),b=null},c);return N[Zd]=N,N}function ID(o){if(My===null){My=!1,!wo&&Ok();try{var s=wo.v||{};My=s[Pk]!==void 0}catch(c){je(o,2,68,"Cannot access document.cookie - "+wn(c),{exception:it(c)})}}return My}function MD(o){var s={};if(o&&o[Nt]){var c=fr(o)[zd](";");rt(c,function(h){if(h=fr(h||dn),h){var d=Vi(h,"=");d===-1?s[h]=null:s[fr(dS(h,d))]=fr(lo(h,d+1))}})}return s}function _D(o,s){return Bt(o[s])?o[s]():null}function DD(o,s){var c=o||dn;return en(s,function(h,d){c+="; "+h+(_e(d)?dn:"="+d)}),c}function tG(o){var s=dn;if(!wo&&Ok(),wo.v){var c=wo.v[Pk]||dn;TD!==c&&(AD=MD(c),TD=c),s=fr(AD[o]||dn)}return s}function PD(o,s){!wo&&Ok(),wo.v&&(wo.v[Pk]=o+"="+s)}function nG(o){return Dt(o)?!!(ri(o,"CPU iPhone OS 12")||ri(o,"iPad; CPU OS 12")||ri(o,"Macintosh; Intel Mac OS X 10_14")&&ri(o,"Version/")&&ri(o,"Safari")||ri(o,"Macintosh; Intel Mac OS X 10_14")&&f6(o,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||ri(o,"Chrome/5")||ri(o,"Chrome/6")||ri(o,"UnrealEngine")&&!ri(o,"Chrome")||ri(o,"UCBrowser/12")||ri(o,"UCBrowser/11")):!1}var rG={perfEvtsSendAll:!1};function iG(o){o.h=null;var s=o.cb;o.cb=[],rt(s,function(c){Nr(c.fn,[c.arg])})}function fu(o,s,c,h){rt(o,function(d){d&&d[s]&&(c?(c.cb[vn]({fn:h,arg:d}),c.h=c.h||Aa(iG,0,c)):Nr(h,[d]))})}var aG=function(){function o(s){this.listeners=[];var c,h,d=[],m={h:null,cb:[]},b=Ca(s,rG);h=b[uu](function(f){c=!!f.cfg.perfEvtsSendAll}),Un(o,this,function(f){mn(f,"listeners",{g:function(){return d}}),f[iy]=function(A){d[vn](A)},f[ry]=function(A){for(var M=ni(d,A);M>-1;)d[Fd](M,1),M=ni(d,A)},f[hy]=function(A){fu(d,hy,m,function(M){M[hy](A)})},f[jf]=function(A,M){fu(d,jf,m,function(D){D[jf](A,M)})},f[fy]=function(A,M){fu(d,fy,M?m:null,function(D){D[fy](A,M)})},f[Dl]=function(A){A&&(c||!A[KS]())&&fu(d,Dl,null,function(M){A[$d]?Aa(function(){return M[Dl](A)},0):M[Dl](A)})},f[uk]=function(A){A&&A[Nt]&&fu(d,uk,m,function(M){M[uk](A)})},f[lk]=function(A){A&&A[Hd]&&fu(d,lk,m,function(M){M[lk](A)})},f[ck]=function(A,M){if(A>0){var D=M||0;fu(d,ck,m,function(N){N[ck](A,D)})}},f[cu]=function(A){var M=function(){h&&h.rm(),h=null,d=[],m.h&&m.h[jd](),m.h=null,m.cb=[]},D;if(fu(d,"unload",null,function(N){var F=N[cu](A);F&&(D||(D=[]),D[vn](F))}),D)return du(function(N){return ms(GH(D),function(){M(),N()})});M()}})}return o.__ieDyn=1,o}(),ep="ctx",Fk="ParentContextKey",Yf="ChildrenContextKey",oG=null,Ly=function(){function o(s,c,h){var d=this;if(d.start=po(),d[ps]=s,d[$d]=h,d[KS]=function(){return!1},Bt(c)){var m;mn(d,"payload",{g:function(){return!m&&Bt(c)&&(m=c(),c=null),m}})}d[qd]=function(b){return b?b===o[Fk]||b===o[Yf]?d[b]:(d[ep]||{})[b]:null},d[mo]=function(b,f){if(b)if(b===o[Fk])d[b]||(d[KS]=function(){return!0}),d[b]=f;else if(b===o[Yf])d[b]=f;else{var A=d[ep]=d[ep]||{};A[b]=f}},d[WS]=function(){var b=0,f=d[qd](o[Yf]);if(Yt(f))for(var A=0;A<f[Nt];A++){var M=f[A];M&&(b+=M[Bd])}d[Bd]=po()-d.start,d.exTime=d[Bd]-b,d[WS]=function(){}}}return o.ParentContextKey="parent",o.ChildrenContextKey="childEvts",o}(),sG=function(){function o(s){this.ctx={},Un(o,this,function(c){c.create=function(h,d,m){return new Ly(h,d,m)},c.fire=function(h){h&&(h[WS](),s&&Bt(s[Dl])&&s[Dl](h))},c[mo]=function(h,d){if(h){var m=c[ep]=c[ep]||{};m[h]=d}},c[qd]=function(h){return(c[ep]||{})[h]}})}return o.__ieDyn=1,o}(),jk="CoreUtils.doPerf";function Ry(o,s,c,h,d){if(o){var m=o;if(m[gy]&&(m=m[gy]()),m){var b=void 0,f=m[qd](jk);try{if(b=m.create(s(),h,d),b){if(f&&b[mo]&&(b[mo](Ly[Fk],f),f[qd]&&f[mo])){var A=f[qd](Ly[Yf]);A||(A=[],f[mo](Ly[Yf],A)),A[vn](b)}return m[mo](jk,b),c(b)}}catch(M){b&&b[mo]&&b[mo]("exception",M)}finally{b&&m.fire(b),m[mo](jk,f)}}}return c()}function uG(){return oG}function gu(){for(var o=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],s=dn,c,h=0;h<4;h++)c=qf(),s+=o[c&15]+o[c>>4&15]+o[c>>8&15]+o[c>>12&15]+o[c>>16&15]+o[c>>20&15]+o[c>>24&15]+o[c>>28&15];var d=o[8+(qf()&3)|0];return iu(s,0,8)+iu(s,9,4)+"4"+iu(s,13,3)+d+iu(s,16,3)+iu(s,19,12)}var Bk="00",lG="ff",LD="00000000000000000000000000000000",RD="0000000000000000";function Jf(o,s,c){return o&&o[Nt]===s&&o!==c?!!o.match(/^[\da-f]*$/i):!1}function ND(o,s,c){return Jf(o,s)?o:c}function cG(o){(isNaN(o)||o<0||o>255)&&(o=1);for(var s=o.toString(16);s[Nt]<2;)s="0"+s;return s}function OD(o,s,c,h){var d;return d={},d[sy]=Jf(h,2,lG)?h:Bk,d[YS]=Vk(o)?o:gu(),d[JS]=$k(s)?s:dS(gu(),16),d.traceFlags=c>=0&&c<=255?c:1,d}function Vk(o){return Jf(o,32,LD)}function $k(o){return Jf(o,16,RD)}function UD(o){if(o){var s=cG(o[QS]);Jf(s,2)||(s="01");var c=o[sy]||Bk;return c!=="00"&&c!=="ff"&&(c=Bk),"".concat(c.toLowerCase(),"-").concat(ND(o.traceId,32,LD).toLowerCase(),"-").concat(ND(o.spanId,16,RD).toLowerCase(),"-").concat(s.toLowerCase())}return""}function dG(o){var s=o.getElementsByTagName("script"),c=[];return rt(s,function(h){var d=h[ZS]("src");if(d){var m=h[ZS]("crossorigin"),b=h.hasAttribute("async")===!0,f=h.hasAttribute("defer")===!0,A=h[ZS]("referrerpolicy"),M={url:d};m&&(M.crossOrigin=m),b&&(M.async=b),f&&(M.defer=f),A&&(M.referrerPolicy=A),c[vn](M)}}),c}var pG=cD("plugin");function Ol(o){return pG.get(o,"state",{},!0)}function FD(o,s){for(var c=[],h=null,d=o[go](),m;d;){var b=d[Pf]();if(b){h&&h[Nf]&&b[yo]&&h[Nf](b),m=Ol(b);var f=!!m[fo];b[fo]&&(f=b[fo]()),f||c[vn](b),h=b,d=d[go]()}}rt(c,function(A){var M=o[Cr]();A[_f](o.getCfg(),M,s,o[go]()),m=Ol(A),!A[Cr]&&!m[Cr]&&(m[Cr]=M),m[fo]=!0,delete m[hs]})}function zk(o){return o.sort(function(s,c){var h=0;if(c){var d=c[yo];s[yo]?h=d?s[py]-c[py]:1:d&&(h=-1)}else h=s?1:-1;return h})}function hG(o){var s={};return{getName:function(){return s[ps]},setName:function(c){s[ps]=c},getTraceId:function(){return s[YS]},setTraceId:function(c){Vk(c)&&(s[YS]=c)},getSpanId:function(){return s[JS]},setSpanId:function(c){$k(c)&&(s[JS]=c)},getTraceFlags:function(){return s[QS]},setTraceFlags:function(c){s[QS]=c}}}var fG="TelemetryPluginChain",jD="_hasRun",BD="_getTelCtx",VD=0;function gG(o,s,c){for(;o;){if(o[Pf]()===c)return o;o=o[go]()}return Ul([c],s.config||{},s)}function Hk(o,s,c,h){var d=null,m=[];s||(s=Ca({},null,c[ur])),h!==null&&(d=h?gG(o,c,h):o);var b={_next:A,ctx:{core:function(){return c},diagLog:function(){return Ll(c,s.cfg)},getCfg:function(){return s.cfg},getExtCfg:D,getConfig:N,hasNext:function(){return!!d},getNext:function(){return d},setNext:function(L){d=L},iterate:F,onComplete:f}};function f(L,w){for(var U=[],G=2;G<arguments.length;G++)U[G-2]=arguments[G];L&&m[vn]({func:L,self:Yn(w)?b.ctx:w,args:U})}function A(){var L=d;if(d=L?L[go]():null,!L){var w=m;w&&w[Nt]>0&&(rt(w,function(U){try{U.func.call(U.self,U.args)}catch(G){je(c[ur],2,73,"Unexpected Exception during onComplete - "+it(G))}}),m=[])}return L}function M(L,w){var U=null,G=s.cfg;if(G&&L){var Z=G[Kd];!Z&&w&&(Z={}),G[Kd]=Z,Z=s.ref(G,Kd),Z&&(U=Z[L],!U&&w&&(U={}),Z[L]=U,U=s.ref(Z,L))}return U}function D(L,w){var U=M(L,!0);return w&&en(w,function(G,Z){if(_e(U[G])){var ie=s.cfg[G];(ie||!_e(ie))&&(U[G]=ie)}Ak(s,U,G,Z)}),s[Ud](U,w)}function N(L,w,U){U===void 0&&(U=!1);var G,Z=M(L,!1),ie=s.cfg;return Z&&(Z[w]||!_e(Z[w]))?G=Z[w]:(ie[w]||!_e(ie[w]))&&(G=ie[w]),G||!_e(G)?G:U}function F(L){for(var w;w=b._next();){var U=w[Pf]();U&&L(U)}}return b}function Ka(o,s,c,h){var d=Ca(s),m=Hk(o,d,c,h),b=m.ctx;function f(M){var D=m._next();return D&&D[yo](M,b),!D}function A(M,D){return M===void 0&&(M=null),Yt(M)&&(M=Ul(M,d.cfg,c,D)),Ka(M||b[go](),d.cfg,c,D)}return b[xi]=f,b[Cl]=A,b}function Ny(o,s,c){var h=Ca(s.config),d=Hk(o,h,s,c),m=d.ctx;function b(A){var M=d._next();return M&&M[cu](m,A),!M}function f(A,M){return A===void 0&&(A=null),Yt(A)&&(A=Ul(A,h.cfg,s,M)),Ny(A||m[go](),s,M)}return m[xi]=b,m[Cl]=f,m}function qk(o,s,c){var h=Ca(s.config),d=Hk(o,h,s,c),m=d.ctx;function b(A){return m.iterate(function(M){Bt(M[Rf])&&M[Rf](m,A)})}function f(A,M){return A===void 0&&(A=null),Yt(A)&&(A=Ul(A,h.cfg,s,M)),qk(A||m[go](),s,M)}return m[xi]=b,m[Cl]=f,m}function Ul(o,s,c,h){var d=null,m=!h;if(Yt(o)&&o[Nt]>0){var b=null;rt(o,function(f){if(!m&&h===f&&(m=!0),m&&f&&Bt(f[yo])){var A=mG(f,s,c);d||(d=A),b&&b._setNext(A),b=A}})}return h&&!d?Ul([h],s,c):d}function mG(o,s,c){var h=null,d=Bt(o[yo]),m=Bt(o[Nf]),b;o?b=o[lu]+"-"+o[py]+"-"+VD++:b="Unknown-0-"+VD++;var f={getPlugin:function(){return o},getNext:function(){return h},processTelemetry:D,unload:N,update:F,_id:b,_setNext:function(L){h=L}};function A(){var L;return o&&Bt(o[BD])&&(L=o[BD]()),L||(L=Ka(f,s,c)),L}function M(L,w,U,G,Z){var ie=!1,ge=o?o[lu]:fG,fe=L[jD];return fe||(fe=L[jD]={}),L.setNext(h),o&&Ry(L[Cr](),function(){return ge+":"+U},function(){fe[b]=!0;try{var Me=h?h._id:dn;Me&&(fe[Me]=!1),ie=w(L)}catch(re){var Te=h?fe[h._id]:!0;Te&&(ie=!0),(!h||!Te)&&je(L[fs](),1,73,"Plugin ["+ge+"] failed during "+U+" - "+it(re)+", run flags: "+it(fe))}},G,Z),ie}function D(L,w){w=w||A();function U(G){if(!o||!d)return!1;var Z=Ol(o);return Z[hs]||Z[sk]?!1:(m&&o[Nf](h),o[yo](L,G),!0)}M(w,U,"processTelemetry",function(){return{item:L}},!L.sync)||w[xi](L)}function N(L,w){function U(){var G=!1;if(o){var Z=Ol(o),ie=o[Cr]||Z[Cr];o&&(!ie||ie===L.core())&&!Z[hs]&&(Z[Cr]=null,Z[hs]=!0,Z[fo]=!1,o[hs]&&o[hs](L,w)===!0&&(G=!0))}return G}M(L,U,"unload",function(){},w[$d])||L[xi](w)}function F(L,w){function U(){var G=!1;if(o){var Z=Ol(o),ie=o[Cr]||Z[Cr];o&&(!ie||ie===L.core())&&!Z[hs]&&o[Rf]&&o[Rf](L,w)===!0&&(G=!0)}return G}M(L,U,"update",function(){},!1)||L[xi](w)}return us(f)}function $D(){var o=[];function s(h){h&&o[vn](h)}function c(h,d){rt(o,function(m){try{m(h,d)}catch(b){je(h[fs](),2,73,"Unexpected error calling unload handler - "+it(b))}}),o=[]}return{add:s,run:c}}function zD(){var o=[];function s(h){var d=o;o=[],rt(d,function(m){try{(m.rm||m.remove).call(m)}catch(b){je(h,2,73,"Unloading:"+it(b))}})}function c(h){h&&Rd(o,h)}return{run:s,add:c}}var Gk,mu="getPlugin",vG=(Gk={},Gk[Kd]={isVal:Pl,v:{}},Gk),tp=function(){function o(){var s=this,c,h,d,m,b;M(),Un(o,s,function(D){D[_f]=function(N,F,L,w){A(N,F,w),c=!0},D[hs]=function(N,F){var L,w=D[Cr];if(!w||N&&w!==N[Cr]())return;var U,G=!1,Z=N||Ny(null,w,d&&d[mu]?d[mu]():d),ie=F||(L={reason:0},L[$d]=!1,L);function ge(){G||(G=!0,m.run(Z,F),b.run(Z[fs]()),U===!0&&Z[xi](ie),M())}return!D[ly]||D[ly](Z,ie,ge)!==!0?ge():U=!0,U},D[Rf]=function(N,F){var L=D[Cr];if(!L||N&&L!==N[Cr]())return;var w,U=!1,G=N||qk(null,L,d&&d[mu]?d[mu]():d),Z=F||{reason:0};function ie(){U||(U=!0,A(G.getCfg(),G.core(),G[go]()))}return!D._doUpdate||D._doUpdate(G,Z,ie)!==!0?ie():w=!0,w},vy(D,"_addUnloadCb",function(){return m},"add"),vy(D,"_addHook",function(){return b},"add"),mn(D,"_unloadHooks",{g:function(){return b}})}),s[fs]=function(D){return f(D)[fs]()},s[fo]=function(){return c},s.setInitialized=function(D){c=D},s[Nf]=function(D){d=D},s[xi]=function(D,N){N?N[xi](D):d&&Bt(d[yo])&&d[yo](D,null)},s._getTelCtx=f;function f(D){D===void 0&&(D=null);var N=D;if(!N){var F=h||Ka(null,{},s[Cr]);d&&d[mu]?N=F[Cl](null,d[mu]):N=F[Cl](null,d)}return N}function A(D,N,F){Ca(D,vG,Ll(N)),!F&&N&&(F=N[I6]()[go]());var L=d;d&&d[mu]&&(L=d[mu]()),s[Cr]=N,h=Ka(F,D,N,L)}function M(){c=!1,s[Cr]=null,h=null,d=null,b=zD(),m=$D()}}return o.__ieDyn=1,o}();function yG(o,s,c){var h={id:s,fn:c};Rd(o,h);var d={remove:function(){rt(o,function(m,b){if(m.id===h.id)return o[Fd](b,1),-1})}};return d}function bG(o,s,c){for(var h=!1,d=o[Nt],m=0;m<d;++m){var b=o[m];if(b)try{if(b.fn[El](null,[s])===!1){h=!0;break}}catch(f){je(c,2,64,"Telemetry initializer failed: "+wn(f),{exception:it(f)},!0)}}return!h}var wG=function(o){ds(s,o);function s(){var c=o.call(this)||this;c.identifier="TelemetryInitializerPlugin",c.priority=199;var h,d;m(),Un(s,c,function(b,f){b.addTelemetryInitializer=function(A){return yG(d,h++,A)},b[yo]=function(A,M){bG(d,A,M?M[fs]():b[fs]())&&b[xi](A,M)},b[ly]=function(){m()}});function m(){h=0,d=[]}return c}return s.__ieDyn=1,s}(tp),vu,HD="Plugins must provide initialize method",xG="_notificationManager",qD="SDK is still unloading...",SG="SDK is not initialized",kG=100,TG=5e4,Kk=_d((vu={cookieCfg:{}},vu[Wd]={rdOnly:!0,ref:!0,v:[]},vu[_l]={rdOnly:!0,ref:!0,v:[]},vu[Kd]={ref:!0,v:{}},vu[ok]=vo,vu.loggingLevelConsole=0,vu.diagnosticLogInterval=vo,vu));function AG(o,s){return new sG(s)}function EG(o,s,c){var h,d=[],m=[],b={};return rt(c,function(f){(_e(f)||_e(f[_f]))&&ia(HD);var A=f[py],M=f[lu];f&&A&&(_e(b[A])?b[A]=M:Rl(o,"Two extensions have same priority #"+A+" - "+b[A]+", "+M)),!A||A<s?d[vn](f):m[vn](f)}),h={},h[Cr]=d,h[_l]=m,h}function GD(o,s){var c=!1;return rt(s,function(h){if(h===o)return c=!0,-1}),c}function Wk(o,s,c,h){c&&en(c,function(d,m){h&&bi(m)&&bi(s[d])&&Wk(o,s[d],m,h),h&&bi(m)&&bi(s[d])?Wk(o,s[d],m,h):o.set(s,d,m)})}function KD(o,s){var c=null,h=-1;return rt(o,function(d,m){if(d.w===s)return c=d,h=m,-1}),{i:h,l:c}}function CG(o,s){var c=KD(o,s).l;return c||(c={w:s,rm:function(){var h=KD(o,s);h.i!==-1&&o[Fd](h.i,1)}},o[vn](c)),c}function IG(o,s,c){rt(s,function(h){var d=lr(o,h.w,c);delete h.w,h.rm=function(){d.rm()}})}function MG(o,s,c,h){return s.add(o[uu](function(d){var m=d.cfg.disableDbgExt;m===!0&&h&&(c[ry](h),h=null),c&&!h&&m!==!0&&(h=qq(d.cfg),c[iy](h))})),h}function _G(o){return mn({rm:function(){o.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(o)+">"}})}var DG=function(){function o(){var s,c,h,d,m,b,f,A,M,D,N,F,L,w,U,G,Z,ie,ge,fe,Me,Te,re,Pe,ke,T,oe,ve,be,V,W,Se;Un(o,this,function(te){pe(),te._getDbgPlgTargets=function(){return[re,d]},te[fo]=function(){return c},te.activeStatus=function(){return T},te._setPendingStatus=function(){T=3},te[_f]=function(me,$e,ct,dt){L&&ia(qD),te[fo]()&&ia("Core cannot be initialized more than once"),s=Ca(me,Kk,ct||te[ur],!1),me=s.cfg,rr(s[uu](function($t){var de=$t.cfg,we=T===3;if(!we){ve=de.initInMemoMaxSize||kG;var De=de[C6],Ie=de.endpointUrl;if(_e(De)){Me=null,T=su[zS];var Ne="Please provide instrumentation key";c?(je(h,1,100,Ne),He()):ia(Ne);return}var Ce=[];if(as(De)?(Ce[vn](De),Me=null):Me=De,as(Ie)?(Ce[vn](Ie),oe=null):oe=Ie,Ce[Nt]){be=!1,T=3;var yt=Pl(de.initTimeOut)?de.initTimeOut:TG,Ut=qH(Ce);Aa(function(){be||Ue()},yt),ms(Ut,function(zt){try{if(be)return;if(!zt.rejected){var rn=zt[Df];if(rn&&rn[Nt]){var ut=rn[0];if(Me=ut&&ut[Df],rn[Nt]>1){var Ei=rn[1];oe=Ei&&Ei[Df]}}Me&&(me[C6]=Me,me.endpointUrl=oe)}Ue()}catch{be||Ue()}})}else Ue();var Ct=$t.ref($t.cfg,Kd);en(Ct,function(zt){$t.ref(Ct,zt)})}})),m=dt,ge=MG(s,ie,m&&te[ay](),ge),Ai(),te[ur]=ct;var at=me[Wd];if(D=[],D[vn].apply(D,T6(T6([],$e,!1),at)),N=me[_l],P(null),(!F||F[Nt]===0)&&ia("No "+_l+" available"),N&&N[Nt]>1){var Be=te[Pf]("TeeChannelController");(!Be||!Be.plugin)&&je(h,1,28,"TeeChannel required")}IG(me,Te,h),Te=null,c=!0,T===su.ACTIVE&&He()},te.getChannels=function(){var me=[];return F&&rt(F,function($e){me[vn]($e)}),us(me)},te.track=function(me){Ry(te[gy](),function(){return"AppInsightsCore:track"},function(){me===null&&(In(me),ia("Invalid telemetry item")),!me[ps]&&_e(me[ps])&&(In(me),ia("telemetry name required")),me[Lf]=me[Lf]||Me,me[Bd]=me[Bd]||Xd(new Date),me.ver=me.ver||"4.0",!L&&te[fo]()&&T===su.ACTIVE?Q()[xi](me):T!==su[zS]&&d[Nt]<=ve&&d[vn](me)},function(){return{item:me}},!me.sync)},te[I6]=Q,te[ay]=function(){return m||(m=new aG(s.cfg),te[xG]=m),m},te[iy]=function(me){te.getNotifyMgr()[iy](me)},te[ry]=function(me){m&&m[ry](me)},te.getCookieMgr=function(){return A||(A=Py(s.cfg,te[ur])),A},te.setCookieMgr=function(me){A!==me&&(Jd(A,!1),A=me)},te[gy]=function(){return b||f||uG()},te.setPerfMgr=function(me){b=me},te.eventCnt=function(){return d[Nt]},te.releaseQueue=function(){if(c&&d[Nt]>0){var me=d;d=[],T===2?rt(me,function($e){$e[Lf]=$e[Lf]||Me,Q()[xi]($e)}):je(h,2,20,"core init status is not active")}},te[M6]=function(me){return U=me||null,Se=!1,V&&V[jd](),mt(!0)};function Ue(){be=!0,_e(Me)?(T=su[zS],je(h,1,112,"ikey can't be resolved from promises")):T=su.ACTIVE,He()}function He(){c&&(te.releaseQueue(),te[M6]())}function mt(me){if((!V||!V[Vd])&&!Se){var $e=me||h&&h.queue[Nt]>0;$e&&(W||(W=!0,rr(s[uu](function(ct){var dt=ct.cfg.diagnosticLogInterval;(!dt||!(dt>0))&&(dt=1e4);var at=!1;V&&(at=V[Vd],V[jd]()),V=TH(Ot,dt),V.unref(),V[Vd]=at}))),V[Vd]=!0)}return V}te[_6]=function(){Se=!0,V&&V[jd](),Ot()},Bf(te,function(){return w},["addTelemetryInitializer"]),te[cu]=function(me,$e,ct){var dt;me===void 0&&(me=!0),c||ia(SG),L&&ia(qD);var at=(dt={reason:50},dt[$d]=me,dt.flushComplete=!1,dt),Be;me&&!$e&&(Be=du(function(we){$e=we}));var $t=Ny(ft(),te);$t[oy](function(){ie.run(te[ur]),gD([A,m,h],me,function(){pe(),$e&&$e(at)})},te);function de(we){at.flushComplete=we,L=!0,Z.run($t,at),te[_6](),$t[xi](at)}return Ot(),sn(me,de,6,ct),Be},te[Pf]=Re,te.addPlugin=function(me,$e,ct,dt){if(!me){dt&&dt(!1),Ee(HD);return}var at=Re(me[lu]);if(at&&!$e){dt&&dt(!1),Ee("Plugin ["+me[lu]+"] is already loaded!");return}var Be={reason:16};function $t(De){D[vn](me),Be.added=[me],P(Be),dt&&dt(!0)}if(at){var de=[at.plugin],we={reason:2,isAsync:!!ct};Mt(de,we,function(De){De?(Be.removed=de,Be.reason|=32,$t()):dt&&dt(!1)})}else $t()},te.updateCfg=function(me,$e){$e===void 0&&($e=!0);var ct;if(te[fo]()){ct={reason:1,cfg:s.cfg,oldCfg:d6({},s.cfg),newConfig:d6({},me),merge:$e},me=ct.newConfig;var dt=s.cfg;me[Wd]=dt[Wd],me[_l]=dt[_l]}s._block(function(at){var Be=at.cfg;Wk(at,Be,me,$e),$e||en(Be,function($t){ru(me,$t)||at.set(Be,$t,vo)}),at[Ud](Be,Kk)},!0),s[ty](),ct&&oi(ct)},te.evtNamespace=function(){return G},te.flush=sn,te.getTraceCtx=function(me){return fe||(fe=hG()),fe},te.setTraceCtx=function(me){fe=me||null},te.addUnloadHook=rr,vy(te,"addUnloadCb",function(){return Z},"add"),te.onCfgChange=function(me){var $e;return c?$e=lr(s.cfg,me,te[ur]):$e=CG(Te,me),_G($e)},te.getWParam=function(){return e6()||s.cfg.enableWParam?0:-1};function X(){var me={};Pe=[];var $e=function(ct){ct&&rt(ct,function(dt){if(dt[lu]&&dt[sy]&&!me[dt.identifier]){var at=dt[lu]+"="+dt[sy];Pe[vn](at),me[dt.identifier]=dt}})};$e(F),N&&rt(N,function(ct){$e(ct)}),$e(D)}function pe(){c=!1,s=Ca({},Kk,te[ur]),s.cfg[D6]=1,mn(te,"config",{g:function(){return s.cfg},s:function($e){te.updateCfg($e,!1)}}),mn(te,"pluginVersionStringArr",{g:function(){return Pe||X(),Pe}}),mn(te,"pluginVersionString",{g:function(){return ke||(Pe||X(),ke=Pe.join(";")),ke||dn}}),mn(te,"logger",{g:function(){return h||(h=new Iy(s.cfg),s[ur]=h),h},s:function($e){s[ur]=$e,h!==$e&&(Jd(h,!1),h=$e)}}),te[ur]=new Iy(s.cfg),re=[];var me=te.config[Wd]||[];me.splice(0,me[Nt]),Rd(me,re),w=new wG,d=[],Jd(m,!1),m=null,b=null,f=null,Jd(A,!1),A=null,M=null,D=[],N=null,F=null,L=!1,U=null,G=Ea("AIBaseCore",!0),Z=$D(),fe=null,Me=null,ie=zD(),Te=[],ke=null,Pe=null,Se=!1,V=null,W=!1,T=0,oe=null,ve=null,be=!1}function Q(){var me=Ka(ft(),s.cfg,te);return me[oy](mt),me}function P(me){var $e=EG(te[ur],Bq,D);M=null,ke=null,Pe=null,F=(N||[])[0]||[],F=zk(Rd(F,$e[_l]));var ct=Rd(zk($e[Cr]),F);re=us(ct);var dt=te.config[Wd]||[];dt.splice(0,dt[Nt]),Rd(dt,re);var at=Q();F&&F[Nt]>0&&FD(at[Cl](F),ct),FD(at,ct),me&&oi(me)}function Re(me){var $e=null,ct=null,dt=[];return rt(re,function(at){if(at[lu]===me&&at!==w)return ct=at,-1;at.getChannel&&dt[vn](at)}),!ct&&dt[Nt]>0&&rt(dt,function(at){if(ct=at.getChannel(me),!ct)return-1}),ct&&($e={plugin:ct,setEnabled:function(at){Ol(ct)[sk]=!at},isEnabled:function(){var at=Ol(ct);return!at[hs]&&!at[sk]},remove:function(at,Be){var $t;at===void 0&&(at=!0);var de=[ct],we=($t={reason:1},$t[$d]=at,$t);Mt(de,we,function(De){De&&P({reason:32,removed:de}),Be&&Be(De)})}}),$e}function ft(){if(!M){var me=(re||[]).slice();ni(me,w)===-1&&me[vn](w),M=Ul(zk(me),s.cfg,te)}return M}function Mt(me,$e,ct){if(me&&me[Nt]>0){var dt=Ul(me,s.cfg,te),at=Ny(dt,te);at[oy](function(){var Be=!1,$t=[];rt(D,function(we,De){GD(we,me)?Be=!0:$t[vn](we)}),D=$t,ke=null,Pe=null;var de=[];N&&(rt(N,function(we,De){var Ie=[];rt(we,function(Ne){GD(Ne,me)?Be=!0:Ie[vn](Ne)}),de[vn](Ie)}),N=de),ct&&ct(Be),mt()}),at[xi]($e)}else ct(!1)}function Ot(){if(h&&h.queue){var me=h.queue.slice(0);h.queue[Nt]=0,rt(me,function($e){var ct,dt=(ct={},ct[ps]=U||"InternalMessageId: "+$e[uy],ct[Lf]=Me,ct[Bd]=Xd(new Date),ct.baseType=Xf.dataType,ct.baseData={message:$e[Il]},ct);te.track(dt)})}}function sn(me,$e,ct,dt){var at=1,Be=!1,$t=null;dt=dt||5e3;function de(){at--,Be&&at===0&&($t&&$t[jd](),$t=null,$e&&$e(Be),$e=null)}if(F&&F[Nt]>0){var we=Q()[Cl](F);we.iterate(function(De){if(De.flush){at++;var Ie=!1;De.flush(me,function(){Ie=!0,de()},ct)||Ie||(me&&$t==null?$t=Aa(function(){$t=null,de()},dt):de())}})}return Be=!0,de(),!0}function Ai(){var me;rr(s[uu](function($e){var ct=$e.cfg.enablePerfMgr;if(ct){var dt=$e.cfg[ok];me!==dt&&(dt||(dt=AG),Si($e.cfg,ok,dt),me=dt,f=null),!b&&!f&&Bt(dt)&&(f=dt(te,te[ay]()))}else f=null,me=null}))}function oi(me){var $e=qk(ft(),te);$e[oy](mt),(!te._updateHook||te._updateHook($e,me)!==!0)&&$e[xi](me)}function Ee(me){var $e=te[ur];$e?(je($e,2,73,me),mt()):ia(me)}function In(me){var $e=te[ay]();$e&&$e[jf]([me],2)}function rr(me){ie.add(me)}})}return o.__ieDyn=1,o}();function Xk(o,s){try{if(o&&o!==""){var c=qa().parse(o);if(c&&c[O6]&&c[O6]>=c.itemsAccepted&&c.itemsReceived-c.itemsAccepted===c.errors[Nt])return c}}catch(h){je(s,1,43,"Cannot parse the response. "+(h[ps]||it(h)),{response:o})}return null}var xo="",PG="NoResponseBody",WD="&"+PG+"=true",Yk="POST",LG=function(){function o(){var s=0,c,h,d,m,b,f,A,M,D,N,F,L,w,U;Un(o,this,function(G,Z){var ie=!0;be(),G[_f]=function(V,W){d=W,h&&je(d,1,28,"Sender is already initialized"),G.SetConfig(V),h=!0},G._getDbgPlgTargets=function(){return[h,m,f,c]},G.SetConfig=function(V){try{if(b=V.senderOnCompleteCallBack||{},f=!!V.disableCredentials,A=V.fetchCredentials,m=!!V.isOneDs,c=!!V.enableSendPromise,D=!!V.disableXhr,N=!!V.disableBeacon,F=!!V.disableBeaconSync,U=V.timeWrapper,w=!!V.addNoResponse,L=!!V.disableFetchKeepAlive,M={sendPOST:T},m||(ie=!1),f){var W=bo();W&&W.protocol&&W.protocol[Od]()==="file:"&&(ie=!1)}return!0}catch{}return!1},G.getSyncFetchPayload=function(){return s},G.getSenderInst=function(V,W){return V&&V[Nt]?Te(V,W):null},G.getFallbackInst=function(){return M},G[ly]=function(V,W){be()};function ge(V,W){re(W,200,{},V)}function fe(V,W){je(d,2,26,"Failed to send telemetry.",{message:V}),re(W,400,{})}function Me(V){fe("No endpoint url is provided for the batch",V)}function Te(V,W){for(var Se,te=0,Ue=null,He=0;Ue==null&&He<V[Nt];)te=V[He],!D&&te===1?bq()?Ue=ve:wy()&&(Ue=T):te===2&&Sk(W)&&(!W||!L)?Ue=oe:te===3&&$f()&&(W?!F:!N)&&(Ue=ke),He++;return Ue?(Se={_transport:te,_isSync:W},Se[U6]=Ue,Se):null}function re(V,W,Se,te){try{V&&V(W,Se,te)}catch{}}function Pe(V,W){var Se=co(),te=V[Uf];if(!te)return Me(W),!0;te=V[Uf]+(w?WD:xo);var Ue=V[Hd],He=m?Ue:new Blob([Ue],{type:"text/plain;charset=UTF-8"}),mt=Se.sendBeacon(te,He);return mt}function ke(V,W,Se){var te=V[Hd];try{if(te)if(Pe(V,W))ge(xo,W);else{var Ue=b&&b.beaconOnRetry;Ue&&Bt(Ue)?Ue(V,W,Pe):(M&&M[U6](V,W,!0),je(d,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(He){m&&Rl(d,"Failed to send telemetry using sendBeacon API. Ex:"+it(He)),re(W,m?0:400,{},xo)}}function T(V,W,Se){var te,Ue,He,mt=V[XS]||{};!Se&&c&&(te=du(function(P,Re){Ue=P,He=Re})),m&&Se&&V.disableXhrSync&&(Se=!1);var X=V[Uf];if(!X){Me(W),Ue&&Ue(!1);return}var pe=rq(Yk,X,ie,!0,Se,V[Gd]);m||pe[F6]("Content-type","application/json"),rt(ss(mt),function(P){pe[F6](P,mt[P])}),pe.onreadystatechange=function(){m||(Q(pe),pe.readyState===4&&Ue&&Ue(!0))},pe.onload=function(){m&&Q(pe)};function Q(P){var Re=b&&b.xhrOnComplete,ft=Re&&Bt(Re);if(ft)Re(P,W,V);else{var Mt=yy(P);re(W,P[Of],gk(P,m),Mt)}}return pe.onerror=function(P){re(W,m?pe[Of]:400,gk(pe,m),m?xo:by(pe)),He&&He(P)},pe.ontimeout=function(){re(W,m?pe[Of]:500,gk(pe,m),m?xo:by(pe)),Ue&&Ue(!1)},pe.send(V[Hd]),te}function oe(V,W,Se){var te,Ue=V[Uf],He=V[Hd],mt=m?He:new Blob([He],{type:"application/json"}),X,pe,Q,P=new Headers,Re=He[Nt],ft=!1,Mt=!1,Ot=V[XS]||{},sn=(te={method:Yk,body:mt},te[mD]=!0,te);V.headers&&ss(V.headers)[Nt]>0&&(rt(ss(Ot),function(In){P.append(In,Ot[In])}),sn[XS]=P),A?sn.credentials=A:ie&&m&&(sn.credentials="include"),Se&&(sn.keepalive=!0,s+=Re,m?V._sendReason===2&&(ft=!0,w&&(Ue+=WD)):ft=!0);var Ai=new Request(Ue,sn);try{Ai[mD]=!0}catch{}if(!Se&&c&&(X=du(function(In,rr){pe=In,Q=rr})),!Ue){Me(W),pe&&pe(!1);return}function oi(In){re(W,m?0:400,{},m?xo:In)}function Ee(In,rr,me){var $e=In[Of],ct=b.fetchOnComplete;ct&&Bt(ct)?ct(In,W,me||xo,rr):re(W,$e,{},me||xo)}try{ms(fetch(m?Ue:Ai,m?sn:null),function(In){if(Se&&(s-=Re,Re=0),!Mt)if(Mt=!0,In.rejected)oi(In.reason&&In.reason[Il]),Q&&Q(In.reason);else{var rr=In[Df];try{!m&&!rr.ok?(oi(rr.statusText),pe&&pe(!1)):m&&!rr.body?(Ee(rr,null,xo),pe&&pe(!0)):ms(rr.text(),function(me){Ee(rr,V,me[Df]),pe&&pe(!0)})}catch(me){oi(it(me)),Q&&Q(me)}}})}catch(In){Mt||(oi(it(In)),Q&&Q(In))}return ft&&!Mt&&(Mt=!0,re(W,200,{}),pe&&pe(!0)),m&&!Mt&&V[Gd]>0&&U&&U.set(function(){Mt||(Mt=!0,re(W,500,{}),pe&&pe(!0))},V[Gd]),X}function ve(V,W,Se){var te=aa(),Ue=new XDomainRequest,He=V[Hd];Ue.onload=function(){var P=yy(Ue),Re=b&&b.xdrOnComplete;Re&&Bt(Re)?Re(Ue,W,V):re(W,200,{},P)},Ue.onerror=function(){re(W,400,{},m?xo:J6(Ue))},Ue.ontimeout=function(){re(W,500,{})},Ue.onprogress=function(){};var mt=te&&te.location&&te.location[P6]||"",X=V[Uf];if(!X){Me(W);return}if(!m&&X.lastIndexOf(mt,0)!==0){var pe="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";je(d,2,40,". "+pe),fe(pe,W);return}var Q=m?X:X[Ml](/^(https?:)/,"");Ue.open(Yk,Q),V[Gd]&&(Ue[Gd]=V[Gd]),Ue.send(He),m&&Se?U&&U.set(function(){Ue.send(He)},0):Ue.send(He)}function be(){s=0,h=!1,c=!1,d=null,m=null,b=null,f=null,A=null,M=null,D=!1,N=!1,F=!1,L=!1,w=!1,U=null}})}return o.__ieDyn=1,o}(),XD="on",YD="attachEvent",JD="addEventListener",QD="detachEvent",ZD="removeEventListener",Jk="events",Qk="visibilitychange",Oy="pagehide",eP="unload",tP="beforeunload",nP=Ea("aiEvtPageHide");Ea("aiEvtPageShow");var RG=/\.[\.]+/g,NG=/[\.]+$/,OG=1,Uy=cD("events"),UG=/^([^.]*)(?:\.(.+)|)/;function rP(o){return o&&o[Ml]?o[Ml](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,dn):o}function Zk(o,s){var c;if(s){var h=dn;Yt(s)?(h=dn,rt(s,function(m){m=rP(m),m&&(m[0]!=="."&&(m="."+m),h+=m)})):h=rP(s),h&&(h[0]!=="."&&(h="."+h),o=(o||dn)+h)}var d=UG.exec(o||dn)||[];return c={},c[gs]=d[1],c.ns=(d[2]||dn).replace(RG,".").replace(NG,dn)[zd](".").sort().join("."),c}function iP(o,s,c){c===void 0&&(c=!0);var h=Uy.get(o,Jk,{},c),d=h[s];return d||(d=h[s]=[]),d}function aP(o,s,c,h){o&&s&&s[gs]&&(o[ZD]?o[ZD](s[gs],c,h):o[QD]&&o[QD](XD+s[gs],c))}function FG(o,s,c,h){var d=!1;return o&&s&&s[gs]&&c&&(o[JD]?(o[JD](s[gs],c,h),d=!0):o[YD]&&(o[YD](XD+s[gs],c),d=!0)),d}function oP(o,s,c,h){for(var d=s[Nt];d--;){var m=s[d];m&&(!c.ns||c.ns===m.evtName.ns)&&(!h||h(m))&&(aP(o,m.evtName,m[GS],m.capture),s[Fd](d,1))}}function jG(o,s,c){if(s[gs])oP(o,iP(o,s[gs]),s,c);else{var h=Uy.get(o,Jk,{});en(h,function(d,m){oP(o,m,s,c)}),ss(h)[Nt]===0&&Uy.kill(o,Jk)}}function yu(o,s){var c;return s?(Yt(s)?c=[o].concat(s):c=[o,s],c=Zk("xx",c).ns[zd](".")):c=o,c}function vs(o,s,c,h,d){var m;d===void 0&&(d=!1);var b=!1;if(o)try{var f=Zk(s,h);if(b=FG(o,f,c,d),b&&Uy.accept(o)){var A=(m={guid:OG++,evtName:f},m[GS]=c,m.capture=d,m);iP(o,f.type)[vn](A)}}catch{}return b}function np(o,s,c,h,d){if(d===void 0&&(d=!1),o)try{var m=Zk(s,h),b=!1;jG(o,m,function(f){return m.ns&&!c||f[GS]===c?(b=!0,!0):!1}),b||aP(o,m,c,d)}catch{}}function BG(o,s,c){var h=!1,d=aa();d&&(h=vs(d,o,s,c),h=vs(d.body,o,s,c)||h);var m=qr();return m&&(h=vs(m,o,s,c)||h),h}function VG(o,s,c){var h=aa();h&&(np(h,o,s,c),np(h.body,o,s,c));var d=qr();d&&np(d,o,s,c)}function Fy(o,s,c,h){var d=!1;return s&&o&&o[Nt]>0&&rt(o,function(m){m&&(!c||ni(c,m)===-1)&&(d=BG(m,s,h)||d)}),d}function $G(o,s,c,h){var d=!1;return s&&o&&Yt(o)&&(d=Fy(o,s,c,h),!d&&c&&c[Nt]>0&&(d=Fy(o,s,null,h))),d}function eT(o,s,c){o&&Yt(o)&&rt(o,function(h){h&&VG(h,s,c)})}function zG(o,s,c){return $G([tP,eP,Oy],o,s,c)}function HG(o,s){eT([tP,eP,Oy],o,s)}function tT(o,s,c){function h(b){var f=qr();o&&f&&f.visibilityState==="hidden"&&o(b)}var d=yu(nP,c),m=Fy([Oy],o,s,d);return(!s||ni(s,Qk)===-1)&&(m=Fy([Qk],h,s,d)||m),!m&&s&&(m=tT(o,null,c)),m}function qG(o,s){var c=yu(nP,s);eT([Oy],o,c),eT([Qk],null,c)}var sP="_aiHooks",uP=["req","rsp","hkErr","fnErr"];function nT(o,s){if(o)for(var c=0;c<o[Nt]&&!s(o[c],c);c++);}function rT(o,s,c,h,d){d>=0&&d<=2&&nT(o,function(m,b){var f=m.cbks,A=f[uP[d]];if(A){s.ctx=function(){var N=h[b]=h[b]||{};return N};try{A[El](s.inst,c)}catch(N){var M=s.err;try{var D=f[uP[2]];D&&(s.err=N,D[El](s.inst,c))}catch{}finally{s.err=M}}}})}function GG(o){return function(){var s,c=this,h=arguments,d=o.h,m=(s={},s[ps]=o.n,s.inst=c,s.ctx=null,s.set=M,s),b=[],f=A([m],h);m.evt=Jn("event");function A(N,F){return nT(F,function(L){N[vn](L)}),N}function M(N,F){h=A([],h),h[N]=F,f=A([m],h)}rT(d,m,f,b,0);var D=o.f;if(D)try{m.rslt=D[El](c,h)}catch(N){throw m.err=N,rT(d,m,f,b,3),N}return rT(d,m,f,b,1),m.rslt}}function iT(o,s,c,h){var d=null;return o&&(Sa(o,s)?d=o:c&&(d=iT(QH(o),s,h,!1))),d}function KG(o,s,c){return o?aT(o[ho],s,c,!1):null}function lP(o,s,c,h){var d=c&&c[sP];if(!d){d={i:0,n:s,f:c,h:[]};var m=GG(d);m[sP]=d,o[s]=m}var b={id:d.i,cbks:h,rm:function(){var f=this.id;nT(d.h,function(A,M){if(A.id===f)return d.h[Fd](M,1),1})}};return d.i++,d.h[vn](b),b}function aT(o,s,c,h,d){if(h===void 0&&(h=!0),o&&s&&c){var m=iT(o,s,h,d);if(m){var b=m[s];if(typeof b===x6)return lP(m,s,b,c)}}return null}function jy(o,s,c,h,d){if(o&&s&&c){var m=iT(o,s,h,d)||o;if(m)return lP(m,s,m[s],c)}return null}var By="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",cP="sampleRate",oT="ProcessLegacy",dP="http.method",sT="https://dc.services.visualstudio.com",rp="/v2/track",So="not_specified",uT="iKey",Mn=RH({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]}),ip="split",qt="length",Qf="toLowerCase",Fl="ingestionendpoint",ap="toString",Vy="push",lT="removeItem",Wa="name",bu="message",op="count",cT="preTriggerDate",dT="disabled",pT="interval",pP="daysOfMonth",hT="date",fT="getUTCDate",$y="stringify",gT="pathname",hP="correlationHeaderExcludePatterns",sp="exceptions",Xa="parsedStack",ko="properties",ys="measurements",up="sizeInBytes",bs="typeName",Zf="severityLevel",mT="problemGroup",vT="isManual",fP="CreateFromInterface",lp="assembly",jl="fileName",zy="hasFullStack",Hy="level",cp="method",eg="line",qy="duration",gP="receivedResponse";function mP(o,s,c){var h=s[qt],d=WG(o,s);if(d[qt]!==h){for(var m=0,b=d;c[b]!==void 0;)m++,b=lo(d,0,147)+JG(m);d=b}return d}function WG(o,s){var c;return s&&(s=fr(Bi(s)),s[qt]>150&&(c=lo(s,0,150),je(o,2,57,"name is too long.  It has been truncated to 150 characters.",{name:s},!0))),c||s}function mr(o,s,c){c===void 0&&(c=1024);var h;return s&&(c=c||1024,s=fr(Bi(s)),s[qt]>c&&(h=lo(s,0,c),je(o,2,61,"string value is too long. It has been truncated to "+c+" characters.",{value:s},!0))),h||s}function Gy(o,s){return yP(o,s,2048,66)}function vP(o,s){var c;return s&&s[qt]>32768&&(c=lo(s,0,32768),je(o,2,56,"message is too long, it has been truncated to 32768 characters.",{message:s},!0)),c||s}function XG(o,s){var c;if(s){var h=""+s;h[qt]>32768&&(c=lo(h,0,32768),je(o,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:s},!0))}return c||s}function Bl(o,s){if(s){var c={};en(s,function(h,d){if(ji(d)&&Vf())try{d=qa()[$y](d)}catch(m){je(o,2,49,"custom property is not valid",{exception:m},!0)}d=mr(o,d,8192),h=mP(o,h,c),c[h]=d}),s=c}return s}function Vl(o,s){if(s){var c={};en(s,function(h,d){h=mP(o,h,c),c[h]=d}),s=c}return s}function YG(o,s){return s&&yP(o,s,128,69)[ap]()}function yP(o,s,c,h){var d;return s&&(s=fr(Bi(s)),s[qt]>c&&(d=lo(s,0,c),je(o,2,h,"input is too long, it has been truncated to "+c+" characters.",{data:s},!0))),d||s}function JG(o){var s="00"+o;return iu(s,s[qt]-3)}var bP=qr()||{},wP=0,QG=[null,null,null,null,null];function yT(o){var s=wP,c=QG,h=c[s];return bP.createElement?c[s]||(h=c[s]=bP.createElement("a")):h={host:tK(o)},h.href=o,s++,s>=c[qt]&&(s=0),wP=s,h}function ZG(o){var s,c=yT(o);return c&&(s=c.href),s}function eK(o,s){return o?o.toUpperCase()+" "+s:s}function tK(o,s){var c=xP(o)||"";if(c){var h=c.match(/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(h!=null&&h[qt]>3&&Dt(h[2])&&h[2][qt]>0)return h[2]+(h[3]||"")}return c}function xP(o,s){var c=null;if(o){var h=o.match(/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(h!=null&&h[qt]>2&&Dt(h[2])&&h[2][qt]>0&&(c=h[2]||"",h[qt]>2)){var d=(h[1]||"")[Qf](),m=h[3]||"";(d==="http"&&m===":80"||d==="https"&&m===":443")&&(m=""),c+=m}}return c}var nK=[sT+rp,"https://breeze.aimon.applicationinsights.io"+rp,"https://dc-int.services.visualstudio.com"+rp],rK="cid-v1:";function bT(o){return ni(nK,o[Qf]())!==-1}function SP(o,s,c){if(!s||o&&o.disableCorrelationHeaders)return!1;if(o&&o[hP]){for(var h=0;h<o.correlationHeaderExcludePatterns[qt];h++)if(o[hP][h].test(s))return!1}var d=yT(s).host[Qf]();if(d&&(Vi(d,":443")!==-1||Vi(d,":80")!==-1)&&(d=(xP(s)||"")[Qf]()),(!o||!o.enableCorsCorrelation)&&d&&d!==c)return!1;var m=o&&o.correlationHeaderDomains;if(m){var b;if(rt(m,function(M){var D=new RegExp(M.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));b=b||D.test(d)}),!b)return!1}var f=o&&o.correlationHeaderExcludedDomains;if(!f||f[qt]===0)return!0;for(var h=0;h<f[qt];h++){var A=new RegExp(f[h].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(A.test(d))return!1}return d&&d[qt]>0}function kP(o){if(o){var s=iK(o,Mn[1]);if(s&&s!==rK)return s}}function iK(o,s){if(o)for(var c=o[ip](","),h=0;h<c[qt];++h){var d=c[h][ip]("=");if(d[qt]===2&&d[0]===s)return d[1]}}function aK(o,s,c,h){var d,m=h,b=h;if(s&&s[qt]>0){var f=yT(s);if(d=f.host,!m)if(f[gT]!=null){var A=f.pathname[qt]===0?"/":f[gT];A.charAt(0)!=="/"&&(A="/"+A),b=f[gT],m=mr(o,c?c+" "+A:A)}else m=mr(o,s)}else d=h,m=h;return{target:d,name:m,data:b}}function Ky(){var o=ls();if(o&&o.now&&o.timing){var s=o.now()+o.timing.navigationStart;if(s>0)return s}return po()}function $i(o,s){var c=null;return o!==0&&s!==0&&!_e(o)&&!_e(s)&&(c=s-o),c}function wT(o,s){var c=o||{};return{getName:function(){return c[Wa]},setName:function(h){s&&s.setName(h),c[Wa]=h},getTraceId:function(){return c.traceID},setTraceId:function(h){s&&s.setTraceId(h),Vk(h)&&(c.traceID=h)},getSpanId:function(){return c.parentID},setSpanId:function(h){s&&s.setSpanId(h),$k(h)&&(c.parentID=h)},getTraceFlags:function(){return c.traceFlags},setTraceFlags:function(h){s&&s.setTraceFlags(h),c.traceFlags=h}}}var tg=A6({LocalStorage:0,SessionStorage:1}),wu=void 0,xu=void 0,TP="";function xT(){return Xy()?Wy(tg.LocalStorage):null}function Wy(o){try{if(_e(Ta()))return null;var s=new Date()[ap](),c=Jn(o===tg.LocalStorage?"localStorage":"sessionStorage"),h=TP+s;c.setItem(h,s);var d=c.getItem(h)!==s;if(c[lT](h),!d)return c}catch{}return null}function ST(){return ng()?Wy(tg.SessionStorage):null}function oK(){wu=!1,xu=!1}function kT(o){TP=o||""}function sK(){wu=Xy(!0),xu=ng(!0)}function Xy(o){return(o||wu===void 0)&&(wu=!!Wy(tg.LocalStorage)),wu}function AP(o,s){var c=xT();if(c!==null)try{return c.getItem(s)}catch(h){wu=!1,je(o,2,1,"Browser failed read of local storage. "+wn(h),{exception:it(h)})}return null}function EP(o,s,c){var h=xT();if(h!==null)try{return h.setItem(s,c),!0}catch(d){wu=!1,je(o,2,3,"Browser failed write to local storage. "+wn(d),{exception:it(d)})}return!1}function uK(o,s){var c=xT();if(c!==null)try{return c[lT](s),!0}catch(h){wu=!1,je(o,2,5,"Browser failed removal of local storage item. "+wn(h),{exception:it(h)})}return!1}function ng(o){return(o||xu===void 0)&&(xu=!!Wy(tg.SessionStorage)),xu}function TT(o,s){var c=ST();if(c!==null)try{return c.getItem(s)}catch(h){xu=!1,je(o,2,2,"Browser failed read of session storage. "+wn(h),{exception:it(h)})}return null}function CP(o,s,c){var h=ST();if(h!==null)try{return h.setItem(s,c),!0}catch(d){xu=!1,je(o,2,4,"Browser failed write to session storage. "+wn(d),{exception:it(d)})}return!1}function IP(o,s){var c=ST();if(c!==null)try{return c[lT](s),!0}catch(h){xu=!1,je(o,2,6,"Browser failed removal of session storage item. "+wn(h),{exception:it(h)})}return!1}var lK="appInsightsThrottle",cK=function(){function o(s,c){var h=this,d,m,b,f,A,M,D,N=!1,F=!1;w(),h._getDbgPlgTargets=function(){return[D]},h.getConfig=function(){return b},h.canThrottle=function(V){var W=oe(V),Se=U(V);return ie(Se,d,W)},h.isTriggered=function(V){return ve(V)},h.isReady=function(){return N},h.flush=function(V){try{var W=be(V);if(W&&W[qt]>0){var Se=W.slice(0);return D[V]=[],rt(Se,function(te){L(te.msgID,te[bu],te.severity,!1)}),!0}}catch{}return!1},h.flushAll=function(){try{if(D){var V=!0;return en(D,function(W){var Se=h.flush(parseInt(W));V=V&&Se}),V}}catch{}return!1},h.onReadyState=function(V,W){return W===void 0&&(W=!0),N=_e(V)?!0:V,N&&W?h.flushAll():null},h.sendMessage=function(V,W,Se){return L(V,W,Se,!0)};function L(V,W,Se,te){if(N){var Ue=T(V);if(!Ue)return;var He=U(V),mt=oe(V),X=ie(He,d,mt),pe=!1,Q=0,P=ve(V);try{X&&!P?(Q=Math.min(He.limit.maxSendNumber,mt[op]+1),mt[op]=0,pe=!0,A[V]=!0,mt[cT]=new Date):(A[V]=X,mt[op]+=1);var Re=ge(V);re(m,Re,mt);for(var ft=0;ft<Q;ft++)ke(V,m,W,Se)}catch{}return{isThrottled:pe,throttleNum:Q}}else if(te){var Mt=be(V);Mt[Vy]({msgID:V,message:W,severity:Se})}return null}function w(){m=Ll(s),A={},f={},D={},b={},G(109),M=Pl(c)?c:"",s.addUnloadHook(lr(s.config,function(V){var W=V.cfg;d=Xy();var Se=W.throttleMgrCfg||{};en(Se,function(te,Ue){G(parseInt(te),Ue)})}))}function U(V){return b[V]||b[109]}function G(V,W){var Se,te;try{var Ue=W||{},He={};He[dT]=!!Ue[dT];var mt=Ue[pT]||{};F=mt?.daysOfMonth&&mt?.daysOfMonth[qt]>0,He[pT]=Z(mt);var X={samplingRate:((Se=Ue.limit)===null||Se===void 0?void 0:Se.samplingRate)||100,maxSendNumber:((te=Ue.limit)===null||te===void 0?void 0:te.maxSendNumber)||1};He.limit=X,b[V]=He}catch{}}function Z(V){V=V||{};var W=V?.monthInterval,Se=V?.dayInterval;return _e(W)&&_e(Se)&&(V.monthInterval=3,F||(V[pP]=[28],F=!0)),V={monthInterval:V?.monthInterval,dayInterval:V?.dayInterval,daysOfMonth:V?.daysOfMonth},V}function ie(V,W,Se){if(V&&!V[dT]&&W&&Pl(Se)){var te=Te(),Ue=Se[hT],He=V[pT],mt=1;if(He!=null&&He.monthInterval){var X=(te.getUTCFullYear()-Ue.getUTCFullYear())*12+te.getUTCMonth()-Ue.getUTCMonth();mt=Pe(He.monthInterval,0,X)}var pe=1;if(F)pe=ni(He[pP],te[fT]());else if(He!=null&&He.dayInterval){var Q=Math.floor((te.getTime()-Ue.getTime())/864e5);pe=Pe(He.dayInterval,0,Q)}return mt>=0&&pe>=0}return!1}function ge(V,W){var Se=Pl(W)?W:"";return V?lK+Se+"-"+V:null}function fe(V){try{if(V){var W=new Date;return V.getUTCFullYear()===W.getUTCFullYear()&&V.getUTCMonth()===W.getUTCMonth()&&V[fT]()===W[fT]()}}catch{}return!1}function Me(V,W,Se){try{var te={date:Te(),count:0};if(V){var Ue=JSON.parse(V),He={date:Te(Ue[hT])||te[hT],count:Ue[op]||te[op],preTriggerDate:Ue.preTriggerDate?Te(Ue[cT]):void 0};return He}else return re(W,Se,te),te}catch{}return null}function Te(V){try{if(V){var W=new Date(V);if(!isNaN(W.getDate()))return W}else return new Date}catch{}return null}function re(V,W,Se){try{return EP(V,W,fr(JSON[$y](Se)))}catch{}return!1}function Pe(V,W,Se){return V<=0?1:Se>=W&&(Se-W)%V==0?Math.floor((Se-W)/V)+1:-1}function ke(V,W,Se,te){je(W,te||1,V,Se)}function T(V){try{var W=U(V);return Aq(1e6)<=W.limit.samplingRate}catch{}return!1}function oe(V){try{var W=f[V];if(!W){var Se=ge(V,M);W=Me(AP(m,Se),m,Se),f[V]=W}return f[V]}catch{}return null}function ve(V){var W=A[V];if(_e(W)){W=!1;var Se=oe(V);Se&&(W=fe(Se[cT])),A[V]=W}return A[V]}function be(V){return D=D||{},_e(D[V])&&(D[V]=[]),D[V]}}return o}(),dK=";",pK="=";function MP(o){if(!o)return{};var s=o[ip](dK),c=aH(s,function(d,m){var b=m[ip](pK);if(b[qt]===2){var f=b[0][Qf](),A=b[1];d[f]=A}return d},{});if(ss(c)[qt]>0){if(c.endpointsuffix){var h=c.location?c.location+".":"";c[Fl]=c[Fl]||"https://"+h+"dc."+c.endpointsuffix}c[Fl]=c[Fl]||sT,f6(c[Fl],"/")&&(c[Fl]=c[Fl].slice(0,-1))}return c}var hK=function(){function o(s,c,h){var d=this,m=this;m.ver=1,m.sampleRate=100,m.tags={},m[Wa]=mr(s,h)||So,m.data=c,m.time=Xd(new Date),m.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return d.sampleRate===100?4:1},tags:1,data:1}}return o}(),Su=function(){function o(s,c,h,d){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var m=this;m.ver=2,m[Wa]=mr(s,c)||So,m[ko]=Bl(s,h),m[ys]=Vl(s,d)}return o.envelopeType="Microsoft.ApplicationInsights.{0}.Event",o.dataType="EventData",o}(),fK="<no_method>",dp="error",zi="stack",AT="stackDetails",_P="errorSrc",ET="message",DP="description";function CT(o,s){var c=o;return c&&!Dt(c)&&(JSON&&JSON[$y]?(c=JSON[$y](o),s&&(!c||c==="{}")&&(Bt(o[ap])?c=o[ap]():c=""+o)):c=""+o+" - (Missing JSON.stringify)"),c||""}function PP(o,s){var c=o;return o&&(c&&!Dt(c)&&(c=o[ET]||o[DP]||c),c&&!Dt(c)&&(c=CT(c,!0)),o.filename&&(c=c+" @"+(o.filename||"")+":"+(o.lineno||"?")+":"+(o.colno||"?"))),s&&s!=="String"&&s!=="Object"&&s!=="Error"&&Vi(c||"",s)===-1&&(c=s+": "+c),c||""}function gK(o){try{if(ji(o))return"hasFullStack"in o&&"typeName"in o}catch{}return!1}function mK(o){try{if(ji(o))return"ver"in o&&"exceptions"in o&&"properties"in o}catch{}return!1}function LP(o){return o&&o.src&&Dt(o.src)&&o.obj&&Yt(o.obj)}function $l(o){var s=o||"";Dt(s)||(Dt(s[zi])?s=s[zi]:s=""+s);var c=s[ip](`
`);return{src:s,obj:c}}function vK(o){for(var s=[],c=o[ip](`
`),h=0;h<c[qt];h++){var d=c[h];c[h+1]&&(d+="@"+c[h+1],h++),s[Vy](d)}return{src:o,obj:s}}function RP(o){var s=null;if(o)try{if(o[zi])s=$l(o[zi]);else if(o[dp]&&o[dp][zi])s=$l(o[dp][zi]);else if(o.exception&&o.exception[zi])s=$l(o.exception[zi]);else if(LP(o))s=o;else if(LP(o[AT]))s=o[AT];else if(aa()&&aa().opera&&o[ET])s=vK(o[bu]);else if(o.reason&&o.reason[zi])s=$l(o.reason[zi]);else if(Dt(o))s=$l(o);else{var c=o[ET]||o[DP]||"";Dt(o[_P])&&(c&&(c+=`
`),c+=" from "+o[_P]),c&&(s=$l(c))}}catch(h){s=$l(h)}return s||{src:"",obj:null}}function yK(o){var s="";return o&&(o.obj?rt(o.obj,function(c){s+=c+`
`}):s=o.src||""),s}function bK(o){var s,c=o.obj;if(c&&c[qt]>0){s=[];var h=0,d=0;rt(c,function(w){var U=w[ap]();if(MT.regex.test(U)){var G=new MT(U,h++);d+=G[up],s[Vy](G)}});var m=32*1024;if(d>m)for(var b=0,f=s[qt]-1,A=0,M=b,D=f;b<f;){var N=s[b][up],F=s[f][up];if(A+=N+F,A>m){var L=D-M+1;s.splice(M,L);break}M=b,D=f,b++,f--}}return s}function Yy(o){var s="";if(o&&(s=o.typeName||o[Wa]||"",!s))try{var c=/function (.{1,200})\(/,h=c.exec(o.constructor[ap]());s=h&&h[qt]>1?h[1]:""}catch{}return s}function IT(o){if(o)try{if(!Dt(o)){var s=Yy(o),c=CT(o,!1);return(!c||c==="{}")&&(o[dp]&&(o=o[dp],s=Yy(o)),c=CT(o,!0)),Vi(c,s)!==0&&s!=="String"?s+":"+c:c}}catch{}return""+(o||"")}var Ia=function(){function o(s,c,h,d,m,b){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var f=this;f.ver=2,mK(c)?(f[sp]=c[sp]||[],f[ko]=c[ko],f[ys]=c[ys],c[Zf]&&(f[Zf]=c[Zf]),c.id&&(f.id=c.id,c[ko].id=c.id),c[mT]&&(f[mT]=c[mT]),_e(c[vT])||(f[vT]=c[vT])):(h||(h={}),b&&(h.id=b),f[sp]=[new NP(s,c,h)],f[ko]=Bl(s,h),f[ys]=Vl(s,d),m&&(f[Zf]=m),b&&(f.id=b))}return o.CreateAutoException=function(s,c,h,d,m,b,f,A){var M,D=Yy(m||b||s);return M={},M[bu]=PP(s,D),M.url=c,M.lineNumber=h,M.columnNumber=d,M.error=IT(m||b||s),M.evt=IT(b||s),M[bs]=D,M.stackDetails=RP(f||m||b),M.errorSrc=A,M},o.CreateFromInterface=function(s,c,h,d){var m=c[sp]&&Ef(c[sp],function(f){return NP[fP](s,f)}),b=new o(s,wi(wi({},c),{exceptions:m}),h,d);return b},o.prototype.toInterface=function(){var s,c=this,h=c.exceptions,d=c.properties,m=c.measurements,b=c.severityLevel,f=c.problemGroup,A=c.id,M=c.isManual,D=h instanceof Array&&Ef(h,function(N){return N.toInterface()})||void 0;return s={ver:"4.0"},s[sp]=D,s.severityLevel=b,s.properties=d,s.measurements=m,s.problemGroup=f,s.id=A,s.isManual=M,s},o.CreateSimpleException=function(s,c,h,d,m,b){var f;return{exceptions:[(f={},f[zy]=!0,f.message=s,f.stack=m,f.typeName=c,f)]}},o.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",o.dataType="ExceptionData",o.formatError=IT,o}(),NP=function(){function o(s,c,h){this.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2};var d=this;if(gK(c))d[bs]=c[bs],d[bu]=c[bu],d[zi]=c[zi],d[Xa]=c[Xa]||[],d[zy]=c[zy];else{var m=c,b=m&&m.evt;oS(m)||(m=m[dp]||b||m),d[bs]=mr(s,Yy(m))||So,d[bu]=vP(s,PP(c||m,d[bs]))||So;var f=c[AT]||RP(c);d[Xa]=bK(f),Yt(d[Xa])&&Ef(d[Xa],function(A){A[lp]=mr(s,A[lp]),A[jl]=mr(s,A[jl])}),d[zi]=XG(s,yK(f)),d.hasFullStack=Yt(d.parsedStack)&&d.parsedStack[qt]>0,h&&(h[bs]=h[bs]||d[bs])}}return o.prototype.toInterface=function(){var s,c=this,h=c[Xa]instanceof Array&&Ef(c[Xa],function(m){return m.toInterface()}),d=(s={id:c.id,outerId:c.outerId,typeName:c[bs],message:c[bu],hasFullStack:c[zy],stack:c[zi]},s[Xa]=h||void 0,s);return d},o.CreateFromInterface=function(s,c){var h=c[Xa]instanceof Array&&Ef(c[Xa],function(m){return MT[fP](m)})||c[Xa],d=new o(s,wi(wi({},c),{parsedStack:h}));return d},o}(),MT=function(){function o(s,c){this.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0};var h=this;if(h[up]=0,typeof s=="string"){var d=s;h[Hy]=c,h[cp]=fK,h[lp]=fr(d),h[jl]="",h[eg]=0;var m=d.match(o.regex);m&&m[qt]>=5&&(h[cp]=fr(m[2])||h[cp],h[jl]=fr(m[4]),h[eg]=parseInt(m[5])||0)}else h[Hy]=s[Hy],h[cp]=s[cp],h[lp]=s[lp],h[jl]=s[jl],h[eg]=s[eg],h[up]=0;h.sizeInBytes+=h.method[qt],h.sizeInBytes+=h.fileName[qt],h.sizeInBytes+=h.assembly[qt],h[up]+=o.baseSize,h.sizeInBytes+=h.level.toString()[qt],h.sizeInBytes+=h.line.toString()[qt]}return o.CreateFromInterface=function(s){return new o(s,null)},o.prototype.toInterface=function(){var s=this;return{level:s[Hy],method:s[cp],assembly:s[lp],fileName:s[jl],line:s[eg]}},o.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,o.baseSize=58,o}(),wK=function(){function o(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return o}(),zl=function(){function o(s,c,h,d,m,b,f,A,M){this.aiDataContract={ver:1,metrics:1,properties:0};var D=this;D.ver=2;var N=new wK;N[op]=d>0?d:void 0,N.max=isNaN(b)||b===null?void 0:b,N.min=isNaN(m)||m===null?void 0:m,N[Wa]=mr(s,c)||So,N.value=h,N.stdDev=isNaN(f)||f===null?void 0:f,D.metrics=[N],D[ko]=Bl(s,A),D[ys]=Vl(s,M)}return o.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",o.dataType="MetricData",o}(),rg="";function ku(o){(isNaN(o)||o<0)&&(o=0),o=Math.round(o);var s=rg+o%1e3,c=rg+Math.floor(o/1e3)%60,h=rg+Math.floor(o/(1e3*60))%60,d=rg+Math.floor(o/(1e3*60*60))%24,m=Math.floor(o/(1e3*60*60*24));return s=s[qt]===1?"00"+s:s[qt]===2?"0"+s:s,c=c[qt]<2?"0"+c:c,h=h[qt]<2?"0"+h:h,d=d[qt]<2?"0"+d:d,(m>0?m+".":rg)+d+":"+h+":"+c+"."+s}function xK(o,s,c,h,d){return!d&&Dt(o)&&(o==="Script error."||o==="Script error")}var Tu=function(){function o(s,c,h,d,m,b,f){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var A=this;A.ver=2,A.id=YG(s,f),A.url=Gy(s,h),A[Wa]=mr(s,c)||So,isNaN(d)||(A[qy]=ku(d)),A[ko]=Bl(s,m),A[ys]=Vl(s,b)}return o.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",o.dataType="PageviewData",o}(),Hl=function(){function o(s,c,h,d,m,b,f,A,M,D,N,F){M===void 0&&(M="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var L=this;L.ver=2,L.id=c,L[qy]=ku(m),L.success=b,L.resultCode=f+"",L.type=mr(s,M);var w=aK(s,h,A,d);L.data=Gy(s,d)||w.data,L.target=mr(s,w.target),D&&(L.target="".concat(L.target," | ").concat(D)),L[Wa]=mr(s,w[Wa]),L[ko]=Bl(s,N),L[ys]=Vl(s,F)}return o.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",o.dataType="RemoteDependencyData",o}(),pp=function(){function o(s,c,h,d,m){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var b=this;b.ver=2,c=c||So,b[bu]=vP(s,c),b[ko]=Bl(s,d),b[ys]=Vl(s,m),h&&(b[Zf]=h)}return o.envelopeType="Microsoft.ApplicationInsights.{0}.Message",o.dataType="MessageData",o}(),hp=function(){function o(s,c,h,d,m,b,f){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var A=this;A.ver=2,A.url=Gy(s,h),A[Wa]=mr(s,c)||So,A[ko]=Bl(s,m),A[ys]=Vl(s,b),f&&(A.domProcessing=f.domProcessing,A[qy]=f[qy],A.networkConnect=f.networkConnect,A.perfTotal=f.perfTotal,A[gP]=f[gP],A.sentRequest=f.sentRequest)}return o.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",o.dataType="PageviewPerformanceData",o}(),ql=function(){function o(s,c){this.aiDataContract={baseType:1,baseData:1},this.baseType=s,this.baseData=c}return o}();function Au(o){var s="ai."+o+".";return function(c){return s+c}}var ig=Au("application"),Ir=Au("device"),Jy=Au("location"),fp=Au("operation"),_T=Au("session"),Eu=Au("user"),Gl=Au("cloud"),ag=Au("internal"),OP=function(o){ds(s,o);function s(){return o.call(this)||this}return s}(eq({applicationVersion:ig("ver"),applicationBuild:ig("build"),applicationTypeId:ig("typeId"),applicationId:ig("applicationId"),applicationLayer:ig("layer"),deviceId:Ir("id"),deviceIp:Ir("ip"),deviceLanguage:Ir("language"),deviceLocale:Ir("locale"),deviceModel:Ir("model"),deviceFriendlyName:Ir("friendlyName"),deviceNetwork:Ir("network"),deviceNetworkName:Ir("networkName"),deviceOEMName:Ir("oemName"),deviceOS:Ir("os"),deviceOSVersion:Ir("osVersion"),deviceRoleInstance:Ir("roleInstance"),deviceRoleName:Ir("roleName"),deviceScreenResolution:Ir("screenResolution"),deviceType:Ir("type"),deviceMachineName:Ir("machineName"),deviceVMName:Ir("vmName"),deviceBrowser:Ir("browser"),deviceBrowserVersion:Ir("browserVersion"),locationIp:Jy("ip"),locationCountry:Jy("country"),locationProvince:Jy("province"),locationCity:Jy("city"),operationId:fp("id"),operationName:fp("name"),operationParentId:fp("parentId"),operationRootId:fp("rootId"),operationSyntheticSource:fp("syntheticSource"),operationCorrelationVector:fp("correlationVector"),sessionId:_T("id"),sessionIsFirst:_T("isFirst"),sessionIsNew:_T("isNew"),userAccountAcquisitionDate:Eu("accountAcquisitionDate"),userAccountId:Eu("accountId"),userAgent:Eu("userAgent"),userId:Eu("id"),userStoreRegion:Eu("storeRegion"),userAuthUserId:Eu("authUserId"),userAnonymousUserAcquisitionDate:Eu("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Eu("authUserAcquisitionDate"),cloudName:Gl("name"),cloudRole:Gl("role"),cloudRoleVer:Gl("roleVer"),cloudRoleInstance:Gl("roleInstance"),cloudEnvironment:Gl("environment"),cloudLocation:Gl("location"),cloudDeploymentUnit:Gl("deploymentUnit"),internalNodeName:ag("nodeName"),internalSdkVersion:ag("sdkVersion"),internalAgentVersion:ag("agentVersion"),internalSnippet:ag("snippet"),internalSdkSrc:ag("sdkSrc")}));function Cu(o,s,c,h,d,m){var b;c=mr(h,c)||So,(_e(o)||_e(s)||_e(c))&&ia("Input doesn't contain all required fields");var f="";o[uT]&&(f=o[uT],delete o[uT]);var A=(b={},b[Wa]=c,b.time=Xd(new Date),b.iKey=f,b.ext=m||{},b.tags=[],b.data={},b.baseType=s,b.baseData=o,b);return _e(d)||en(d,function(M,D){A.data[M]=D}),A}var oa={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},Fn=new OP;function og(o){var s=null;if(Bt(Event))s=new Event(o);else{var c=qr();c&&c.createEvent&&(s=c.createEvent("Event"),s.initEvent(o,!0,!0))}return s}function UP(o,s){np(o,null,null,s)}function SK(o){var s=qr(),c=co(),h=!1,d=[],m=1;c&&!_e(c.onLine)&&!c.onLine&&(m=2);var b=0,f=F(),A=yu(Ea("OfflineListener"),o);try{if(D(aa())&&(h=!0),s){var M=s.body||s;M.ononline&&D(M)&&(h=!0)}}catch{h=!1}function D(ge){var fe=!1;return ge&&(fe=vs(ge,"online",U,A),fe&&vs(ge,"offline",G,A)),fe}function N(){return f}function F(){return!(b===2||m===2)}function L(){var ge=F();f!==ge&&(f=ge,rt(d,function(fe){var Me={isOnline:f,rState:m,uState:b};try{fe(Me)}catch{}}))}function w(ge){b=ge,L()}function U(){m=1,L()}function G(){m=2,L()}function Z(){var ge=aa();if(ge&&h){if(UP(ge,A),s){var fe=s.body||s;Yn(fe.ononline)||UP(fe,A)}h=!1}}function ie(ge){return d[Vy](ge),{rm:function(){var fe=d.indexOf(ge);if(fe>-1)return d.splice(fe,1)}}}return{isOnline:N,isListening:function(){return h},unload:Z,addListener:ie,setOnlineState:w}}var Qy="AppInsightsPropertiesPlugin",FP="AppInsightsChannelPlugin",jP="ApplicationInsightsAnalytics",Zy="toString",DT="isStorageUseDisabled",gp="_addHook",Gr="core",Iu="dataType",Kl="envelopeType",sa="diagLog",Wl="track",e1="trackPageView",PT="trackPreviousPageVisit",Xl="sendPageViewInternal",mp="startTime",sg="properties",To="duration",LT="sendPageViewPerformanceInternal",RT="populatePageViewPerformanceEvent",ug="href",BP="sendExceptionInternal",NT="exception",lg="error",OT="_onerror",UT="errorSrc",FT="lineNumber",jT="columnNumber",VP="message",BT="CreateAutoException",t1="addTelemetryInitializer",kK="overridePageViewDuration",$P="autoTrackPageVisitTime",zP="isBrowserLinkTrackingEnabled",cg="length",HP="enableAutoRouteTracking",qP="enableUnhandledPromiseRejectionTracking",VT="autoUnhandledPromiseInstrumented",$T="getEntriesByType",GP="isPerformanceTimingSupported",KP="getPerformanceTiming",n1="navigationStart",zT="shouldCollectDuration",WP="isPerformanceTimingDataReady",dg="responseStart",TK="requestStart",r1="loadEventEnd",HT="responseEnd",i1="connectEnd",XP="pageVisitStartTime",AK=function(){function o(s,c,h,d){Un(o,this,function(m){var b=null,f=[],A=!1,M=!1,D;h&&(D=h.logger);function N(w){h&&h.flush(w,function(){})}function F(){b||(b=Aa(function(){b=null;var w=f.slice(0),U=!1;f=[],rt(w,function(G){G()?U=!0:f.push(G)}),f[cg]>0&&F(),U&&N(!0)},100))}function L(w){f.push(w),F()}m[e1]=function(w,U){var G=w.name;if(_e(G)||typeof G!="string"){var Z=qr();G=w.name=Z&&Z.title||""}var ie=w.uri;if(_e(ie)||typeof ie!="string"){var ge=bo();ie=w.uri=ge&&ge[ug]||""}if(!M){var fe=ls(),Me=fe&&fe[$T]&&fe[$T]("navigation");if(Me&&Me[0]&&!Yn(fe.timeOrigin)){var Te=Me[0].loadEventStart;w[mp]=new Date(fe.timeOrigin+Te)}else{var re=(U||w[sg]||{})[To]||0;w[mp]=new Date(new Date().getTime()-re)}M=!0}if(!d[GP]()){s[Xl](w,U),N(!0),n6()||je(D,2,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");return}var Pe=!1,ke,T=d[KP]()[n1];T>0&&(ke=$i(T,+new Date),d[zT](ke)||(ke=void 0));var oe;!_e(U)&&!_e(U[To])&&(oe=U[To]),(c||!isNaN(oe))&&(isNaN(oe)&&(U||(U={}),U[To]=ke),s[Xl](w,U),N(!0),Pe=!0);var ve=6e4;U||(U={}),L(function(){var be=!1;try{if(d[WP]()){be=!0;var V={name:G,uri:ie};d[RT](V),!V.isValid&&!Pe?(U[To]=ke,s[Xl](w,U)):(Pe||(U[To]=V.durationMs,s[Xl](w,U)),A||(s[LT](V,U),A=!0))}else T>0&&$i(T,+new Date)>ve&&(be=!0,Pe||(U[To]=ve,s[Xl](w,U)))}catch(W){je(D,1,38,"trackPageView failed on page load calculation: "+wn(W),{exception:it(W)})}return be})},m.teardown=function(w,U){if(b){b.cancel(),b=null;var G=f.slice(0);f=[],rt(G,function(Z){Z()})}}})}return o.__ieDyn=1,o}(),EK=36e5,YP=["googlebot","adsbot-google","apis-google","mediapartners-google"];function JP(){var o=ls();return o&&!!o.timing}function CK(){var o=ls();return o&&o.getEntriesByType&&o.getEntriesByType("navigation")[cg]>0}function IK(){var o=ls(),s=o?o.timing:0;return s&&s.domainLookupStart>0&&s[n1]>0&&s[dg]>0&&s[TK]>0&&s[r1]>0&&s[HT]>0&&s[i1]>0&&s.domLoading>0}function QP(){return JP()?ls().timing:null}function MK(){return CK()?ls()[$T]("navigation")[0]:null}function _K(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var c=co()||{},h=c.userAgent,d=!1;if(h)for(var m=0;m<YP[cg];m++)d=d||Vi(h.toLowerCase(),YP[m])!==-1;if(d)return!1;for(var m=0;m<o[cg];m++)if(o[m]<0||o[m]>=EK)return!1;return!0}var DK=function(){function o(s){var c=Ll(s);Un(o,this,function(h){h[RT]=function(d){d.isValid=!1;var m=MK(),b=QP(),f=0,A=0,M=0,D=0,N=0;(m||b)&&(m?(f=m[To],A=m[mp]===0?m[i1]:$i(m[mp],m[i1]),M=$i(m.requestStart,m[dg]),D=$i(m[dg],m[HT]),N=$i(m.responseEnd,m[r1])):(f=$i(b[n1],b[r1]),A=$i(b[n1],b[i1]),M=$i(b.requestStart,b[dg]),D=$i(b[dg],b[HT]),N=$i(b.responseEnd,b[r1])),f===0?je(c,2,10,"error calculating page view performance.",{total:f,network:A,request:M,response:D,dom:N}):h[zT](f,A,M,D,N)?f<Math.floor(A)+Math.floor(M)+Math.floor(D)+Math.floor(N)?je(c,2,8,"client performance math error.",{total:f,network:A,request:M,response:D,dom:N}):(d.durationMs=f,d.perfTotal=d[To]=ku(f),d.networkConnect=ku(A),d.sentRequest=ku(M),d.receivedResponse=ku(D),d.domProcessing=ku(N),d.isValid=!0):je(c,2,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:f,network:A,request:M,response:D,dom:N}))},h[KP]=QP,h[GP]=JP,h[WP]=IK,h[zT]=_K})}return o.__ieDyn=1,o}(),PK=function(){function o(s,c){var h="prevPageVisitData";Un(o,this,function(d){d[PT]=function(f,A){try{var M=m(f,A);M&&c(M.pageName,M.pageUrl,M.pageVisitTime)}catch(D){Rl(s,"Auto track page visit time failed, metric will not be collected: "+it(D))}};function m(f,A){var M=null;try{if(M=b(),ng()){TT(s,h)!=null&&ia("Cannot call startPageVisit consecutively without first calling stopPageVisit");var D=qa().stringify(new LK(f,A));CP(s,h,D)}}catch(N){Rl(s,"Call to restart failed: "+it(N)),M=null}return M}function b(){var f=null;try{if(ng()){var A=po(),M=TT(s,h);M&&Vf()&&(f=qa().parse(M),f.pageVisitTime=A-f[XP],IP(s,h))}}catch(D){Rl(s,"Stop page visit timer failed: "+it(D)),f=null}return f}mn(d,"_logger",{g:function(){return s}}),mn(d,"pageVisitTimeTrackingHandler",{g:function(){return c}})})}return o.__ieDyn=1,o}(),LK=function(){function o(s,c){this[XP]=po(),this.pageName=s,this.pageUrl=c}return o}(),ZP=function(){function o(s,c){var h=this,d={};h.start=function(m){typeof d[m]<"u"&&je(s,2,62,"start was called more than once for this event without calling stop.",{name:m,key:m},!0),d[m]=+new Date},h.stop=function(m,b,f,A){var M=d[m];if(isNaN(M))je(s,2,63,"stop was called without a corresponding start.",{name:m,key:m},!0);else{var D=+new Date,N=$i(M,D);h.action(m,b,N,f,A)}delete d[m],d[m]=void 0}}return o}(),ki,RK="event";function pg(o,s){o&&o.dispatchEvent&&s&&o.dispatchEvent(s)}function NK(o){if(o&&o.reason){var s=o.reason;return!Dt(s)&&Bt(s[Zy])?s[Zy]():it(s)}return o||""}var eL=6e4,OK=_d((ki={sessionRenewalMs:vD(tL,30*60*1e3),sessionExpirationMs:vD(tL,24*60*60*1e3),disableExceptionTracking:gr()},ki[$P]=gr(),ki[kK]=gr(),ki[qP]=gr(),ki[VT]=!1,ki.samplingPercentage=Ay(UK,100),ki[DT]=gr(),ki[zP]=gr(),ki[HP]=gr(),ki.namePrefix=$q(),ki.enableDebug=gr(),ki.disableFlushOnBeforeUnload=gr(),ki.disableFlushOnUnload=gr(!1,"disableFlushOnBeforeUnload"),ki.expCfg=Ga({inclScripts:!1,expLog:void 0,maxLogs:50}),ki));function tL(o,s){return o=o||s,o<eL&&(o=eL),+o}function UK(o){return!isNaN(o)&&o>0&&o<=100}function FK(o){Yn(o[DT])||(o[DT]?oK():sK())}var jK=function(o){ds(s,o);function s(){var c=o.call(this)||this;c.identifier=jP,c.priority=180,c.autoRoutePVDelay=500;var h,d,m,b,f,A,M,D,N,F,L,w,U,G,Z,ie,ge,fe,Me,Te;return Un(s,c,function(re,Pe){var ke=Pe[gp];mt(),re.getCookieMgr=function(){return Uk(re[Gr])},re.processTelemetry=function(X,pe){re.processNext(X,pe)},re.trackEvent=function(X,pe){try{var Q=Cu(X,Su[Iu],Su[Kl],re[sa](),pe);re[Gr][Wl](Q)}catch(P){He(2,39,"trackTrace failed, trace will not be collected: "+wn(P),{exception:it(P)})}},re.startTrackEvent=function(X){try{h.start(X)}catch(pe){He(1,29,"startTrackEvent failed, event will not be collected: "+wn(pe),{exception:it(pe)})}},re.stopTrackEvent=function(X,pe,Q){try{h.stop(X,void 0,pe,Q)}catch(P){He(1,30,"stopTrackEvent failed, event will not be collected: "+wn(P),{exception:it(P)})}},re.trackTrace=function(X,pe){try{var Q=Cu(X,pp[Iu],pp[Kl],re[sa](),pe);re[Gr][Wl](Q)}catch(P){He(2,39,"trackTrace failed, trace will not be collected: "+wn(P),{exception:it(P)})}},re.trackMetric=function(X,pe){try{var Q=Cu(X,zl[Iu],zl[Kl],re[sa](),pe);re[Gr][Wl](Q)}catch(P){He(1,36,"trackMetric failed, metric will not be collected: "+wn(P),{exception:it(P)})}},re[e1]=function(X,pe){try{var Q=X||{};m[e1](Q,wi(wi(wi({},Q.properties),Q.measurements),pe)),ie&&f[PT](Q.name,Q.uri)}catch(P){He(1,37,"trackPageView failed, page view will not be collected: "+wn(P),{exception:it(P)})}},re[Xl]=function(X,pe,Q){var P=qr();if(P&&(X.refUri=X.refUri===void 0?P.referrer:X.refUri),_e(X[mp])){var Re=(pe||X[sg]||{})[To]||0;X[mp]=new Date(new Date().getTime()-Re)}var ft=Cu(X,Tu[Iu],Tu[Kl],re[sa](),pe,Q);re[Gr][Wl](ft)},re[LT]=function(X,pe,Q){var P=Cu(X,hp[Iu],hp[Kl],re[sa](),pe,Q);re[Gr][Wl](P)},re.trackPageViewPerformance=function(X,pe){var Q=X||{};try{b[RT](Q),re[LT](Q,pe)}catch(P){He(1,37,"trackPageViewPerformance failed, page view will not be collected: "+wn(P),{exception:it(P)})}},re.startTrackPage=function(X){try{if(typeof X!="string"){var pe=qr();X=pe&&pe.title||""}d.start(X)}catch(Q){He(1,31,"startTrackPage failed, page view may not be collected: "+wn(Q),{exception:it(Q)})}},re.stopTrackPage=function(X,pe,Q,P){try{if(typeof X!="string"){var Re=qr();X=Re&&Re.title||""}if(typeof pe!="string"){var ft=bo();pe=ft&&ft[ug]||""}d.stop(X,pe,Q,P),ie&&f[PT](X,pe)}catch(Mt){He(1,32,"stopTrackPage failed, page view will not be collected: "+wn(Mt),{exception:it(Mt)})}},re[BP]=function(X,pe,Q){var P=X&&(X[NT]||X[lg])||oS(X)&&X||{name:X&&typeof X,message:X||So};X=X||{};var Re=new Ia(re[sa](),P,X[sg]||pe,X.measurements,X.severityLevel,X.id).toInterface(),ft=qr();if(ft&&ge!=null&&ge.inclScripts){var Mt=dG(ft);Re[sg].exceptionScripts=JSON.stringify(Mt)}if(ge!=null&&ge.expLog){var Ot=ge.expLog();Ot&&Ot.logs&&Yt(Ot.logs)&&(Re[sg].exceptionLog=Ot.logs.slice(0,ge.maxLogs).join(`
`))}var sn=Cu(Re,Ia[Iu],Ia[Kl],re[sa](),pe,Q);re[Gr][Wl](sn)},re.trackException=function(X,pe){X&&!X[NT]&&X[lg]&&(X[NT]=X[lg]);try{re[BP](X,pe)}catch(Q){He(1,35,"trackException failed, exception will not be collected: "+wn(Q),{exception:it(Q)})}},re[OT]=function(X){var pe=X&&X[lg],Q=X&&X.evt;try{if(!Q){var P=aa();P&&(Q=P[RK])}var Re=X&&X.url||(qr()||{}).URL,ft=X[UT]||"window.onerror@"+Re+":"+(X[FT]||0)+":"+(X[jT]||0),Mt={errorSrc:ft,url:Re,lineNumber:X[FT]||0,columnNumber:X[jT]||0,message:X[VP]};xK(X.message,X.url,X.lineNumber,X.columnNumber,X[lg])?be(Ia[BT]("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",Re,X[FT]||0,X[jT]||0,pe,Q,null,ft),Mt):(X[UT]||(X[UT]=ft),re.trackException({exception:X,severityLevel:3},Mt))}catch(sn){var Ot=pe?pe.name+", "+pe[VP]:"null";He(1,11,"_onError threw exception while logging error, error will not be collected: "+wn(sn),{exception:it(sn),errorString:Ot})}},re[t1]=function(X){if(re[Gr])return re[Gr][t1](X);A||(A=[]),A.push(X)},re.initialize=function(X,pe,Q,P){if(!re.isInitialized()){_e(pe)&&ia("Error initializing"),Pe.initialize(X,pe,Q,P);try{Te=yu(Ea(re.identifier),pe.evtNamespace&&pe.evtNamespace()),A&&(rt(A,function(Re){pe[t1](Re)}),A=null),T(X),b=new DK(re[Gr]),m=new AK(re,Z.overridePageViewDuration,re[Gr],b),f=new PK(re[sa](),function(Re,ft,Mt){return oe(Re,ft,Mt)}),h=new ZP(re[sa](),"trackEvent"),h.action=function(Re,ft,Mt,Ot,sn){Ot||(Ot={}),sn||(sn={}),Ot.duration=Mt[Zy](),re.trackEvent({name:Re,properties:Ot,measurements:sn})},d=new ZP(re[sa](),"trackPageView"),d.action=function(Re,ft,Mt,Ot,sn){_e(Ot)&&(Ot={}),Ot.duration=Mt[Zy]();var Ai={name:Re,uri:ft,properties:Ot,measurements:sn};re[Xl](Ai,Ot)},B0()&&(V(),W())}catch(Re){throw re.setInitialized(!1),Re}}},re._doTeardown=function(X,pe){m&&m.teardown(X,pe),np(window,null,null,Te),mt()};function T(X){var pe=re.identifier,Q=re[Gr];re[gp](lr(X,function(){var P=Ka(null,X,Q);Z=P.getExtCfg(pe,OK),ge=Z.expCfg,ie=Z[$P],X.storagePrefix&&kT(X.storagePrefix),FK(Z),M=Z[zP],ve()}))}function oe(X,pe,Q){var P={PageName:X,PageUrl:pe};re.trackMetric({name:"PageVisitTime",average:Q,max:Q,min:Q,sampleCount:1},P)}function ve(){if(!D&&M){var X=["/browserLinkSignalR/","/__browserLink/"],pe=function(Q){if(M&&Q.baseType===Hl[Iu]){var P=Q.baseData;if(P){for(var Re=0;Re<X[cg];Re++)if(P.target&&Vi(P.target,X[Re])>=0)return!1}}return!0};re[gp](re[t1](pe)),D=!0}}function be(X,pe){var Q=Cu(X,Ia[Iu],Ia[Kl],re[sa](),pe);re[Gr][Wl](Q)}function V(){var X=aa(),pe=bo(!0);re[gp](lr(Z,function(){L=Z.disableExceptionTracking,!L&&!w&&!Z.autoExceptionInstrumented&&(ke(jy(X,"onerror",{ns:Te,rsp:function(Q,P,Re,ft,Mt,Ot){!L&&Q.rslt!==!0&&re[OT](Ia[BT](P,Re,ft,Mt,Ot,Q.evt))}},!1)),w=!0)})),Ue(X,pe)}function W(){var X=aa(),pe=bo(!0);re[gp](lr(Z,function(){if(N=Z[HP]===!0,X&&N&&!F&&eH()){var Q=t6();Bt(Q.pushState)&&Bt(Q.replaceState)&&typeof Event!==BS&&te(X,Q,pe)}}))}function Se(){var X=null;if(re[Gr]&&re[Gr].getTraceCtx&&(X=re[Gr].getTraceCtx(!1)),!X){var pe=re[Gr].getPlugin(Qy);if(pe){var Q=pe.plugin.context;Q&&(X=wT(Q.telemetryTrace))}}return X}function te(X,pe,Q){if(F)return;var P=Z.namePrefix||"";function Re(){N&&pg(X,og(P+"locationchange"))}function ft(){if(Me&&(fe=Me),Me=Q&&Q[ug]||"",N){var Mt=Se();if(Mt){Mt.setTraceId(gu());var Ot="_unknown_";Q&&Q.pathname&&(Ot=Q.pathname+(Q.hash||"")),Mt.setName(mr(re[sa](),Ot))}Aa(function(sn){re[e1]({refUri:sn,properties:{duration:0}})}.bind(re,fe),re.autoRoutePVDelay)}}ke(jy(pe,"pushState",{ns:Te,rsp:function(){N&&(pg(X,og(P+"pushState")),pg(X,og(P+"locationchange")))}},!0)),ke(jy(pe,"replaceState",{ns:Te,rsp:function(){N&&(pg(X,og(P+"replaceState")),pg(X,og(P+"locationchange")))}},!0)),vs(X,P+"popstate",Re,Te),vs(X,P+"locationchange",ft,Te),F=!0}function Ue(X,pe){re[gp](lr(Z,function(){U=Z[qP]===!0,w=w||Z[VT],U&&!G&&(ke(jy(X,"onunhandledrejection",{ns:Te,rsp:function(Q,P){U&&Q.rslt!==!0&&re[OT](Ia[BT](NK(P),pe?pe[ug]:"",0,0,P,Q.evt))}},!1)),Z[VT]=G=!0)}))}function He(X,pe,Q,P,Re){re[sa]().throwInternal(X,pe,Q,P,Re)}function mt(){h=null,d=null,m=null,b=null,f=null,A=null,M=!1,D=!1,N=!1,F=!1,L=!1,w=!1,U=!1,G=!1,ie=!1;var X=bo(!0);fe=X&&X[ug]||"",Me=null,Te=null,Z=null,mn(re,"config",{g:function(){return Z}})}mn(re,"_pageViewManager",{g:function(){return m}}),mn(re,"_pageViewPerformanceManager",{g:function(){return b}}),mn(re,"_pageVisitTimeManager",{g:function(){return f}}),mn(re,"_evtNamespace",{g:function(){return"."+Te}})}),c}return s.Version="3.3.3",s}(tp),a1="featureOptIn",nL="onCfgChangeReceive",rL="nonOverrideConfigs",iL="scheduleFetchTimeout";function aL(o,s,c,h){try{var d=c>h;d&&(o=null);var m=c==0?bH({},o):o;return m&&s&&!d&&en(m,function(b){var f=s[b];f&&(ji(m[b])&&ji(f)?m[b]=aL(m[b],f,++c,h):delete m[b])}),m}catch{}return o}var vp="featureOptIn.",oL=".mode",sL=".onCfg",uL=".offCfg";function BK(o,s,c){var h;if(!s||!s.enabled)return null;var d=(s[a1]||{})[o]||{mode:1},m=d.mode,b=d.onCfg,f=d.offCfg,A=(c||{})[o]||{mode:2},M=A.mode,D=A.onCfg,N=A.offCfg,F=!!A.blockCdnCfg,L=vp+o+oL,w=vp+o+sL,U=vp+o+uL,G=M,Z=D,ie=N;return F||(m===4||m===5?(G=m==4?3:2,Z=b||D,ie=f||N):m===2||M===2?(G=2,Z=D||b,ie=N||f):m===3?(G=3,Z=D||b,ie=N||f):m===1&&M===1&&(G=1)),h={},h[L]=G,h[w]=Z,h[U]=ie,h}function VK(o,s){try{if(!o||!o.enabled)return null;if(!o[a1])return o.config;var c=o[a1],h=o.config||{};return en(c,function(d){var m=BK(d,o,s.config[a1]);_e(m)||(en(m,function(b,f){h6(h,b,f)}),$K(d,m,h))}),h}catch{}return null}function $K(o,s,c){var h=s[vp+o+oL],d=s[vp+o+sL],m=s[vp+o+uL],b=null;h===3&&(b=d),h===2&&(b=m),b&&en(b,function(f,A){h6(c,f,A)})}var hg,zK="ai_cfgsync",lL="GET",HK=18e5,yp=void 0,qK={instrumentationKey:!0,connectionString:!0,endpointUrl:!0},GK=_d((hg={syncMode:1,blkCdnCfg:yp,customEvtName:yp,cfgUrl:yp,overrideSyncFn:yp,overrideFetchFn:yp},hg[nL]=yp,hg[iL]=HK,hg[rL]=qK,hg)),KK=function(o){ds(s,o);function s(){var c=o.call(this)||this;c.priority=198,c.identifier="AppInsightsCfgSyncPlugin";var h,d,m,b,f,A,M,D,N,F,L,w,U,G,Z,ie,ge=!1;return Un(s,c,function(fe,Me){Te(),fe.initialize=function(X,pe,Q,P){Me.initialize(X,pe,Q,P),b=yu(Ea(fe.identifier),pe.evtNamespace&&pe.evtNamespace()),re(X)},fe.getCfg=function(){return d},fe.pause=function(){ge=!0,mt()},fe.resume=function(){ge=!1,He()},fe.setCfg=function(X){return Pe(X)},fe.sync=function(X){return T(X)},fe.updateEventListenerName=function(X){return oe(X)},fe._doTeardown=function(X,pe){ke(),mt(),Te()},fe._getDbgPlgTargets=function(){return[D,M,m,N,U]};function Te(){d=null,m=null,b=null,f=null,M=null,D=null,U=null,A=null,F=null,L=null,N=null,Z=null,ie=null,w=null}function re(X){var pe=fe.identifier,Q=fe.core;fe._addHook(lr(X,function(){var P=Ka(null,X,Q);h=P.getExtCfg(pe,GK);var Re=N;N=!!h.blkCdnCfg,!_e(Re)&&Re!==N&&(!N&&f?G&&G(f,W,D):mt()),_e(M)&&(M=h.syncMode===2),_e(D)&&(D=h.syncMode===1);var ft=h.customEvtName||zK;m!==ft&&(M?oe(ft):(ke(),m=ft)),_e(f)&&(f=h.cfgUrl),f||(d=X,D&&T())})),ie=h.overrideSyncFn,Z=h.overrideFetchFn,w=h[nL],U=h[rL],F=h[iL],G=ve(),L=0,f&&!N&&G&&G(f,W,D)}function Pe(X,pe){if(X){if(d=X,pe&&!ge)return T();if(M&&!ge)return fe.core.updateCfg(X),!0}return!1}function ke(){try{var X=Ta();X&&np(X,null,null,b)}catch{}}function T(X){try{return ie&&Bt(ie)?ie(d,X):Sq(m,d,X)}catch{}return!1}function oe(X){try{return ke(),X&&(m=X,te()),!0}catch{}return!1}function ve(){var X=Z;return _e(X)&&(Sk()?X=be:wy()&&(X=V)),X}function be(X,pe,Q){var P=Ta(),Re=P&&P.fetch||null;if(X&&Re&&Bt(Re))try{var ft={method:lL},Mt=new Request(X,ft);ms(fetch(Mt),function(Ot){var sn=Ot.value;Ot.rejected?Se(pe,400):sn.ok?ms(sn.text(),function(Ai){Se(pe,sn.status,Ai.value,Q)}):Se(pe,sn.status,null,Q)})}catch{}}function V(X,pe,Q){try{var P=new XMLHttpRequest;P.open(lL,X),P.onreadystatechange=function(){P.readyState===XMLHttpRequest.DONE&&Se(pe,P.status,P.responseText,Q)},P.onerror=function(){Se(pe,400)},P.ontimeout=function(){Se(pe,400)},P.send()}catch{}}function W(X,pe,Q){try{if(X>=200&&X<400&&pe){L=0;var P=qa();if(P){var Re=P.parse(pe),ft=VK(Re,fe.core),Mt=ft&&bi(ft)&&Ue(ft);Mt&&Pe(Mt,Q)}}else L++;L<3&&He()}catch{}}function Se(X,pe,Q,P){try{X(pe,Q,P)}catch{}}function te(){if(M){var X=Ta();if(X)try{vs(X,m,function(pe){var Q=pe&&pe.detail;if(w&&Q)w(Q);else{var P=Q&&Q.cfg,Re=P&&bi(P)&&Ue(P);Re&&Pe(Re)}},b,!0)}catch{}}}function Ue(X,pe){var Q=null;try{X&&(Q=aL(X,U,0,5))}catch{}return Q}function He(){!A&&F&&(A=Aa(function(){A=null,G(f,W,D)},F),A.unref())}function mt(){A&&A.cancel(),A=null,L=0}fe.processTelemetry=function(X,pe){fe.processNext(X,pe)}}),c}return s.__ieDyn=1,s}(tp),Yl="duration",Kr="tags",qT="deviceType",Ti="data",ws="name",fg="traceID",tn="length",gg="stringify",Jl="measurements",Ao="dataType",Ql="envelopeType",Zl="toString",mg="_get",ec="enqueue",tc="count",cL="eventsLimitInMem",xs="push",o1="item",GT="emitLineDelimitedJson",bp="clear",KT="createNew",s1="markAsSent",vg="clearSent",WT="bufferOverride",XT="BUFFER_KEY",Mu="SENT_BUFFER_KEY",wp="concat",yg="MAX_BUFFER_SIZE",bg="triggerSend",ii="diagLog",YT="initialize",wg="_sender",xg="endpointUrl",Sg="instrumentationKey",JT="customHeaders",dL="maxBatchSizeInBytes",QT="onunloadDisableBeacon",ZT="isBeaconApiDisabled",pL="alwaysUseXhrOverride",e3="disableXhr",hL="enableSessionStorageBuffer",_u="_buffer",fL="onunloadDisableFetch",gL="disableSendBeaconSplit",mL="enableSendPromise",u1="getSenderInst",vL="unloadTransports",yL="convertUndefined",bL="maxBatchInterval",l1="serialize",nc="_onError",t3="_onPartialSuccess",c1="_onSuccess",n3="itemsReceived",r3="itemsAccepted",i3="oriPayload",a3="baseType",d1="sampleRate",wL="eventsSendRequest",xL="getSamplingScore",WK="getHashCodeScore",o3="baseType",Hn="baseData",Or="properties",SL="true";function cr(o,s,c){return Ln(o,s,c,N0)}function XK(o,s,c){var h=c[Kr]=c[Kr]||{},d=s.ext=s.ext||{},m=s[Kr]=s[Kr]||[],b=d.user;b&&(cr(h,Fn.userAuthUserId,b.authId),cr(h,Fn.userId,b.id||b.localId));var f=d.app;f&&cr(h,Fn.sessionId,f.sesId);var A=d.device;A&&(cr(h,Fn.deviceId,A.id||A.localId),cr(h,Fn[qT],A.deviceClass),cr(h,Fn.deviceIp,A.ip),cr(h,Fn.deviceModel,A.model),cr(h,Fn[qT],A[qT]));var M=s.ext.web;if(M){cr(h,Fn.deviceLanguage,M.browserLang),cr(h,Fn.deviceBrowserVersion,M.browserVer),cr(h,Fn.deviceBrowser,M.browser);var D=c[Ti]=c[Ti]||{},N=D[Hn]=D[Hn]||{},F=N[Or]=N[Or]||{};cr(F,"domain",M.domain),cr(F,"isManual",M.isManual?SL:null),cr(F,"screenRes",M.screenRes),cr(F,"userConsent",M.userConsent?SL:null)}var L=d.os;L&&(cr(h,Fn.deviceOS,L[ws]),cr(h,Fn.deviceOSVersion,L.osVer));var w=d.trace;w&&(cr(h,Fn.operationParentId,w.parentID),cr(h,Fn.operationName,mr(o,w[ws])),cr(h,Fn.operationId,w[fg]));for(var U={},G=m[tn]-1;G>=0;G--){var Z=m[G];en(Z,function(ge,fe){U[ge]=fe}),m.splice(G,1)}en(m,function(ge,fe){U[ge]=fe});var ie=wi(wi({},h),U);ie[Fn.internalSdkVersion]||(ie[Fn.internalSdkVersion]=mr(o,"javascript:".concat(YK.Version),64)),c[Kr]=X6(ie)}function Du(o,s,c){_e(o)||en(o,function(h,d){kf(d)?c[h]=d:Dt(d)?s[h]=d:Vf()&&(s[h]=qa()[gg](d))})}function rc(o,s){_e(o)||en(o,function(c,h){o[c]=h||s})}function ic(o,s,c,h){var d=new hK(o,h,s);cr(d,"sampleRate",c[cP]),(c[Hn]||{}).startTime&&(d.time=Xd(c[Hn].startTime)),d.iKey=c.iKey;var m=c.iKey.replace(/-/g,"");return d[ws]=d[ws].replace("{0}",m),XK(o,c,d),c[Kr]=c[Kr]||[],X6(d)}function ac(o,s){_e(s[Hn])&&je(o,1,46,"telemetryItem.baseData cannot be null.")}var YK={Version:"3.3.3"};function JK(o,s,c){ac(o,s);var h=s[Hn][Jl]||{},d=s[Hn][Or]||{};Du(s[Ti],d,h),_e(c)||rc(d,c);var m=s[Hn];if(_e(m))return Rl(o,"Invalid input for dependency data"),null;var b=m[Or]&&m[Or][dP]?m[Or][dP]:"GET",f=new Hl(o,m.id,m.target,m[ws],m[Yl],m.success,m.responseCode,b,m.type,m.correlationContext,d,h),A=new ql(Hl[Ao],f);return ic(o,Hl[Ql],s,A)}function kL(o,s,c){ac(o,s);var h={},d={};s[o3]!==Su[Ao]&&(h.baseTypeSource=s[o3]),s[o3]===Su[Ao]?(h=s[Hn][Or]||{},d=s[Hn][Jl]||{}):s[Hn]&&Du(s[Hn],h,d),Du(s[Ti],h,d),_e(c)||rc(h,c);var m=s[Hn][ws],b=new Su(o,m,h,d),f=new ql(Su[Ao],b);return ic(o,Su[Ql],s,f)}function QK(o,s,c){ac(o,s);var h=s[Hn][Jl]||{},d=s[Hn][Or]||{};Du(s[Ti],d,h),_e(c)||rc(d,c);var m=s[Hn],b=Ia.CreateFromInterface(o,m,d,h),f=new ql(Ia[Ao],b);return ic(o,Ia[Ql],s,f)}function ZK(o,s,c){ac(o,s);var h=s[Hn],d=h[Or]||{},m=h[Jl]||{};Du(s[Ti],d,m),_e(c)||rc(d,c);var b=new zl(o,h[ws],h.average,h.sampleCount,h.min,h.max,h.stdDev,d,m),f=new ql(zl[Ao],b);return ic(o,zl[Ql],s,f)}function eW(o,s,c){ac(o,s);var h,d=s[Hn];!_e(d)&&!_e(d[Or])&&!_e(d[Or][Yl])?(h=d[Or][Yl],delete d[Or][Yl]):!_e(s[Ti])&&!_e(s[Ti][Yl])&&(h=s[Ti][Yl],delete s[Ti][Yl]);var m=s[Hn],b;((s.ext||{}).trace||{})[fg]&&(b=s.ext.trace[fg]);var f=m.id||b,A=m[ws],M=m.uri,D=m[Or]||{},N=m[Jl]||{};if(_e(m.refUri)||(D.refUri=m.refUri),_e(m.pageType)||(D.pageType=m.pageType),_e(m.isLoggedIn)||(D.isLoggedIn=m.isLoggedIn[Zl]()),!_e(m[Or])){var F=m[Or];en(F,function(U,G){D[U]=G})}Du(s[Ti],D,N),_e(c)||rc(D,c);var L=new Tu(o,A,M,h,D,N,f),w=new ql(Tu[Ao],L);return ic(o,Tu[Ql],s,w)}function tW(o,s,c){ac(o,s);var h=s[Hn],d=h[ws],m=h.uri||h.url,b=h[Or]||{},f=h[Jl]||{};Du(s[Ti],b,f),_e(c)||rc(b,c);var A=new hp(o,d,m,void 0,b,f,h),M=new ql(hp[Ao],A);return ic(o,hp[Ql],s,M)}function nW(o,s,c){ac(o,s);var h=s[Hn].message,d=s[Hn].severityLevel,m=s[Hn][Or]||{},b=s[Hn][Jl]||{};Du(s[Ti],m,b),_e(c)||rc(m,c);var f=new pp(o,h,d,m,b),A=new ql(pp[Ao],f);return ic(o,pp[Ql],s,A)}var TL=function(){function o(s,c){var h=[],d=!1,m=c.maxRetryCnt;this[mg]=function(){return h},this._set=function(b){return h=b,h},Un(o,this,function(b){b[ec]=function(f){if(b[tc]()>=c[cL]){d||(je(s,2,105,"Maximum in-memory buffer size reached: "+b[tc](),!0),d=!0);return}f.cnt=f.cnt||0,!(!_e(m)&&f.cnt>m)&&h[xs](f)},b[tc]=function(){return h[tn]},b.size=function(){for(var f=h[tn],A=0;A<h[tn];A++)f+=h[A].item[tn];return c[GT]||(f+=2),f},b[bp]=function(){h=[],d=!1},b.getItems=function(){return h.slice(0)},b.batchPayloads=function(f){if(f&&f[tn]>0){var A=[];rt(f,function(D){A[xs](D[o1])});var M=c[GT]?A.join(`
`):"["+A.join(",")+"]";return M}return null},b[KT]=function(f,A,M){var D=h.slice(0);f=f||s,A=A||{};var N=M?new AL(f,A):new s3(f,A);return rt(D,function(F){N[ec](F)}),N}})}return o.__ieDyn=1,o}(),s3=function(o){ds(s,o);function s(c,h){var d=o.call(this,c,h)||this;return Un(s,d,function(m,b){m[s1]=function(f){b[bp]()},m[vg]=function(f){}}),d}return s.__ieDyn=1,s}(TL),rW=["AI_buffer","AI_sentBuffer"],AL=function(o){ds(s,o);function s(h,d){var m=o.call(this,h,d)||this,b=!1,f=d?.namePrefix,A=d[WT]||{getItem:TT,setItem:CP},M=A.getItem,D=A.setItem,N=d.maxRetryCnt;return Un(s,m,function(F,L){var w=fe(s[XT]),U=fe(s[Mu]),G=re(),Z=U[wp](G),ie=F._set(w[wp](Z));ie[tn]>s[yg]&&(ie[tn]=s[yg]),Te(s[Mu],[]),Te(s[XT],ie),F[ec]=function(ke){if(F[tc]()>=s[yg]){b||(je(h,2,67,"Maximum buffer size reached: "+F[tc](),!0),b=!0);return}ke.cnt=ke.cnt||0,!(!_e(N)&&ke.cnt>N)&&(L[ec](ke),Te(s.BUFFER_KEY,F[mg]()))},F[bp]=function(){L[bp](),Te(s.BUFFER_KEY,F[mg]()),Te(s[Mu],[]),b=!1},F[s1]=function(ke){Te(s[XT],F._set(ge(ke,F[mg]())));var T=fe(s[Mu]);T instanceof Array&&ke instanceof Array&&(T=T[wp](ke),T[tn]>s[yg]&&(je(h,1,67,"Sent buffer reached its maximum size: "+T[tn],!0),T[tn]=s[yg]),Te(s[Mu],T))},F[vg]=function(ke){var T=fe(s[Mu]);T=ge(ke,T),Te(s[Mu],T)},F[KT]=function(ke,T,oe){oe=!!oe;var ve=F[mg]().slice(0),be=fe(s[Mu]).slice(0);ke=ke||h,T=T||{},F[bp]();var V=oe?new s(ke,T):new s3(ke,T);return rt(ve,function(W){V[ec](W)}),oe&&V[s1](be),V};function ge(ke,T){var oe=[],ve=[];return rt(ke,function(be){ve[xs](be[o1])}),rt(T,function(be){!Bt(be)&&ni(ve,be[o1])===-1&&oe[xs](be)}),oe}function fe(ke){var T=ke;return T=f?f+"_"+T:T,Me(T)}function Me(ke){try{var T=M(h,ke);if(T){var oe=qa().parse(T);if(Dt(oe)&&(oe=qa().parse(oe)),oe&&Yt(oe))return oe}}catch(ve){je(h,1,42," storage key: "+ke+", "+wn(ve),{exception:it(ve)})}return[]}function Te(ke,T){var oe=ke;try{oe=f?f+"_"+oe:oe;var ve=JSON[gg](T);D(h,oe,ve)}catch(be){D(h,oe,JSON[gg]([])),je(h,2,41," storage key: "+oe+", "+wn(be)+". Buffer cleared",{exception:it(be)})}}function re(){var ke=[];try{return rt(rW,function(T){var oe=Pe(T);if(ke=ke[wp](oe),f){var ve=f+"_"+T,be=Pe(ve);ke=ke[wp](be)}}),ke}catch(T){je(h,2,41,"Transfer events from previous buffers: "+wn(T)+". previous Buffer items can not be removed",{exception:it(T)})}return[]}function Pe(ke){try{var T=Me(ke),oe=[];return rt(T,function(ve){var be={item:ve,cnt:0};oe[xs](be)}),IP(h,ke),oe}catch{}return[]}}),m}var c;return c=s,s.VERSION="_1",s.BUFFER_KEY="AI_buffer"+c.VERSION,s.SENT_BUFFER_KEY="AI_sentBuffer"+c.VERSION,s.MAX_BUFFER_SIZE=2e3,s}(TL),iW=function(){function o(s){Un(o,this,function(c){c[l1]=function(b){var f=h(b,"root");try{return qa()[gg](f)}catch(A){je(s,1,48,A&&Bt(A[Zl])?A[Zl]():"Error serializing object",null,!0)}};function h(b,f){var A="__aiCircularRefCheck",M={};if(!b)return je(s,1,48,"cannot serialize object because it is null or undefined",{name:f},!0),M;if(b[A])return je(s,2,50,"Circular reference detected while serializing object",{name:f},!0),M;if(!b.aiDataContract){if(f==="measurements")M=m(b,"number",f);else if(f==="properties")M=m(b,"string",f);else if(f==="tags")M=m(b,"string",f);else if(Yt(b))M=d(b,f);else{je(s,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:f},!0);try{qa()[gg](b),M=b}catch(D){je(s,1,48,D&&Bt(D[Zl])?D[Zl]():"Error serializing object",null,!0)}}return M}return b[A]=!0,en(b.aiDataContract,function(D,N){var F=Bt(N)?N()&1:N&1,L=Bt(N)?N()&4:N&4,w=N&2,U=b[D]!==void 0,G=ji(b[D])&&b[D]!==null;if(F&&!U&&!w)je(s,1,24,"Missing required field specification. The field is required but not present on source",{field:D,name:f});else if(!L){var Z=void 0;G?w?Z=d(b[D],D):Z=h(b[D],D):Z=b[D],Z!==void 0&&(M[D]=Z)}}),delete b[A],M}function d(b,f){var A;if(b)if(!Yt(b))je(s,1,54,`This field was specified as an array in the contract but the item is not an array.\r
`,{name:f},!0);else{A=[];for(var M=0;M<b[tn];M++){var D=b[M],N=h(D,f+"["+M+"]");A[xs](N)}}return A}function m(b,f,A){var M;return b&&(M={},en(b,function(D,N){if(f==="string")N===void 0?M[D]="undefined":N===null?M[D]="null":N[Zl]?M[D]=N[Zl]():M[D]="invalid field: toString() is not defined.";else if(f==="number")if(N===void 0)M[D]="undefined";else if(N===null)M[D]="null";else{var F=parseFloat(N);M[D]=F}else M[D]="invalid field: "+A+" is of unknown type.",je(s,1,M[D],null,!0)})),M}})}return o.__ieDyn=1,o}(),aW=8,oW=function(){function o(){}return o.prototype.getHashCodeScore=function(s){var c=this.getHashCode(s)/o.INT_MAX_VALUE;return c*100},o.prototype.getHashCode=function(s){if(s==="")return 0;for(;s[tn]<aW;)s=s[wp](s);for(var c=5381,h=0;h<s[tn];++h)c=(c<<5)+c+s.charCodeAt(h),c=c&c;return Math.abs(c)},o.INT_MAX_VALUE=2147483647,o}(),sW=function(){function o(){var s=this,c=new oW,h=new OP;s[xL]=function(d){var m=0;return d[Kr]&&d[Kr][h.userId]?m=c.getHashCodeScore(d[Kr][h.userId]):d.ext&&d.ext.user&&d.ext.user.id?m=c[WK](d.ext.user.id):d[Kr]&&d[Kr][h.operationId]?m=c.getHashCodeScore(d[Kr][h.operationId]):d.ext&&d.ext.telemetryTrace&&d.ext.telemetryTrace[fg]?m=c.getHashCodeScore(d.ext.telemetryTrace[fg]):m=Math.random()*100,m}}return o}(),uW=function(){function o(s,c){this.INT_MAX_VALUE=2147483647;var h=c||Ll(null);(s>100||s<0)&&(h.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:s},!0),s=100),this[d1]=s,this.samplingScoreGenerator=new sW}return o.prototype.isSampledIn=function(s){var c=this[d1],h=!1;return c==null||c>=100||s.baseType===zl[Ao]?!0:(h=this.samplingScoreGenerator[xL](s)<c,h)},o}(),$n,Ss,Eo=void 0,EL="",lW=65e3;function CL(o){try{return o.responseText}catch{}return null}function cW(o){return o&&o.sendPOST}var IL=_d(($n={endpointUrl:Ay(N0,sT+rp)},$n[GT]=gr(),$n[bL]=15e3,$n[dL]=102400,$n.disableTelemetry=gr(),$n[hL]=gr(!0),$n.isRetryDisabled=gr(),$n[ZT]=gr(!0),$n[gL]=gr(!0),$n[e3]=gr(),$n[fL]=gr(),$n[QT]=gr(),$n[Sg]=Eo,$n.namePrefix=Eo,$n.samplingPercentage=Ay(dW,100),$n[JT]=Eo,$n[yL]=Eo,$n[cL]=1e4,$n[WT]=!1,$n.httpXHROverride={isVal:cW,v:Eo},$n[pL]=gr(),$n.transports=Eo,$n.retryCodes=Eo,$n.maxRetryCnt={isVal:kf,v:10},$n));function dW(o){return!isNaN(o)&&o>0&&o<=100}var pW=(Ss={},Ss[Su.dataType]=kL,Ss[pp.dataType]=nW,Ss[Tu.dataType]=eW,Ss[hp.dataType]=tW,Ss[Ia.dataType]=QK,Ss[zl.dataType]=ZK,Ss[Hl.dataType]=JK,Ss),hW=function(o){ds(s,o);function s(){var c=o.call(this)||this;c.priority=1001,c.identifier=FP;var h,d,m,b,f,A,M,D,N=0,F,L,w,U,G,Z,ie,ge,fe,Me,Te,re,Pe,ke,T,oe,ve,be,V,W,Se,te,Ue,He,mt,X,pe;return Un(s,c,function(Q,P){Io(),Q.pause=function(){rn(),b=!0},Q.resume=function(){b&&(b=!1,d=null,de(),zt())},Q.flush=function(ee,ye,qe){if(ee===void 0&&(ee=!0),!b){rn();try{return Q[bg](ee,null,qe||1)}catch(Xe){je(Q[ii](),1,22,"flush failed, telemetry will not be collected: "+wn(Xe),{exception:it(Xe)})}}},Q.onunloadFlush=function(){if(!b)if(ie||W)try{return Q[bg](!0,Ie,2)}catch(ee){je(Q[ii](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+wn(ee),{exception:it(ee)})}else Q.flush(!1)},Q.addHeader=function(ee,ye){D[ee]=ye},Q[YT]=function(ee,ye,qe,Xe){Q.isInitialized()&&je(Q[ii](),1,28,"Sender is already initialized"),P[YT](ee,ye,qe,Xe);var kt=Q.identifier;A=new iW(ye.logger),h=0,d=null,m=0,Q[wg]=null,M=0;var bt=Q[ii]();w=yu(Ea("Sender"),ye.evtNamespace&&ye.evtNamespace()),L=SK(w),Q._addHook(lr(ee,function(Lt){var _n=Lt.cfg;_n.storagePrefix&&kT(_n.storagePrefix);var si=Ka(null,_n,ye),Ft=si.getExtCfg(kt,IL);as(Ft[xg])&&(Ft[xg]=_n[xg]),as(Ft[Sg])&&(Ft[Sg]=_n[Sg]),mn(Q,"_senderConfig",{g:function(){return Ft}}),G!==Ft[xg]&&(U=G=Ft[xg]),ye.activeStatus()===su.PENDING?Q.pause():ye.activeStatus()===su.ACTIVE&&Q.resume(),Me&&Me!==Ft[JT]&&rt(Me,function(pn){delete D[pn.header]}),Z=Ft[dL],ie=(Ft[QT]===!1||Ft[ZT]===!1)&&$f(),ge=Ft[QT]===!1&&$f(),fe=Ft[ZT]===!1&&$f(),W=Ft[pL],Se=!!Ft[e3],pe=Ft.retryCodes;var Op=Ft[WT],As=!!Ft[hL]&&(!!Op||ng()),Vg=Ft.namePrefix,Es=As!==oe||As&&be!==Vg||As&&ve!==Op;if(Q[_u]){if(Es)try{Q._buffer=Q._buffer[KT](bt,Ft,As)}catch(pn){je(Q[ii](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+wn(pn),{exception:it(pn)})}de()}else Q[_u]=As?new AL(bt,Ft):new s3(bt,Ft);be=Vg,oe=As,ve=Op,te=!Ft[fL]&&Sk(!0),mt=!!Ft[gL],Q._sample=new uW(Ft.samplingPercentage,bt),re=Ft[Sg],!as(re)&&!Ur(re,_n)&&je(bt,1,100,"Invalid Instrumentation key "+re),Me=Ft[JT],Dt(U)&&!bT(U)&&Me&&Me[tn]>0?rt(Me,function(pn){c.addHeader(pn.header,pn.value)}):Me=null,V=Ft[mL];var Ou=ft();X?X.SetConfig(Ou):(X=new LG,X[YT](Ou,bt));var Uu=Ft.httpXHROverride,Pa=null,ui=null,li=Q6([3,1,2],Ft.transports);Pa=X&&X[u1](li,!1);var Ye=X&&X.getFallbackInst();Ue=function(pn,La){return at(Ye,pn,La)},He=function(pn,La){return at(Ye,pn,La,!1)},Pa=W?Uu:Pa||Uu||Ye,Q[wg]=function(pn,La){return at(Pa,pn,La)},te&&(F=yt);var bc=Q6([3,1],Ft[vL]);te||(bc=bc.filter(function(pn){return pn!==2})),ui=X&&X[u1](bc,!0),ui=W?Uu:ui||Uu,(W||Ft[vL]||!F)&&ui&&(F=function(pn,La){return at(ui,pn,La)}),F||(F=Ue),Te=Ft.disableTelemetry,Pe=Ft[yL]||Eo,ke=Ft.isRetryDisabled,T=Ft[bL]}))},Q.processTelemetry=function(ee,ye){var qe;ye=Q._getTelCtx(ye);var Xe=ye[ii]();try{var kt=Ee(ee,Xe);if(!kt)return;var bt=In(ee,Xe);if(!bt)return;var Lt=A[l1](bt),_n=Q[_u];de(Lt);var si=(qe={},qe[o1]=Lt,qe.cnt=0,qe);_n[ec](si),zt()}catch(Ft){je(Xe,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+wn(Ft),{exception:it(Ft)})}Q.processNext(ee,ye)},Q.isCompletelyIdle=function(){return!b&&N===0&&Q._buffer[tc]()===0},Q._xhrReadyStateChange=function(ee,ye,qe){if(!Ce(ye))return Mt(ee,ye,qe)},Q[bg]=function(ee,ye,qe){ee===void 0&&(ee=!0);var Xe;if(!b)try{var kt=Q[_u];if(Te)kt[bp]();else{if(kt[tc]()>0){var bt=kt.getItems();ua(qe||0,ee),ye?Xe=ye.call(Q,bt,ee):Xe=Q[wg](bt,ee)}m=+new Date}rn()}catch(_n){var Lt=rD();(!Lt||Lt>9)&&je(Q[ii](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+wn(_n),{exception:it(_n)})}return Xe},Q.getOfflineSupport=function(){var ee;return ee={getUrl:function(){return U},createPayload:$e},ee[l1]=rr,ee.batch=me,ee.shouldProcess=function(ye){return!!Ee(ye)},ee},Q._doTeardown=function(ee,ye){Q.onunloadFlush(),Jd(L,!1),Io()},Q[nc]=function(ee,ye,qe){if(!Ce(ee))return Ot(ee,ye)},Q[t3]=function(ee,ye){if(!Ce(ee))return sn(ee,ye)},Q[c1]=function(ee,ye){if(!Ce(ee))return Ai(ee)},Q._xdrOnLoad=function(ee,ye){if(!Ce(ye))return Re(ee,ye)};function Re(ee,ye){var qe=CL(ee);if(ee&&(qe+""=="200"||qe===""))h=0,Q[c1](ye,0);else{var Xe=Xk(qe);Xe&&Xe[n3]&&Xe[n3]>Xe[r3]&&!ke?Q[t3](ye,Xe):Q[nc](ye,J6(ee))}}function ft(){var ee;try{var ye={xdrOnComplete:function(Xe,kt,bt){var Lt=oi(bt);if(Lt)return Re(Xe,Lt)},fetchOnComplete:function(Xe,kt,bt,Lt){var _n=oi(Lt);if(_n)return we(Xe.status,_n,Xe.url,_n[tn],Xe.statusText,bt||"")},xhrOnComplete:function(Xe,kt,bt){var Lt=oi(bt);if(Lt)return Mt(Xe,Lt,Lt[tn])},beaconOnRetry:function(Xe,kt,bt){return Ne(Xe,kt,bt)}},qe=(ee={},ee[mL]=V,ee.isOneDs=!1,ee.disableCredentials=!1,ee[e3]=Se,ee.disableBeacon=!fe,ee.disableBeaconSync=!ge,ee.senderOnCompleteCallBack=ye,ee);return qe}catch{}return null}function Mt(ee,ye,qe){ee.readyState===4&&we(ee.status,ye,ee.responseURL,qe,by(ee),CL(ee)||ee.response)}function Ot(ee,ye,qe){je(Q[ii](),2,26,"Failed to send telemetry.",{message:ye}),Q._buffer&&Q._buffer[vg](ee)}function sn(ee,ye){for(var qe=[],Xe=[],kt=ye.errors.reverse(),bt=0,Lt=kt;bt<Lt.length;bt++){var _n=Lt[bt],si=ee.splice(_n.index,1)[0];ut(_n.statusCode)?Xe[xs](si):qe[xs](si)}ee[tn]>0&&Q[c1](ee,ye[r3]),qe[tn]>0&&Q[nc](qe,by(null,["partial success",ye[r3],"of",ye.itemsReceived].join(" "))),Xe[tn]>0&&(Ut(Xe),je(Q[ii](),2,40,"Partial success. Delivered: "+ee[tn]+", Failed: "+qe[tn]+". Will retry to send "+Xe[tn]+" our of "+ye[n3]+" items"))}function Ai(ee,ye){Q._buffer&&Q._buffer[vg](ee)}function oi(ee){try{if(ee){var ye=ee,qe=ye[i3];return qe&&qe[tn]?qe:null}}catch{}return null}function Ee(ee,ye){if(Te)return!1;if(!ee)return ye&&je(ye,1,7,"Cannot send empty telemetry"),!1;if(ee.baseData&&!ee[a3])return ye&&je(ye,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(ee[a3]||(ee[a3]="EventData"),!Q[wg])return ye&&je(ye,1,28,"Sender was not initialized"),!1;if(ct(ee))ee[cP]=Q._sample[d1];else return ye&&je(ye,2,33,"Telemetry item was sampled out and not sent",{SampleRate:Q._sample[d1]}),!1;return!0}function In(ee,ye){var qe=ee.iKey||re,Xe=s.constructEnvelope(ee,qe,ye,Pe);if(!Xe){je(ye,1,47,"Unable to create an AppInsights envelope");return}var kt=!1;if(ee[Kr]&&ee[Kr][oT]&&(rt(ee[Kr][oT],function(bt){try{bt&&bt(Xe)===!1&&(kt=!0,Rl(ye,"Telemetry processor check returns false"))}catch(Lt){je(ye,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+wn(Lt),{exception:it(Lt)},!0)}}),delete ee[Kr][oT]),!kt)return Xe}function rr(ee){var ye=EL,qe=Q[ii]();try{var Xe=Ee(ee,qe),kt=null;Xe&&(kt=In(ee,qe)),kt&&(ye=A[l1](kt))}catch{}return ye}function me(ee){var ye=EL;return ee&&ee[tn]&&(ye="["+ee.join(",")+"]"),ye}function $e(ee){var ye,qe=$t();return ye={urlString:U},ye[Ti]=ee,ye.headers=qe,ye}function ct(ee){return Q._sample.isSampledIn(ee)}function dt(ee,ye,qe,Xe){ye===200&&ee?Q._onSuccess(ee,ee[tn]):Xe&&Q[nc](ee,Xe)}function at(ee,ye,qe,Xe){Xe===void 0&&(Xe=!0);var kt=function(_n,si,Ft){return dt(ye,_n,si,Ft)},bt=Be(ye),Lt=ee&&ee.sendPOST;return Lt&&bt?(Xe&&Q._buffer[s1](ye),Lt(bt,kt,!qe)):null}function Be(ee){var ye;if(Yt(ee)&&ee[tn]>0){var qe=Q[_u].batchPayloads(ee),Xe=$t(),kt=(ye={},ye[Ti]=qe,ye.urlString=U,ye.headers=Xe,ye.disableXhrSync=Se,ye.disableFetchKeepAlive=!te,ye[i3]=ee,ye);return kt}return null}function $t(){try{var ee=D||{};return bT(U)&&(ee[Mn[6]]=Mn[7]),ee}catch{}return null}function de(ee){var ye=ee?ee[tn]:0;return Q[_u].size()+ye>Z?((!L||L.isOnline())&&Q[bg](!0,null,10),!0):!1}function we(ee,ye,qe,Xe,kt,bt){var Lt=null;if(Q._appId||(Lt=Xk(bt),Lt&&Lt.appId&&(Q._appId=Lt.appId)),(ee<200||ee>=300)&&ee!==0){if((ee===301||ee===307||ee===308)&&!De(qe)){Q[nc](ye,kt);return}if(L&&!L.isOnline()){if(!ke){var _n=10;Ut(ye,_n),je(Q[ii](),2,40,". Offline - Response Code: ".concat(ee,". Offline status: ").concat(!L.isOnline(),". Will retry to send ").concat(ye.length," items."))}return}!ke&&ut(ee)?(Ut(ye),je(Q[ii](),2,40,". Response code "+ee+". Will retry to send "+ye[tn]+" items.")):Q[nc](ye,kt)}else De(qe),ee===206?(Lt||(Lt=Xk(bt)),Lt&&!ke?Q[t3](ye,Lt):Q[nc](ye,kt)):(h=0,Q[c1](ye,Xe))}function De(ee){return M>=10?!1:!_e(ee)&&ee!==""&&ee!==U?(U=ee,++M,!0):!1}function Ie(ee,ye){if(F)F(ee,!1);else{var qe=X&&X[u1]([3],!0);return at(qe,ee,ye)}}function Ne(ee,ye,qe){var Xe=ee,kt=Xe&&Xe[i3];if(mt)He&&He(kt,!0),je(Q[ii](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var bt=[],Lt=0;Lt<kt[tn];Lt++){var _n=kt[Lt],si=[_n],Ft=Be(si);qe(Ft,ye)?Q._onSuccess(si,si[tn]):bt[xs](_n)}bt[tn]>0&&(He&&He(bt,!0),je(Q[ii](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function Ce(ee){try{if(ee&&ee[tn])return Dt(ee[0])}catch{}return null}function yt(ee,ye){var qe=null;if(Yt(ee)){for(var Xe=ee[tn],kt=0;kt<ee[tn];kt++)Xe+=ee[kt].item[tn];var bt=X.getSyncFetchPayload();bt+Xe<=lW?qe=2:$f()?qe=3:(qe=1,je(Q[ii](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var Lt=X&&X[u1]([qe],!0);return at(Lt,ee,ye)}return null}function Ut(ee,ye){if(ye===void 0&&(ye=1),!(!ee||ee[tn]===0)){var qe=Q[_u];qe[vg](ee),h++;for(var Xe=0,kt=ee;Xe<kt.length;Xe++){var bt=kt[Xe];bt.cnt=bt.cnt||0,bt.cnt++,qe[ec](bt)}Ct(ye),zt()}}function Ct(ee){var ye=10,qe;if(h<=1)qe=ye;else{var Xe=(Math.pow(2,h)-1)/2,kt=Math.floor(Math.random()*Xe*ye)+1;kt=ee*kt,qe=Math.max(Math.min(kt,3600),ye)}var bt=po()+qe*1e3;d=bt}function zt(){if(!f&&!b){var ee=d?Math.max(0,d-po()):0,ye=Math.max(T,ee);f=Aa(function(){f=null,Q[bg](!0,null,1)},ye)}}function rn(){f&&f.cancel(),f=null,d=null}function ut(ee){return _e(pe)?ee===401||ee===408||ee===429||ee===500||ee===502||ee===503||ee===504:pe[tn]&&pe.indexOf(ee)>-1}function Ei(){var ee="getNotifyMgr";return Q.core[ee]?Q.core[ee]():Q.core._notificationManager}function ua(ee,ye){var qe=Ei();if(qe&&qe[wL])try{qe[wL](ee,ye)}catch(Xe){je(Q[ii](),1,74,"send request notification failed: "+wn(Xe),{exception:it(Xe)})}}function Ur(ee,ye){var qe=ye.disableInstrumentationKeyValidation,Xe=_e(qe)?!1:qe;if(Xe)return!0;var kt="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",bt=new RegExp(kt);return bt.test(ee)}function Io(){Q[wg]=null,Q[_u]=null,Q._appId=null,Q._sample=null,D={},L=null,h=0,d=null,m=null,b=!1,f=null,A=null,M=0,N=0,F=null,w=null,U=null,G=null,Z=0,ie=!1,Me=null,Te=!1,re=null,Pe=Eo,ke=!1,oe=null,be=Eo,Se=!1,te=!1,mt=!1,Ue=null,He=null,X=null,mn(Q,"_senderConfig",{g:function(){return Y6({},IL)}})}}),c}return s.constructEnvelope=function(c,h,d,m){var b;h!==c.iKey&&!_e(h)?b=wi(wi({},c),{iKey:h}):b=c;var f=pW[b.baseType]||kL;return f(d,b,m)},s}(tp),ML="duration",oc="properties",Ya="requestUrl",kg="inst",sc="length",ks="traceID",Pu="spanID",Ma="traceFlags",Tg="context",xp="aborted",p1="traceId",h1="spanId",f1="_addHook",Ja="core",u3="includeCorrelationHeaders",l3="getAbsoluteUrl",uc="headers",_a="requestHeaders",c3="setRequestHeader",_L="trackDependencyDataInternal",lc="startTime",Sp="toLowerCase",d3="enableRequestHeaderTracking",DL="enableAjaxErrorStatusText",PL="enableAjaxPerfTracking",LL="maxAjaxCallsPerView",RL="excludeRequestFromAutoTrackingPatterns",NL="addRequestContext",p3="disableAjaxTracking",OL="ajaxPerfLookupDelay",UL="disableFetchTracking",FL="enableResponseHeaderTracking",Qa="status",cc="statusText",kp="headerMap",h3="openDone",f3="sendDone",dc="requestSentTime",g3="abortDone",m3="getTraceId",v3="getTraceFlags",Lu="method",y3="errorStatusText",jL="stateChangeAttached",BL="responseText",Ag="responseFinishedTime",b3="CreateTrackItem",VL="response",$L="getAllResponseHeaders",w3="getPartAProps",g1="perfMark",Tp="name",x3="perfTiming",Eg="exception",zL="ajaxDiagnosticsMessage",S3="correlationContext",k3="ajaxTotalDuration",T3="eventTraceCtx";function HL(o,s,c){var h=0,d=o[s],m=o[c];return d&&m&&(h=$i(d,m)),h}function pc(o,s,c,h,d){var m=0,b=HL(c,h,d);return b&&(m=Ru(o,s,ku(b))),m}function Ru(o,s,c){var h="ajaxPerf",d=0;if(o&&s&&c){var m=o[h]=o[h]||{};m[s]=c,d=1}return d}function fW(o,s){var c=o[x3],h=s[oc]||{},d=0,m="name",b="Start",f="End",A="domainLookup",M="connect",D="redirect",N="request",F="response",L="startTime",w=A+b,U=A+f,G=M+b,Z=M+f,ie=N+b,ge=N+f,fe=F+b,Me=F+f,Te=D+b,re=D=f,Pe="transferSize",ke="encodedBodySize",T="decodedBodySize",oe="serverTiming";if(c){d|=pc(h,D,c,Te,re),d|=pc(h,A,c,w,U),d|=pc(h,M,c,G,Z),d|=pc(h,N,c,ie,ge),d|=pc(h,F,c,fe,Me),d|=pc(h,"networkConnect",c,L,Z),d|=pc(h,"sentRequest",c,ie,Me);var ve=c[ML];ve||(ve=HL(c,L,Me)||0),d|=Ru(h,ML,ve),d|=Ru(h,"perfTotal",ve);var be=c[oe];if(be){var V={};rt(be,function(W,Se){var te=my(W[m]||""+Se),Ue=V[te]||{};en(W,function(He,mt){(He!==m&&Dt(mt)||kf(mt))&&(Ue[He]&&(mt=Ue[He]+";"+mt),(mt||!Dt(mt))&&(Ue[He]=mt))}),V[te]=Ue}),d|=Ru(h,oe,V)}d|=Ru(h,Pe,c[Pe]),d|=Ru(h,ke,c[ke]),d|=Ru(h,T,c[T])}else o[g1]&&(d|=Ru(h,"missing",o.perfAttempts));d&&(s[oc]=h)}var gW=function(){function o(){var s=this;s[h3]=!1,s.setRequestHeaderDone=!1,s[f3]=!1,s[g3]=!1,s[jL]=!1}return o}(),qL=function(){function o(s,c,h,d){var m,b=this,f=h,A="responseText";b[g1]=null,b.completed=!1,b.requestHeadersSize=null,b[_a]=null,b.responseReceivingDuration=null,b.callbackDuration=null,b[k3]=null,b[xp]=0,b.pageUrl=null,b[Ya]=null,b.requestSize=0,b[Lu]=null,b[Qa]=null,b[dc]=null,b.responseStartedTime=null,b[Ag]=null,b.callbackFinishedTime=null,b.endTime=null,b.xhrMonitoringState=new gW,b.clientFailure=0,b[ks]=s,b[Pu]=c,b[Ma]=d?.getTraceFlags(),d?b[T3]=(m={},m[p1]=d[m3](),m[h1]=d.getSpanId(),m[Ma]=d[v3](),m):b[T3]=null,Un(o,b,function(M){M.getAbsoluteUrl=function(){return M[Ya]?ZG(M[Ya]):null},M.getPathName=function(){return M[Ya]?Gy(f,eK(M[Lu],M[Ya])):null},M[b3]=function(D,N,F){var L;if(M.ajaxTotalDuration=Math.round($i(M.requestSentTime,M.responseFinishedTime)*1e3)/1e3,M[k3]<0)return null;var w=(L={id:"|"+M[ks]+"."+M[Pu],target:M[l3]()},L[Tp]=M.getPathName(),L.type=D,L[lc]=null,L.duration=M[k3],L.success=+M[Qa]>=200&&+M[Qa]<400,L.responseCode=+M[Qa],L[oc]={HttpMethod:M[Lu]},L),U=w[oc];if(M[xp]&&(U[xp]=!0),M[dc]&&(w[lc]=new Date,w[lc].setTime(M[dc])),fW(M,w),N&&ss(M.requestHeaders)[sc]>0&&(U[_a]=M[_a]),F){var G=F();if(G){var Z=G[S3];if(Z&&(w.correlationContext=Z),G[kp]&&ss(G.headerMap)[sc]>0&&(U.responseHeaders=G[kp]),M[y3])if(M[Qa]>=400){var ie=G.type;(ie===""||ie==="text")&&(U.responseText=G.responseText?G[cc]+" - "+G[A]:G[cc]),ie==="json"&&(U.responseText=G.response?G[cc]+" - "+JSON.stringify(G[VL]):G[cc])}else M[Qa]===0&&(U.responseText=G[cc]||"")}}return w},M[w3]=function(){var D,N=null,F=M[T3];if(F&&(F[p1]||F[h1])){N={};var L=N[oa.TraceExt]=(D={},D[ks]=F[p1],D.parentID=F[h1],D);_e(F[Ma])||(L[Ma]=F[Ma])}return N}})}return o.__ieDyn=1,o}(),nr,Cg="diagLog",Nu="_ajaxData",hc="fetch",Ig="Failed to monitor XMLHttpRequest",GL=", monitoring data for this ajax call ",Ap=GL+"may be incorrect.",KL=GL+"won't be sent.",WL="Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",XL="Failed to add custom defined request context as configured call back may missing a null check.",YL="Failed to calculate the duration of the ",JL=0;function mW(){var o=Ta();return!o||_e(o.Request)||_e(o.Request[ho])||_e(o[hc])?null:o[hc]}function vW(o,s){var c,h,d=!1;if(wy()){var m=XMLHttpRequest[ho];d=!_e(m)&&!_e(m.open)&&!_e(m.send)&&!_e(m.abort)}var b=rD();if(b&&b<9&&(d=!1),d)try{var f=new XMLHttpRequest,A={xh:[],i:(c={},c[s]={},c)};f[Nu]=A;var M=XMLHttpRequest[ho].open;XMLHttpRequest[ho].open=M}catch(D){d=!1,Mg(o,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",(h={},h[Eg]=it(D),h))}return d}var Ep=function(o,s){return o&&s&&o[Nu]?(o[Nu].i||{})[s]:null},yW=function(o,s,c){if(o){var h=(o[Nu]||{}).xh;h&&h.push({n:s,v:c})}},A3=function(o,s){var c=!1;if(o){var h=(o[Nu]||{}).xh;h&&rt(h,function(d){if(d.n===s)return c=!0,-1})}return c};function m1(o,s){var c="";try{var h=Ep(o,s);h&&h[Ya]&&(c+="(url: '"+h[Ya]+"')")}catch{}return c}function Mg(o,s,c,h,d){je(o[Cg](),1,s,c,h,d)}function Ts(o,s,c,h,d){je(o[Cg](),2,s,c,h,d)}function _g(o,s,c){return function(h){var d;Mg(o,s,c,(d={ajaxDiagnosticsMessage:m1(h[kg],o._ajaxDataId)},d[Eg]=it(h.err),d))}}function Cp(o,s){return o&&s?Vi(o,s):-1}function QL(o,s,c){var h={id:s,fn:c};return o.push(h),{remove:function(){rt(o,function(d,m){if(d.id===h.id)return o.splice(m,1),-1})}}}function ZL(o,s,c,h){var d=!0;return rt(s,function(m,b){try{m.fn.call(null,c)===!1&&(d=!1)}catch(f){je(o&&o.logger,1,64,"Dependency "+h+" [#"+b+"] failed: "+wn(f),{exception:it(f)},!0)}}),d}function bW(o,s,c,h,d,m){var b,f=o[sc];if(f>0){var A=(b={},b[Ja]=s,b.xhr=h,b.input=d,b.init=m,b.traceId=c[ks],b.spanId=c[Pu],b.traceFlags=c[Ma],b.context=c[Tg]||{},b.aborted=!!c[xp],b);ZL(s,o,A,"listener"),c[ks]=A[p1],c[Pu]=A[h1],c[Ma]=A[Ma],c[Tg]=A[Tg]}}var v1="*.blob.core.",wW=us([v1+"windows.net",v1+"chinacloudapi.cn",v1+"cloudapi.de",v1+"usgovcloudapi.net"]),xW=[/https:\/\/[^\/]*(\.pipe\.aria|aria\.pipe|events\.data|collector\.azure)\.[^\/]+\/(OneCollector\/1|Collector\/3)\.0/i],SW=us((nr={},nr[LL]=500,nr[p3]=!1,nr[UL]=!1,nr[RL]=void 0,nr.disableCorrelationHeaders=!1,nr.distributedTracingMode=1,nr.correlationHeaderExcludedDomains=wW,nr.correlationHeaderDomains=void 0,nr.correlationHeaderExcludePatterns=void 0,nr.appId=void 0,nr.enableCorsCorrelation=!1,nr[d3]=!1,nr[FL]=!1,nr[DL]=!1,nr[PL]=!1,nr.maxAjaxPerfLookupAttempts=3,nr[OL]=25,nr.ignoreHeaders=["Authorization","X-API-Key","WWW-Authenticate"],nr[NL]=void 0,nr.addIntEndpoints=!0,nr)),kW=function(o){ds(s,o);function s(){var c=o.call(this)||this;c.identifier=s.identifier,c.priority=120;var h,d,m,b,f,A,M,D,N,F,L,w,U,G,Z,ie,ge,fe,Me,Te,re,Pe,ke,T,oe,ve,be,V,W,Se;return Un(s,c,function(te,Ue){var He=Ue[f1];mt(),te.initialize=function(de,we,De,Ie){te.isInitialized()||(Ue.initialize(de,we,De,Ie),Te=yu(Ea("ajax"),we&&we.evtNamespace&&we.evtNamespace()),X(de),ft(),P(),pe())},te._doTeardown=function(){mt()},te.trackDependencyData=function(de,we){$t(T,te[Ja],null,de,we)},te[u3]=function(de,we,De,Ie){var Ne=te._currentWindowHost||m;if(bW(ke,te[Ja],de,Ie,we,De),we||we===""){if(SP(b,de[l3](),Ne)){De||(De={});var Ce=new Headers(De[uc]||(we instanceof Request?we[uc]||{}:{}));if(F){var yt="|"+de[ks]+"."+de[Pu];Ce.set(Mn[3],yt),f&&(de[_a][Mn[3]]=yt)}var Ut=W||D&&D.appId();if(Ut&&(Ce.set(Mn[0],Mn[2]+Ut),f&&(de[_a][Mn[0]]=Mn[2]+Ut)),N){var Ct=de[Ma];_e(Ct)&&(Ct=1);var zt=UD(OD(de[ks],de[Pu],Ct));Ce.set(Mn[4],zt),f&&(de[_a][Mn[4]]=zt)}De[uc]=Ce}return De}else if(Ie){if(SP(b,de[l3](),Ne)){if(F)if(A3(Ie,Mn[3]))Ts(te,71,"Unable to set ["+Mn[3]+"] as it has already been set by another instance");else{var yt="|"+de[ks]+"."+de[Pu];Ie[c3](Mn[3],yt),f&&(de[_a][Mn[3]]=yt)}var Ut=W||D&&D.appId();if(Ut&&(A3(Ie,Mn[0])?Ts(te,71,"Unable to set ["+Mn[0]+"] as it has already been set by another instance"):(Ie[c3](Mn[0],Mn[2]+Ut),f&&(de[_a][Mn[0]]=Mn[2]+Ut))),N){var Ct=de[Ma];if(_e(Ct)&&(Ct=1),A3(Ie,Mn[4]))Ts(te,71,"Unable to set ["+Mn[4]+"] as it has already been set by another instance");else{var zt=UD(OD(de[ks],de[Pu],Ct));Ie[c3](Mn[4],zt),f&&(de[_a][Mn[4]]=zt)}}}return Ie}},te[_L]=function(de,we,De){if(U===-1||M<U){(V===2||V===1)&&typeof de.id=="string"&&de.id[de.id[sc]-1]!=="."&&(de.id+="."),_e(de[lc])&&(de[lc]=new Date);var Ie=Cu(de,Hl.dataType,Hl.envelopeType,te[Cg](),we,De);te[Ja].track(Ie)}else M===U&&Mg(te,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++M},te.addDependencyListener=function(de){return QL(ke,Pe++,de)},te.addDependencyInitializer=function(de){return QL(T,Pe++,de)};function mt(){var de=bo();h=!1,d=!1,Se=!1,m=de&&de.host&&de.host[Sp](),b=null,f=!1,A=!1,M=0,D=null,N=!1,F=!1,L=null,w=!1,U=0,G=!1,Z={},ie=!1,ge=!1,fe=null,Me=null,Te=null,Pe=0,ke=[],T=[],re=Ea("ajaxData"),te._ajaxDataId=re,oe=null,ve=1,be=1,V=1,W=null}function X(de){te[f1](lr(de,function(we){var De=we.cfg,Ie=Ka(null,De,te[Ja]);b=Ie.getExtCfg(s.identifier,SW),V=b.distributedTracingMode,f=b[d3],A=b[DL],w=b[PL],U=b[LL],fe=[].concat(b[RL]||[],b.addIntEndpoints!==!1?xW:[]),Me=b[NL],F=V===0||V===1,N=V===1||V===2,w&&(L=re),ie=!!b[p3],ve=b.maxAjaxPerfLookupAttempts,be=b[OL],oe=b.ignoreHeaders,W=b.appId}))}function pe(){var de=te[Ja].getPlugin(Qy);de&&(D=de.plugin[Tg])}function Q(de){var we=!0;return(de||oe)&&rt(oe,function(De){if(De[Sp]()===de[Sp]())return we=!1,-1}),we}function P(){var de=mW();if(de){var we=Ta(),De=de.polyfill;te[f1](lr(b,function(){ge=!!b[UL],G=b[FL],!ge&&!h?(He(aT(we,hc,{ns:Te,req:function(Ie,Ne,Ce){var yt;if(!ge&&h&&!Mt(null,Ne,Ce)&&!(De&&d)){var Ut=Ie.ctx();yt=ct(Ne,Ce);var Ct=te[u3](yt,Ne,Ce);Ct!==Ce&&Ie.set(1,Ct),Ut.data=yt}},rsp:function(Ie,Ne){if(!ge){var Ce=Ie.ctx().data;Ce&&(Ie.rslt=Ie.rslt.then(function(yt){return at(Ie,(yt||{})[Qa],Ne,yt,Ce,function(){var Ut,Ct=(Ut={statusText:(yt||{})[cc]},Ut[kp]=null,Ut[S3]=Be(yt),Ut);if(G&&yt){var zt={};yt.headers.forEach(function(rn,ut){Q(ut)&&(zt[ut]=rn)}),Ct[kp]=zt}return Ct}),yt}).catch(function(yt){throw at(Ie,0,Ne,null,Ce,null,{error:yt.message||it(yt)}),yt}))}},hkErr:_g(te,15,"Failed to monitor Window.fetch"+Ap)},!0,n6())),h=!0):De&&!Se&&(He(aT(we,hc,{ns:Te,req:function(Ie,Ne,Ce){Mt(null,Ne,Ce)}})),Se=!0)})),De&&(we[hc].polyfill=De)}}function Re(de,we,De){He(KG(de,we,De))}function ft(){vW(te,re)&&te[f1](lr(b,function(){ie=!!b[p3],f=b[d3],!ie&&!d&&(Re(XMLHttpRequest,"open",{ns:Te,req:function(de,we,De,Ie){if(!ie){var Ne=de[kg],Ce=Ep(Ne,re);!Mt(Ne,De)&&Ot(Ne,Ce,!0)&&((!Ce||!Ce.xhrMonitoringState[h3])&&(Ce=Ai(Ne,we,De,Ie)),oi(Ne,Ce))}},hkErr:_g(te,15,Ig+".open"+Ap)}),Re(XMLHttpRequest,"send",{ns:Te,req:function(de,we){if(!ie){var De=de[kg],Ie=Ep(De,re);Ot(De,Ie)&&!Ie.xhrMonitoringState[f3]&&(me("xhr",Ie),Ie[dc]=Ky(),te[u3](Ie,void 0,void 0,De),Ie.xhrMonitoringState[f3]=!0)}},hkErr:_g(te,17,Ig+Ap)}),Re(XMLHttpRequest,"abort",{ns:Te,req:function(de){if(!ie){var we=de[kg],De=Ep(we,re);Ot(we,De)&&!De.xhrMonitoringState[g3]&&(De[xp]=1,De.xhrMonitoringState[g3]=!0)}},hkErr:_g(te,13,Ig+".abort"+Ap)}),Re(XMLHttpRequest,"setRequestHeader",{ns:Te,req:function(de,we,De){if(!ie){var Ie=de[kg],Ne=Ep(Ie,re);Ne&&Ot(Ie,Ne)&&(yW(Ie,we,De),f&&Q(we)&&Ne&&(Ne[_a][we]=De))}},hkErr:_g(te,71,Ig+".setRequestHeader"+Ap)}),d=!0)}))}function Mt(de,we,De){var Ie=!1,Ne=((Dt(we)?we:(we||{}).url||"")||"")[Sp]();if(rt(fe,function(Ut){var Ct=Ut;Dt(Ut)&&(Ct=new RegExp(Ut)),Ie||(Ie=Ct.test(Ne))}),Ie)return Ie;var Ce=Cp(Ne,"?"),yt=Cp(Ne,"#");return(Ce===-1||yt!==-1&&yt<Ce)&&(Ce=yt),Ce!==-1&&(Ne=Ne.substring(0,Ce)),_e(de)?_e(we)||(Ie=(typeof we=="object"?we[By]===!0:!1)||(De?De[By]===!0:!1)):Ie=de[By]===!0||Ne[By]===!0,!Ie&&Ne&&bT(Ne)&&(Ie=!0),Ie?Z[Ne]||(Z[Ne]=1):Z[Ne]&&(Ie=!0),Ie}function Ot(de,we,De){var Ie=!0,Ne=d;return _e(de)||(Ie=De===!0||!_e(we)),Ne&&Ie}function sn(){var de=null;return te[Ja]&&te[Ja].getTraceCtx&&(de=te[Ja].getTraceCtx(!1)),!de&&D&&D.telemetryTrace&&(de=wT(D.telemetryTrace)),de}function Ai(de,we,De,Ie){var Ne,Ce=sn(),yt=Ce&&Ce[m3]()||gu(),Ut=iu(gu(),0,16),Ct=de[Nu]=de[Nu]||{xh:[],i:{}},zt=Ct.i=Ct.i||{},rn=zt[re]=zt[re]||new qL(yt,Ut,te[Cg](),(Ne=te.core)===null||Ne===void 0?void 0:Ne.getTraceCtx());return rn[Ma]=Ce&&Ce[v3](),rn[Lu]=we,rn[Ya]=De,rn.xhrMonitoringState[h3]=!0,rn[_a]={},rn.async=Ie,rn[y3]=A,rn}function oi(de,we){we.xhrMonitoringState[jL]=vs(de,"readystatechange",function(){var De;try{de&&de.readyState===4&&Ot(de,we)&&In(de)}catch(Ne){var Ie=it(Ne);(!Ie||Cp(Ie[Sp](),"c00c023f")===-1)&&Mg(te,16,Ig+" 'readystatechange' event handler"+Ap,(De={},De[zL]=m1(de,re),De[Eg]=Ie,De))}},Te)}function Ee(de){try{var we=de.responseType;if(we===""||we==="text")return de[BL]}catch{}return null}function In(de){var we=Ep(de,re);we[Ag]=Ky(),we[Qa]=de[Qa];function De(Ie,Ne){var Ce=Ne||{};Ce.ajaxDiagnosticsMessage=m1(de,re),Ie&&(Ce.exception=it(Ie)),Ts(te,14,YL+"ajax call"+KL,Ce)}$e("xmlhttprequest",we,function(){try{var Ie=we[b3]("Ajax",f,function(){var Ct,zt=(Ct={statusText:de[cc]},Ct[kp]=null,Ct[S3]=rr(de),Ct.type=de.responseType,Ct[BL]=Ee(de),Ct.response=de[VL],Ct);if(G){var rn=de[$L]();if(rn){var ut=fr(rn).split(/[\r\n]+/),Ei={};rt(ut,function(ua){var Ur=ua.split(": "),Io=Ur.shift(),ee=Ur.join(": ");Q(Io)&&(Ei[Io]=ee)}),zt[kp]=Ei}}return zt}),Ne=void 0;try{Me&&(Ne=Me({status:de[Qa],xhr:de}))}catch{Ts(te,104,XL)}if(Ie){Ne!==void 0&&(Ie[oc]=wi(wi({},Ie.properties),Ne));var Ce=we[w3]();$t(T,te[Ja],we,Ie,null,Ce)}else De(null,{requestSentTime:we[dc],responseFinishedTime:we[Ag]})}finally{try{var yt=de[Nu]||{i:{}},Ut=yt.i||{};Ut[re]&&(Ut[re]=null)}catch{}}},function(Ie){De(Ie,null)})}function rr(de){var we;try{var De=de[$L]();if(De!==null){var Ie=Cp(De[Sp](),Mn[8]);if(Ie!==-1){var Ne=de.getResponseHeader(Mn[0]);return kP(Ne)}}}catch(Ce){Ts(te,18,WL,(we={},we[zL]=m1(de,re),we[Eg]=it(Ce),we))}}function me(de,we){if(we[Ya]&&L&&w){var De=ls();if(De&&Bt(De.mark)){JL++;var Ie=L+de+"#"+JL;De.mark(Ie);var Ne=De.getEntriesByName(Ie);Ne&&Ne[sc]===1&&(we[g1]=Ne[0])}}}function $e(de,we,De,Ie){var Ne=we[g1],Ce=ls(),yt=ve,Ut=be,Ct=we[Ya],zt=0;(function rn(){try{if(Ce&&Ne){zt++;for(var ut=null,Ei=Ce.getEntries(),ua=Ei[sc]-1;ua>=0;ua--){var Ur=Ei[ua];if(Ur){if(Ur.entryType==="resource")Ur.initiatorType===de&&(Cp(Ur[Tp],Ct)!==-1||Cp(Ct,Ur[Tp])!==-1)&&(ut=Ur);else if(Ur.entryType==="mark"&&Ur[Tp]===Ne[Tp]){we[x3]=ut;break}if(Ur[lc]<Ne[lc]-1e3)break}}}!Ne||we[x3]||zt>=yt||we.async===!1?(Ne&&Bt(Ce.clearMarks)&&Ce.clearMarks(Ne[Tp]),we.perfAttempts=zt,De()):Aa(rn,Ut)}catch(Io){Ie(Io)}})()}function ct(de,we){var De,Ie=sn(),Ne=Ie&&Ie[m3]()||gu(),Ce=iu(gu(),0,16),yt=new qL(Ne,Ce,te[Cg](),(De=te.core)===null||De===void 0?void 0:De.getTraceCtx());yt[Ma]=Ie&&Ie[v3](),yt[dc]=Ky(),yt[y3]=A;var Ut;if(de instanceof Request?Ut=(de||{}).url||"":Ut=de,Ut===""){var Ct=bo();Ct&&Ct.href&&(Ut=p6(Ct.href,"#")[0])}yt[Ya]=Ut;var zt="GET";we&&we[Lu]?zt=we[Lu]:de&&de instanceof Request&&(zt=de[Lu]),yt[Lu]=zt;var rn={};if(f){var ut=new Headers((we?we[uc]:0)||(de instanceof Request?de[uc]||{}:{}));ut.forEach(function(Ei,ua){Q(ua)&&(rn[ua]=Ei)})}return yt[_a]=rn,me(hc,yt),yt}function dt(de){var we="";try{_e(de)||(typeof de=="string"?we+="(url: '".concat(de,"')"):we+="(url: '".concat(de.url,"')"))}catch(De){Mg(te,15,"Failed to grab failed fetch diagnostics message",{exception:it(De)})}return we}function at(de,we,De,Ie,Ne,Ce,yt){if(!Ne)return;function Ut(Ct,zt,rn){var ut=rn||{};ut.fetchDiagnosticsMessage=dt(De),zt&&(ut.exception=it(zt)),Ts(te,Ct,YL+"fetch call"+KL,ut)}Ne[Ag]=Ky(),Ne[Qa]=we,$e(hc,Ne,function(){var Ct=Ne[b3]("Fetch",f,Ce),zt;try{Me&&(zt=Me({status:we,request:De,response:Ie}))}catch{Ts(te,104,XL)}if(Ct){zt!==void 0&&(Ct[oc]=wi(wi({},Ct.properties),zt));var rn=Ne[w3]();$t(T,te[Ja],Ne,Ct,null,rn)}else Ut(14,null,{requestSentTime:Ne[dc],responseFinishedTime:Ne[Ag]})},function(Ct){Ut(18,Ct,null)})}function Be(de){var we;if(de&&de[uc])try{var De=de[uc].get(Mn[0]);return kP(De)}catch(Ie){Ts(te,18,WL,(we={fetchDiagnosticsMessage:dt(de)},we[Eg]=it(Ie),we))}}function $t(de,we,De,Ie,Ne,Ce){var yt,Ut=!0,Ct=de[sc];if(Ct>0){var zt=(yt={item:Ie},yt[oc]=Ne,yt.sysProperties=Ce,yt.context=De?De[Tg]:null,yt.aborted=De?!!De[xp]:!1,yt);Ut=ZL(we,de,zt,"initializer")}Ut&&te[_L](Ie,Ne,Ce)}}),c}return s.prototype.processTelemetry=function(c,h){this.processNext(c,h)},s.prototype.addDependencyInitializer=function(c){return null},s.identifier="AjaxDependencyPlugin",s}(tp),TW=function(){function o(){}return o}(),AW=function(){function o(){this.id="browser",this.deviceClass="Browser"}return o}(),EW="3.3.3",CW=function(){function o(s,c){var h=this,d=lr(s,function(){var m=s.sdkExtension;h.sdkVersion=(m?m+"_":"")+"javascript:"+EW});c&&c.add(d)}return o}(),IW=function(){function o(){}return o}(),y1="sessionManager",b1="update",w1="isUserCookieSet",x1="isNewUser",E3="getTraceCtx",C3="telemetryTrace",e7="applySessionContext",t7="applyApplicationContext",n7="applyDeviceContext",r7="applyOperationContext",i7="applyUserContext",a7="applyOperatingSystemContxt",o7="applyLocationContext",s7="applyInternalContext",fc="accountId",S1="getSessionId",I3="namePrefix",MW="sessionCookiePostfix",u7="userCookiePostfix",k1="idLength",M3="getNewId",T1="length",Ip="automaticSession",Mp="authenticatedId",Dg="acquisitionDate",A1="renewalDate",Pg="join",Lg="cookieSeparator",_3="authUserCookieName",_W="ai_session",DW=864e5,PW=18e5,LW=6e4,l7=function(){function o(){}return o}(),RW=function(){function o(s,c,h){var d=this,m,b,f=Ll(c),A=Uk(c),M,D;Un(o,d,function(N){s||(s={});var F=lr(s,function(ie){M=s.sessionExpirationMs||DW,D=s.sessionRenewalMs||PW;var ge=s.sessionCookiePostfix||s[I3]||"";m=_W+ge});h&&h.add(F),N[Ip]=new l7,N[b1]=function(){var ie=po(),ge=!1,fe=N[Ip];if(fe.id||(ge=!L(fe)),!ge&&M>0){var Me=ie-fe[Dg],Te=ie-fe[A1];ge=Me<0||Te<0,ge=ge||Me>M,ge=ge||Te>D}ge?U(ie):(!b||ie-b>LW)&&G(fe,ie)},N.backup=function(){var ie=N[Ip];Z(ie.id,ie[Dg],ie[A1])};function L(ie,ge){var fe=!1,Me=A.get(m);if(Me&&Bt(Me.split))fe=w(ie,Me);else{var Te=AP(f,m);Te&&(fe=w(ie,Te))}return fe||!!ie.id}function w(ie,ge){var fe=!1,Me=", session will be reset",Te=ge.split("|");if(Te[T1]>=2)try{var re=+Te[1]||0,Pe=+Te[2]||0;isNaN(re)||re<=0?je(f,2,27,"AI session acquisition date is 0"+Me):isNaN(Pe)||Pe<=0?je(f,2,27,"AI session renewal date is 0"+Me):Te[0]&&(ie.id=Te[0],ie[Dg]=re,ie[A1]=Pe,fe=!0)}catch(ke){je(f,1,9,"Error parsing ai_session value ["+(ge||"")+"]"+Me+" - "+wn(ke),{exception:it(ke)})}return fe}function U(ie){var ge=s[M3]||kk;N.automaticSession.id=ge(s[k1]||22),N[Ip][Dg]=ie,G(N[Ip],ie),Xy()||je(f,2,0,"Browser does not support local storage. Session durations will be inaccurate.")}function G(ie,ge){var fe=ie[Dg];ie[A1]=ge;var Me=D,Te=fe+M-ge,re=[ie.id,fe,ge],Pe=0;Te<Me?Pe=Te/1e3:Pe=Me/1e3;var ke=s.cookieDomain||null;A.set(m,re[Pg]("|"),M>0?Pe:null,ke),b=ge}function Z(ie,ge,fe){EP(f,m,[ie,ge,fe][Pg]("|"))}})}return o.__ieDyn=1,o}(),NW=function(){function o(s,c,h,d){var m=this;m.traceID=s||gu(),m.parentID=c;var b=bo();!h&&b&&b.pathname&&(h=b.pathname),m.name=mr(d,h)}return o}();function c7(o){return!(typeof o!="string"||!o||o.match(/,|;|=| |\|/))}var OW=function(){function o(s,c,h){this.isNewUser=!1,this.isUserCookieSet=!1;var d=Ll(c),m=Uk(c),b;Un(o,this,function(f){mn(f,"config",{g:function(){return s}});var A=lr(s,function(){var F=s[u7]||"";b=o.userCookieName+F;var L=m.get(b);if(L){f[x1]=!1;var w=L.split(o[Lg]);w[T1]>0&&(f.id=w[0],f[w1]=!!f.id)}if(!f.id){f.id=M();var U=D(f.id);N(U[Pg](o[Lg]));var G=(s[I3]||"")+"ai_session";uK(d,G)}f[fc]=s[fc]||void 0;var Z=m.get(o[_3]);if(Z){Z=decodeURI(Z);var ie=Z.split(o[Lg]);ie[0]&&(f[Mp]=ie[0]),ie[T1]>1&&ie[1]&&(f[fc]=ie[1])}});h&&h.add(A);function M(){var F=s||{},L=F[M3]||kk,w=L(F[k1]?s[k1]:22);return w}function D(F){var L=Xd(new Date);f.accountAcquisitionDate=L,f[x1]=!0;var w=[F,L];return w}function N(F){var L=31536e3;f[w1]=m.set(b,F,L)}f.setAuthenticatedUserContext=function(F,L,w){w===void 0&&(w=!1);var U=!c7(F)||L&&!c7(L);if(U){je(d,2,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);return}f[Mp]=F;var G=f[Mp];L&&(f[fc]=L,G=[f[Mp],f.accountId][Pg](o[Lg])),w&&m.set(o[_3],encodeURI(G))},f.clearAuthenticatedUserContext=function(){f[Mp]=null,f[fc]=null,m.del(o[_3])},f[b1]=function(F){if(f.id!==F||!f[w1]){var L=F||M(),w=D(L);N(w[Pg](o[Lg]))}}})}return o.cookieSeparator="|",o.userCookieName="ai_user",o.authUserCookieName="ai_authUser",o}(),E1="ext",C1="tags";function _p(o,s){o&&o[s]&&ss(o[s])[T1]===0&&delete o[s]}function d7(){return null}var UW=function(){function o(s,c,h,d){var m=this,b=s.logger;Un(o,this,function(f){if(f.appId=d7,f[S1]=d7,f.application=new TW,f.internal=new CW(c,d),B0()){f[y1]=new RW(c,s,d),f.device=new AW,f.location=new IW,f.user=new OW(c,s,d);var A=void 0,M=void 0,D;h&&(A=h.getTraceId(),M=h.getSpanId(),D=h.getName()),f[C3]=new NW(A,M,D,b),f.session=new l7}f[S1]=function(){var N=f.session,F=null;if(N&&Dt(N.id))F=N.id;else{var L=(f[y1]||{})[Ip];F=L&&Dt(L.id)?L.id:null}return F},f[e7]=function(N,F){Ln(Si(N.ext,oa.AppExt),"sesId",f[S1](),Dt)},f[a7]=function(N,F){Ln(N.ext,oa.OSExt,f.os)},f[t7]=function(N,F){var L=f.application;if(L){var w=Si(N,C1);Ln(w,Fn.applicationVersion,L.ver,Dt),Ln(w,Fn.applicationBuild,L.build,Dt)}},f[n7]=function(N,F){var L=f.device;if(L){var w=Si(Si(N,E1),oa.DeviceExt);Ln(w,"localId",L.id,Dt),Ln(w,"ip",L.ip,Dt),Ln(w,"model",L.model,Dt),Ln(w,"deviceClass",L.deviceClass,Dt)}},f[s7]=function(N,F){var L=f.internal;if(L){var w=Si(N,C1);Ln(w,Fn.internalAgentVersion,L.agentVersion,Dt),Ln(w,Fn.internalSdkVersion,mr(b,L.sdkVersion,64),Dt),(N.baseType===Xf.dataType||N.baseType===Tu.dataType)&&(Ln(w,Fn.internalSnippet,L.snippetVer,Dt),Ln(w,Fn.internalSdkSrc,L.sdkSrc,Dt))}},f[o7]=function(N,F){var L=m.location;L&&Ln(Si(N,C1,[]),Fn.locationIp,L.ip,Dt)},f[r7]=function(N,F){var L=f[C3];if(L){var w=Si(Si(N,E1),oa.TraceExt,{traceID:void 0,parentID:void 0});Ln(w,"traceID",L.traceID,Dt,_e),Ln(w,"name",L.name,Dt,_e),Ln(w,"parentID",L.parentID,Dt,_e)}},f.applyWebContext=function(N,F){var L=m.web;L&&Ln(Si(N,E1),oa.WebExt,L)},f[i7]=function(N,F){var L=f.user;if(L){var w=Si(N,C1,[]);Ln(w,Fn.userAccountId,L[fc],Dt);var U=Si(Si(N,E1),oa.UserExt);Ln(U,"id",L.id,Dt),Ln(U,"authId",L[Mp],Dt)}},f.cleanUp=function(N,F){var L=N.ext;L&&(_p(L,oa.DeviceExt),_p(L,oa.UserExt),_p(L,oa.WebExt),_p(L,oa.OSExt),_p(L,oa.AppExt),_p(L,oa.TraceExt))}})}return o.__ieDyn=1,o}(),ai,D3,Dp=null,FW=_d((ai={},ai[fc]=Dp,ai.sessionRenewalMs=30*60*1e3,ai.samplingPercentage=100,ai.sessionExpirationMs=24*60*60*1e3,ai.cookieDomain=Dp,ai.sdkExtension=Dp,ai.isBrowserLinkTrackingEnabled=!1,ai.appId=Dp,ai[S1]=Dp,ai[I3]=D3,ai[MW]=D3,ai[u7]=D3,ai[k1]=22,ai[M3]=Dp,ai)),jW=function(o){ds(s,o);function s(){var c=o.call(this)||this;c.priority=110,c.identifier=Qy;var h,d,m,b,f;return Un(s,c,function(A,M){D(),mn(A,"context",{g:function(){return b}}),A.initialize=function(L,w,U,G){M.initialize(L,w,U,G),N(L)},A.processTelemetry=function(L,w){if(!_e(L)){w=A._getTelCtx(w),L.name===Tu.envelopeType&&w.diagLog().resetInternalMessageCount();var U=b||{};U.session&&typeof b.session.id!="string"&&U[y1]&&U[y1][b1]();var G=U.user;if(G&&!G[w1]&&G[b1](U.user.id),F(L,w),G&&G[x1]&&(G[x1]=!1,!f)){var Z=new Xf(72,(co()||{}).userAgent||"");Jq(w.diagLog(),1,Z)}A.processNext(L,w)}},A._doTeardown=function(L,w){var U=(L||{}).core();if(U&&U[E3]){var G=U[E3](!1);G===d&&U.setTraceCtx(m)}D()};function D(){h=null,d=null,m=null,b=null,f=!0}function N(L){var w=A.identifier,U=A.core;A._addHook(lr(L,function(){var G=Ka(null,L,U);L.storagePrefix&&kT(L.storagePrefix),f=L.disableUserInitMessage!==!1,h=G.getExtCfg(w,FW),A._extConfig=h})),m=U[E3](!1),b=new UW(U,h,m,A._unloadHooks),d=wT(A.context[C3],m),U.setTraceCtx(d),A.context.appId=function(){var G=U.getPlugin(FP);return G?G.plugin._appId:null}}function F(L,w){Si(L,"tags",[]),Si(L,"ext",{});var U=A.context;U[e7](L,w),U[t7](L,w),U[n7](L,w),U[r7](L,w),U[i7](L,w),U[a7](L,w),U.applyWebContext(L,w),U[o7](L,w),U[s7](L,w),U.cleanUp(L,w)}}),c}return s.__ieDyn=1,s}(tp),p7="AuthenticatedUserContext",Pp="track",P3="snippet",BW="getCookieMgr",VW="startTrackPage",$W="stopTrackPage",L3="flush",zW="startTrackEvent",HW="stopTrackEvent",qW="addTelemetryInitializer",h7="pollInternalLogs",R3="getPlugin",N3="evtNamespace",GW=Pp+"Event",KW=Pp+"Trace",WW=Pp+"Metric",XW=Pp+"PageView",YW=Pp+"Exception",JW=Pp+"DependencyData",QW="set"+p7,ZW="clear"+p7,eX="https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json",O3="version",gc="queue",I1="connectionString",Rg="instrumentationKey",f7="instrumentationkey",Lp="userOverrideEndpointUrl",M1="endpointUrl",g7="ingestionendpoint",Ng="onunloadFlush",Da="context",m7="addHousekeepingBeforeUnload",U3="sendMessage",tX="updateSnippetDefinitions",Co,Og,Rp,F3,Ug,v7=[P3,"dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults"],y7="iKeyUsage",b7="CdnUsage",w7="SdkLoaderVer",_1=void 0,nX={samplingRate:100,maxSendNumber:1},rX={monthInterval:3,daysOfMonth:[28]},D1={disabled:!0,limit:Ga(nX),interval:Ga(rX)},iX=(Co={},Co[I1]=_1,Co[M1]=_1,Co[Rg]=_1,Co[Lp]=_1,Co.diagnosticLogInterval=Ay(aX,1e4),Co.featureOptIn=(Og={},Og[y7]={mode:3},Og[b7]={mode:2},Og[w7]={mode:2},Og),Co.throttleMgrCfg=Ga((Rp={},Rp[109]=Ga(D1),Rp[106]=Ga(D1),Rp[111]=Ga(D1),Rp[110]=Ga(D1),Rp)),Co.extensionConfig=Ga((F3={},F3.AppInsightsCfgSyncPlugin=Ga({cfgUrl:eX,syncMode:2}),F3)),Co);function aX(o){return o&&o>0}var oX=function(){function o(s){var c=this,h,d,m,b,f,A,M,D,N,F,L,w,U,G;Un(o,this,function(Z){fe(),mn(Z,"config",{g:function(){return D}}),rt(["pluginVersionStringArr","pluginVersionString"],function(re){mn(Z,re,{g:function(){return M?M[re]:null}})}),b=""+(s.sv||s[O3]||""),s[gc]=s[gc]||[],s[O3]=s[O3]||2;var ie=Ca(s.config||{},iX);D=ie.cfg,N=new jK,mn(Z,"appInsights",{g:function(){return N}}),d=new jW,h=new kW,m=new hW,M=new DG,mn(Z,"core",{g:function(){return M}}),Te(lr(ie,function(){var re=D[I1];function Pe(){return Ff(function(be,V){ms(re,function(W){var Se=W&&W.value,te=null;!W.rejected&&Se&&(D[I1]=Se,te=MP(Se)),be(te)})})}if(as(re)){var ke=Ff(function(be,V){Pe().then(function(W){var Se=D[Rg];Se=W&&W[f7]||Se,be(Se)}).catch(function(W){be(null)})}),T=D[Lp];_e(T)&&(T=Ff(function(be,V){Pe().then(function(W){var Se=D[M1],te=W&&W[g7];Se=te?te+rp:Se,be(Se)}).catch(function(W){be(null)})})),D[Rg]=ke,D[M1]=T}if(Dt(re)&&re){var oe=MP(re),ve=oe[g7];D.endpointUrl=D[Lp]?D[Lp]:ve+rp,D[Rg]=oe[f7]||D[Rg]}D.endpointUrl=D[Lp]?D[Lp]:D[M1]})),Z[P3]=s,Z[L3]=function(re,Pe){re===void 0&&(re=!0);var ke;return Ry(M,function(){return"AISKU.flush"},function(){re&&!Pe&&(ke=du(function(ve){Pe=ve}));var T=1,oe=function(){T--,T===0&&Pe()};rt(M.getChannels(),function(ve){ve&&(T++,ve[L3](re,oe))}),oe()},null,re),ke},Z[Ng]=function(re){re===void 0&&(re=!0),rt(M.getChannels(),function(Pe){Pe[Ng]?Pe[Ng]():Pe[L3](re)})},Z.loadAppInsights=function(re,Pe,ke){re===void 0&&(re=!1),re&&uH("Legacy Mode is no longer supported");function T(oe){if(oe){var ve="";_e(b)||(ve+=b),Z[Da]&&Z[Da].internal&&(Z[Da].internal.snippetVer=ve||"-"),en(Z,function(be,V){Dt(be)&&!Bt(V)&&be&&be[0]!=="_"&&ni(v7,be)===-1&&oe[be]!==V&&(oe[be]=V)})}}return Ry(Z.core,function(){return"AISKU.loadAppInsights"},function(){M.initialize(D,[m,d,h,N,F],Pe,ke),mn(Z,"context",{g:function(){return d[Da]}}),L||(L=new cK(M));var oe=sX();oe&&Z[Da]&&(Z[Da].internal.sdkSrc=oe),T(Z[P3]),Z.emptyQueue(),Z[h7](),Z[m7](Z),Te(lr(ie,function(){var ve=!1;D.throttleMgrCfg[109]&&(ve=!D.throttleMgrCfg[109].disabled),!L.isReady()&&D.extensionConfig&&D.extensionConfig[F.identifier]&&ve&&L.onReadyState(!0);var be;!w&&!D[I1]&&hk(y7,D)&&(be=L[U3](106,"See Instrumentation key support at aka.ms/IkeyMigrate"),w=!0),!U&&Z[Da].internal.sdkSrc&&Z[Da].internal.sdkSrc.indexOf("az416426")!=-1&&hk(b7,D)&&(be=L[U3](110,"See Cdn support notice at aka.ms/JsActiveCdn"),U=!0),!G&&parseInt(b)<6&&hk(w7,D)&&(be=L[U3](111,"An updated Sdk Loader is available, see aka.ms/SnippetVer"),G=!0)}))}),Z},Z[tX]=function(re){ZH(re,Z,function(Pe){return Pe&&ni(v7,Pe)===-1})},Z.emptyQueue=function(){try{if(Yt(Z.snippet[gc])){for(var re=Z.snippet[gc].length,Pe=0;Pe<re;Pe++){var ke=Z.snippet[gc][Pe];ke()}Z.snippet[gc]=void 0,delete Z.snippet[gc]}}catch(oe){var T={};oe&&Bt(oe.toString)&&(T.exception=oe.toString())}},Z[m7]=function(re){if(B0()||e6()){var Pe=function(){if(re[Ng](!1),Bt(Z.core[R3])){var T=c.core[R3](Qy);if(T){var oe=T.plugin;oe&&oe[Da]&&oe[Da]._sessionManager&&oe[Da]._sessionManager.backup()}}},ke=!1;A||(A=yu(f,M[N3]&&M[N3]())),Te(lr(D,function(T){var oe=T.cfg,ve=re.appInsights,be=Ka(null,oe,ve.core),V=be.getExtCfg(ve.identifier||jP);Me();var W=oe.disablePageUnloadEvents;V.disableFlushOnBeforeUnload||(zG(Pe,W,A)&&(ke=!0),tT(Pe,W,A)&&(ke=!0),!ke&&!yq()&&je(M.logger,1,19,"Could not add handler for beforeunload and pagehide")),!ke&&!V.disableFlushOnUnload&&tT(Pe,W,A)}))}},Z.getSender=function(){return m},Z.unload=function(re,Pe,ke){var T=!1,oe;re&&!Pe&&(oe=du(function(be){Pe=be}));function ve(be){T||(T=!0,fe(),Pe&&Pe(be))}return Z[Ng](re),Me(),M.unload&&M.unload(re,ve,ke),oe},Bf(Z,N,[BW,GW,XW,"trackPageViewPerformance",YW,"_onerror",KW,WW,VW,$W,zW,HW]),Bf(Z,ge,[JW,"addDependencyListener","addDependencyInitializer"]),Bf(Z,M,[qW,h7,"stopPollingInternalLogs",R3,"addPlugin",N3,"addUnloadCb","getTraceCtx","updateCfg","onCfgChange"]),Bf(Z,function(){var re=d[Da];return re?re.user:null},[QW,ZW]);function ge(){return h}function fe(){f=Ea("AISKU"),A=null,h=null,d=null,m=null,b=null,L=null,w=!1,U=!1,G=!1,F=new KK}function Me(){A&&(HG(null,A),qG(null,A))}function Te(re){M.addUnloadHook(re)}})}return o.prototype.addDependencyInitializer=function(s){return null},o}();function sX(){if(Ug)return Ug;var o=null,s=!1,c=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var h=(document||{}).currentScript;h&&(o=h.src)}catch{}if(o){try{var d=o.toLowerCase();if(d){var m="";rt(c,function(b,f){if(Vi(d,b)!==-1)return m="cdn"+(f+1),Vi(d,"/scripts/")===-1&&(Vi(d,"/next/")!==-1?m+="-next":Vi(d,"/beta/")!==-1&&(m+="-beta")),Ug=m+(s?".mod":""),-1})}}catch{}Ug=o}return Ug}var Np=(o=>(o.PlayerLoadDurationMs="playerLoadDurationMs",o.BufferDurationMs="bufferDurationMs",o.InitialPlaybackStartDurationMs="initialPlaybackStartDurationMs",o.PosterImageLoadDurationMs="posterImageLoadDurationMs",o))(Np||{}),Hi=(o=>(o.BufferComplete="BufferComplete",o.CommonPlayerImpression="CommonPlayerImpression",o.ContentCheckpoint="ContentCheckpoint",o.ContentComplete="ContentComplete",o.ContentError="ContentError",o.FullScreenEnter="FullScreenEnter",o.FullScreenExit="FullScreenExit",o.InviewEnter="InviewEnter",o.InviewExit="InviewExit",o.Mute="Mute",o.Pause="Pause",o.Play="Play",o.PlayerError="PlayerError",o.Replay="Replay",o.Resume="Resume",o.Seek="Seek",o.Unmute="Unmute",o.VideoAudioTrackControl="VideoAudioTrackControl",o.VideoPlayerClick="VideoPlayerClick",o))(Hi||{});class x7{constructor(s,c,h,d=!1,m){this.reporterName="Reporter",this._playerInfo=s,this._player=c,this._playerStateContext=h,this._isDebugMode=d,m&&(this.reporterName=m)}log(s){this._isDebugMode&&console.log(JSON.stringify(s),this.reporterName)}get playerInfo(){return this._playerInfo}set playerInfo(s){this._playerInfo=s}reportNominalMetric(s,c){if(this.shouldEmitNominalMetric(s)){const h=this.formatNominalMetric(s,this.getBaseTelemetryData(),c);this.log(h),this.emitTelemetry(h)}}reportNumericMetric(s,c){if(this.shouldEmitNumericMetric(s)){const h=this.formatNumericMetric(s,c,this.getBaseTelemetryData());this.log(h),this.emitTelemetry(h)}}reportError(s){if(this.shouldEmitError(s.errorType)){const c=this.formatError(s,this.getBaseTelemetryData());this.log(c),this.emitTelemetry(c)}}getBaseTelemetryData(){var s;return{deliveryMethod:this._playerInfo.deliveryMethod,playerInstanceId:this._playerInfo.playerInstanceId,playerCommit:this._playerInfo.playerCommit,playerVersionNumber:this._playerInfo.playerVersionNumber,playerUrl:this._playerInfo.playerUrl,title:this._playerInfo.title,videoId:this._playerInfo.videoId,videoElapsedTime:this._player.currentTime,videoDuration:this._player.duration,language:this._player.options.language,playerState:{autoplay:(s=this._player)==null?void 0:s.autoplay,muted:this._player.muted,loop:this._player.loop,visible:this._playerStateContext.value.visible}}}}class uX extends x7{constructor(s,c,h,d=!1){super(s,c,h,d,"AppInsightsReporter"),this.hasEmittedFirstNonUmpMessage=!1,this.playerTech="shaka",this.formatNominalMetric=()=>{throw new Error("Unsupported by AppInsights reporter.")},this.shouldEmitNominalMetric=()=>!1,this.shouldEmitNumericMetric=m=>Object.values(Np).includes(m),this.shouldEmitError=()=>!0,this.isException=m=>m.exception!==void 0;try{this._appInsights=this.initAppInsights()}catch(m){d&&console.error("Error Initializing AppInsights.",m)}this.contextProvider=h}initAppInsights(){const s=new oX({config:{connectionString:"InstrumentationKey=81bc6725-8164-4f38-93f8-ea681394304b;IngestionEndpoint=https://westus2-2.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/;ApplicationId=ef77fed2-4fcc-4568-aed4-b87c867a1e21",disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0}});return s.loadAppInsights(),s.addTelemetryInitializer(this.telemetryInitializer.bind(this)),s}telemetryInitializer(s){var c;return s.baseData=s.baseData||{},s.baseData.properties={...s.baseData.properties,deliveryMethod:this._playerInfo.deliveryMethod,playerInstanceId:this._playerInfo.playerInstanceId,playerVersionNumber:this._playerInfo.playerVersionNumber,uri:window.location.href,partnerName:this._playerInfo.partnerName,playerTech:this.playerTech,playerVisible:(c=this.contextProvider.value)==null?void 0:c.visible,vidnm:this._playerInfo.title},document.referrer&&document.referrer!==window.location.href&&(s.baseData.properties.referrer=document.referrer),s.baseData.properties.ump?(delete s.baseData.properties.ump,!0):(s.baseData.properties.nonump=!0,this.hasEmittedFirstNonUmpMessage?!1:(this.hasEmittedFirstNonUmpMessage=!0,!0))}emitTelemetry(s){var c,h;this.isException(s)?(c=this._appInsights)==null||c.trackException(s):(h=this._appInsights)==null||h.trackMetric({name:s.name,average:s.average,properties:s.properties})}formatNumericMetric(s,c,h){return{name:s,average:c,properties:{playerUrl:h.playerUrl,language:h.language,ump:!0}}}formatError(s,c){return{exception:Object.assign(new Error(s.errorDescription),{name:s.errorType}),properties:{playerUrl:c.playerUrl,language:c.language,errorMessage:s.errorDescription,ump:!0}}}}var Mr=(o=>(o[o.VideoSeen=239]="VideoSeen",o[o.VideoStart=240]="VideoStart",o[o.VideoPause=241]="VideoPause",o[o.VideoContinue=242]="VideoContinue",o[o.VideoCheckpoint=243]="VideoCheckpoint",o[o.VideoJump=244]="VideoJump",o[o.VideoComplete=245]="VideoComplete",o[o.VideoBuffering=246]="VideoBuffering",o[o.VideoError=247]="VideoError",o[o.VideoMute=248]="VideoMute",o[o.VideoUnmute=249]="VideoUnmute",o[o.VideoFullscreen=250]="VideoFullscreen",o[o.VideoUnfullscreen=251]="VideoUnfullscreen",o[o.VideoReplay=252]="VideoReplay",o[o.VideoPlayerLoad=253]="VideoPlayerLoad",o[o.VideoPlayerClick=254]="VideoPlayerClick",o[o.VideoVolumeControl=255]="VideoVolumeControl",o[o.VideoAudioTrackControl=256]="VideoAudioTrackControl",o[o.VideoClosedCaptionControl=257]="VideoClosedCaptionControl",o[o.VideoClosedCaptionStyle=258]="VideoClosedCaptionStyle",o[o.VideoResolutionControl=259]="VideoResolutionControl",o[o.VideoUndefinedEvent=0]="VideoUndefinedEvent",o))(Mr||{});const S7={243:{actionType:"A",telemetryMethodType:"capturePageAction"},245:{actionType:"A",telemetryMethodType:"capturePageAction"},246:{actionType:"A",telemetryMethodType:"captureContentUpdate"},253:{actionType:"A",telemetryMethodType:"captureContentUpdate"},239:{actionType:"O",telemetryMethodType:"captureContentUpdate"},0:{actionType:"O",telemetryMethodType:"captureContentUpdate"},247:{actionType:"O",telemetryMethodType:"captureContentUpdate"},252:{actionType:"CL",telemetryMethodType:"capturePageAction"},240:{actionType:"CL",telemetryMethodType:"capturePageAction"},241:{actionType:"CL",telemetryMethodType:"capturePageAction"},242:{actionType:"CL",telemetryMethodType:"capturePageAction"},244:{actionType:"CL",telemetryMethodType:"capturePageAction"},248:{actionType:"CL",telemetryMethodType:"capturePageAction"},249:{actionType:"CL",telemetryMethodType:"capturePageAction"},250:{actionType:"CL",telemetryMethodType:"capturePageAction"},251:{actionType:"CL",telemetryMethodType:"capturePageAction"},254:{actionType:"CL",telemetryMethodType:"capturePageAction"},255:{actionType:"CL",telemetryMethodType:"capturePageAction"},256:{actionType:"CL",telemetryMethodType:"capturePageAction"},257:{actionType:"CL",telemetryMethodType:"capturePageAction"},258:{actionType:"CL",telemetryMethodType:"capturePageAction"},259:{actionType:"CL",telemetryMethodType:"capturePageAction"}},j3={BufferComplete:Mr.VideoBuffering,CommonPlayerImpression:Mr.VideoPlayerLoad,ContentCheckpoint:Mr.VideoCheckpoint,ContentComplete:Mr.VideoComplete,ContentError:Mr.VideoError,FullScreenEnter:Mr.VideoFullscreen,FullScreenExit:Mr.VideoUnfullscreen,InviewEnter:Mr.VideoSeen,Mute:Mr.VideoMute,Pause:Mr.VideoPause,Play:Mr.VideoStart,PlayerError:Mr.VideoError,Replay:Mr.VideoReplay,Resume:Mr.VideoContinue,Seek:Mr.VideoJump,Unmute:Mr.VideoUnmute,VideoAudioTrackControl:Mr.VideoAudioTrackControl,VideoPlayerClick:Mr.VideoPlayerClick};class lX extends x7{constructor(s,c,h,d=!1){super(s,c,h,d,"MartechReporter"),this.formatNominalMetric=(m,b,f)=>{const A=j3[m],M=S7[A];return{actionType:M?.actionType,behavior:A,contentTags:{...this.createContentTags(b),additionalData:f}}},this.formatNumericMetric=()=>{throw new Error("Unsupported by Martech reporter.")},this.formatError=(m,b)=>({actionType:"O",behavior:j3.ContentError,contentTags:{...this.createContentTags(b),errorDetails:m}}),this.shouldEmitNominalMetric=m=>j3[m]!==void 0,this.shouldEmitNumericMetric=()=>!1,this.shouldEmitError=()=>!0,this.createContentTags=m=>({playerInstanceId:m.playerInstanceId,containerName:"Universal Media Player",compnm:"Universal Media Player",vidnm:m.title,vidid:m.videoId,vidpct:Math.round(m.videoElapsedTime/m.videoDuration*100),viddur:Math.round(m.videoDuration),vidwt:Math.round(m.videoElapsedTime),playerState:m.playerState})}emitTelemetry(s){var c,h,d,m;const b=window.owap,f=window.awa,{telemetryMethodType:A}=S7[s.behavior];(c=b?.isInitialized)!=null&&c.call(b)?(h=b?.[A])==null||h.call(b,null,s):f?.isInitialized===!0&&((m=(d=f?.ct)==null?void 0:d[A])==null||m.call(d,null,s))}}class cX{constructor(s,c,h,d,m=!1){this._playerInfo={},this.reporters=[],d&&this.reporters.push(new lX(s,c,h,m)),this.sampleInstance()&&this.reporters.push(new uX(s,c,h,m)),this.playerInfo=s}get playerInfo(){return this._playerInfo}set playerInfo(s){this._playerInfo=s,s.partnerName||console.warn('"partnerName" is undefined and must be provided to the video player options.'),this.reporters.forEach(c=>c.playerInfo=s)}sampleInstance(){return Math.random()*100<1}reportNominalMetric(s,c){this.reporters.forEach(h=>h.reportNominalMetric(s,c))}reportNumericMetric(s,c){this.reporters.forEach(h=>h.reportNumericMetric(s,c))}reportError(s){this.reporters.forEach(c=>c.reportError(s))}}function dX(o,s,c){const h=d=>{pX(d,s,c)};return o.addEventListener("error",h),s.addEventListener("error",h),()=>{o.removeEventListener("error",h),s.removeEventListener("error",h)}}function pX(o,s,c){if(s.dispatchEvent(new Pt("playererror")),o instanceof gn.util.FakeEvent){const h=o.detail;h.umpErrorType?c.reportError({errorType:h.umpErrorType,errorDescription:h.umpErrorDescription}):c.reportError({errorType:`Shaka Error: ${h.code}. Severity: ${h.severity}`,errorDescription:`${h.category}: ${h.data.toString()}`})}else c.reportError({errorType:"unknown error event",errorDescription:"unknown error event"})}function hX(o,s,c){mX(o,c),fX(o,c),gX(o,c),vX(o,c),yX(o,s,c),bX(o,s,c),AX(o,c),wX(o,s,c),EX(o,s,c),xX(o,c),SX(o,c),kX(o,c),TX(o,s,c),CX(s,c)}function fX(o,s){o.addEventListener("play",()=>{const c=performance.now();o.addEventListener("playing",()=>{s.reportNumericMetric(Np.InitialPlaybackStartDurationMs,performance.now()-c)},{once:!0})},{once:!0})}function gX(o,s){o.addEventListener("umpplay",()=>{s.reportNominalMetric(Hi.Play)},{once:!0})}function mX(o,s){o.addEventListener("ended",()=>{s.reportNominalMetric(Hi.ContentComplete)},{once:!0})}function vX(o,s){o.addEventListener("umppause",()=>{s.reportNominalMetric(Hi.Pause)})}function yX(o,s,c){o.addEventListener("resume",()=>{s.dispatchEvent(new Pt("resume")),c.reportNominalMetric(Hi.Resume)})}function bX(o,s,c){o.addEventListener("replay",()=>{s.dispatchEvent(new Pt("replay")),c.reportNominalMetric(Hi.Replay)})}function wX(o,s,c){let h;o.addEventListener("buffering",d=>{d.buffering?(s.dispatchEvent(new Pt("buffering")),h=performance.now()):(c.reportNominalMetric(Hi.BufferComplete),c.reportNumericMetric(Np.BufferDurationMs,performance.now()-h))})}function xX(o,s){o.addEventListener("fullscreenchanged",()=>{o.fullscreen?s.reportNominalMetric(Hi.FullScreenEnter):s.reportNominalMetric(Hi.FullScreenExit)})}function SX(o,s){o.addEventListener("playerloadmediastart",()=>{const c=performance.now();o.addEventListener("playerloadmediaend",()=>{s.reportNumericMetric(Np.PlayerLoadDurationMs,performance.now()-c)})})}function kX(o,s){const c=performance.now();o.addEventListener("playerposterloadcomplete",()=>{s.reportNumericMetric(Np.PosterImageLoadDurationMs,performance.now()-c)},{once:!0})}function TX(o,s,c){const h=[.25,.5,.75],d=o.options.checkpoints.filter(m=>m>=0&&m<=1).sort((m,b)=>m-b);o.addEventListener("timeupdate",()=>{const m=o.currentTime/o.duration;for(;h.length>0&&m>=h[0];)h.shift(),c.reportNominalMetric(Hi.ContentCheckpoint);for(;d.length>0&&m>=d[0];)d.shift(),s.dispatchEvent(new Pt("checkpoint"))})}function AX(o,s){o.addEventListener("seeked",()=>{(o.currentTime>=.2||o.currentTime===0)&&s.reportNominalMetric(Hi.Seek)})}function EX(o,s,c){let h=o.options.muted;o.addEventListener("volumechange",()=>{const d=o.volume===0||o.muted;h!==d&&(h=d,c.reportNominalMetric(d?Hi.Mute:Hi.Unmute),s.dispatchEvent(new Pt(d?"mute":"unmute")))})}function CX(o,s){o.addEventListener("ready",()=>{s.reportNominalMetric(Hi.CommonPlayerImpression)},{once:!0})}function IX(o,s){return c=>{const h={deliveryMethod:"cdn",playerInstanceId:o.umpId,playerVersionNumber:1769801937254,playerCommit:"75884aebb03ddf20d0879c90fb05c5f038daafb5",playerUrl:Iz,title:c.options.unlocalizedTitle||c.options.title,partnerName:c.options.partnerName},d=new cX(h,c,s,c.options.reporting,c.options.debug);hX(c,o,d);const m=dX(c,o,d);return()=>{m()}}}const MX=`<svg width='24' height='24'
     viewBox='0 0 24 24'
     xmlns='http://www.w3.org/2000/svg'
    class="spinner-icon"
  >
  <defs>
    <clipPath id="circleClip">
      <circle cx="12" cy="12" r="12"/>
    </clipPath>
  </defs>
  <style>
    .spinner-icon {
      --stroke-width: 2;
      --stroke-bg: #333;
      --stroke-fg: #fff;

      transform-origin: center;
      animation: rotate 2s linear infinite;
      stroke-width: var(--stroke-width);
    }

    .spinner-bg {
      stroke: var(--stroke-bg);
    }
    
    .spinner-stroke {
      stroke: var(--stroke-fg);
      animation: animate-stroke 1.5s ease-out infinite;
    }

    @keyframes rotate {
      100% {
        transform: rotate(360deg)
      }
    }

    @keyframes animate-stroke {
      0% {
        stroke-dasharray: 0 150;
        stroke-dashoffset: 0;
      }

      47.5% {
        stroke-dasharray: 42 150;
        stroke-dashoffset: -16;
      }

      95%,
      100% {
        stroke-dasharray: 42 150;
        stroke-dashoffset: -59
      }
    }
  </style>
    <circle class="spinner-bg" cx='12' cy='12' r='9.5' fill='none' clip-path="url(#circleClip)"></circle>
    <circle class="spinner-stroke" cx='12' cy='12' r='9.5' fill='none' clip-path="url(#circleClip)"></circle>
</svg>`;function _X(o){return`data:image/svg+xml,${encodeURIComponent(o).replace(/'/g,"%27").replace(/"/g,"%22")}`}const DX=Cn`
.spinner{background-image:url('${Ax(_X(MX))}');background-repeat:no-repeat;background-position:center;background-size:cover;width:var(--size-8);height:var(--size-8)}
`;var PX=Object.defineProperty,LX=Object.getOwnPropertyDescriptor,k7=(o,s,c,h)=>{for(var d=h>1?void 0:h?LX(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&PX(s,c,d),d};let P1=class extends An{render(){return this.playerState.controlsState==="none"||!this.playerState.loading?null:St`<div class="spinner"></div>`}};P1.styles=[DX,Cn`
.spinner{width:var(--size-12);height:var(--size-12)}
    `],k7([Tr({context:Ar,subscribe:!0})],P1.prototype,"playerState",2),P1=k7([Xn("ump-loading-spinner")],P1);const T7=Cn`
:host{--border-radius-none:0;--border-radius-small:2px;--border-radius-medium:4px;--border-radius-large:6px;--border-radius-x-large:8px;--border-radius-circular:10000px;--font-size-base-100:0.625rem;--font-size-base-200:0.75rem;--font-size-base-300:0.875rem;--font-size-base-400:1rem;--font-size-base-500:1.25rem;--font-size-base-600:1.5rem;--font-size-hero-700:1.75rem;--font-size-hero-800:2rem;--font-size-hero-900:2.5rem;--font-size-hero-1000:2.25rem;--font-weight-regular:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--duration-ultra-fast:50ms;--duration-faster:100ms;--duration-fast:150ms;--duration-normal:200ms;--duration-gentle:250ms;--duration-slow:300ms;--duration-slower:400ms;--duration-ultra-slow:500ms;--curve-accelerate-max:cubic-bezier(0.9,0.1,1,0.2);--curve-accelerate-mid:cubic-bezier(1,0,1,1);--curve-accelerate-min:cubic-bezier(0.8,0,0.78,1);--curve-decelerate-max:cubic-bezier(0.1,0.9,0.2,1);--curve-decelerate-mid:cubic-bezier(0,0,0,1);--curve-decelerate-min:cubic-bezier(0.33,0,0.1,1);--curve-easy-ease-max:cubic-bezier(0.8,0,0.2,1);--curve-easy-ease:cubic-bezier(0.33,0,0.67,1);--curve-linear:cubic-bezier(0,0,1,1);--line-height-base-100:0.875rem;--line-height-base-200:1rem;--line-height-base-300:1.25rem;--line-height-base-400:1.375rem;--line-height-base-500:1.75rem;--line-height-base-600:2rem;--line-height-hero-700:2.25rem;--line-height-hero-800:2.5rem;--line-height-hero-900:3.125rem;--line-height-hero-1000:5.75rem;--spacing-none:0;--spacing-xxs:0.125rem;--spacing-xs:0.25rem;--spacing-s-nudge:0.375rem;--spacing-s:0.5rem;--spacing-m-nudge:0.625rem;--spacing-m:0.75rem;--spacing-l:1rem;--spacing-xl:1.25rem;--spacing-xxl:1.5rem;--spacing-xxxl:2rem;--spacing-xxxxl:2.25rem;--size-0:0px;--size-px:1px;--size-0-5:0.125rem;--size-1:0.25rem;--size-1-5:0.375rem;--size-2:0.5rem;--size-2-5:0.625rem;--size-3:0.75rem;--size-3-5:0.875rem;--size-4:1rem;--size-5:1.25rem;--size-6:1.5rem;--size-7:1.75rem;--size-8:2rem;--size-9:2.25rem;--size-10:2.5rem;--size-11:2.75rem;--size-12:3rem;--size-14:3.5rem;--size-16:4rem;--size-20:5rem;--size-24:6rem;--size-28:7rem;--size-32:8rem;--size-36:9rem;--size-40:10rem;--size-44:11rem;--size-48:12rem;--size-52:13rem;--size-56:14rem;--size-60:15rem;--size-64:16rem;--size-72:18rem;--size-80:20rem;--size-96:24rem;--size-100:30rem;--stroke-width-thin:1px;--stroke-width-thick:2px;--stroke-width-thicker:3px;--stroke-width-thickest:4px;--color-neutral-shadow-ambient:rgb(0 0 0/24%);--color-neutral-shadow-key:rgb(0 0 0/28%);--color-neutral-shadow-ambient-lighter:rgb(0 0 0/12%);--color-neutral-shadow-key-lighter:rgb(0 0 0/14%);--color-neutral-shadow-ambient-darker:rgb(0 0 0/40%);--color-neutral-shadow-key-darker:rgb(0 0 0/48%);--color-brand-shadow-ambient:rgb(0 0 0/30%);--color-brand-shadow-key:rgb(0 0 0/25%);--color-grey-2:#050505;--color-grey-4:#0a0a0a;--color-grey-6:#0f0f0f;--color-grey-8:#141414;--color-grey-10:#1a1a1a;--color-grey-12:#1f1f1f;--color-grey-14:#242424;--color-grey-16:#292929;--color-grey-18:#2e2e2e;--color-grey-20:#333;--color-grey-22:#383838;--color-grey-24:#3d3d3d;--color-grey-26:#424242;--color-grey-28:#474747;--color-grey-30:#4d4d4d;--color-grey-32:#525252;--color-grey-34:#575757;--color-grey-36:#5c5c5c;--color-grey-38:#616161;--color-grey-40:#666;--color-grey-42:#6b6b6b;--color-grey-44:#707070;--color-grey-46:#757575;--color-grey-48:#7a7a7a;--color-grey-50:#808080;--color-grey-52:#858585;--color-grey-54:#8a8a8a;--color-grey-56:#8f8f8f;--color-grey-58:#949494;--color-grey-60:#999;--color-grey-62:#9e9e9e;--color-grey-64:#a3a3a3;--color-grey-66:#a8a8a8;--color-grey-68:#adadad;--color-grey-70:#b3b3b3;--color-grey-72:#b8b8b8;--color-grey-74:#bdbdbd;--color-grey-76:#c2c2c2;--color-grey-78:#c7c7c7;--color-grey-80:#ccc;--color-grey-82:#d1d1d1;--color-grey-84:#d6d6d6;--color-grey-86:#dbdbdb;--color-grey-88:#e0e0e0;--color-grey-90:#e6e6e6;--color-grey-92:#ebebeb;--color-grey-94:#f0f0f0;--color-grey-96:#f5f5f5;--color-grey-98:#fafafa;--color-white:#fff;--color-white-alpha-5:rgb(255 255 255/5%);--color-white-alpha-10:rgb(255 255 255/10%);--color-white-alpha-20:rgb(255 255 255/20%);--color-white-alpha-30:rgb(255 255 255/30%);--color-white-alpha-40:rgb(255 255 255/40%);--color-white-alpha-50:rgb(255 255 255/50%);--color-white-alpha-60:rgb(255 255 255/60%);--color-white-alpha-70:rgb(255 255 255/70%);--color-white-alpha-80:rgb(255 255 255/80%);--color-white-alpha-90:rgb(255 255 255/90%);--color-black:#000;--color-black-alpha-5:rgb(0 0 0/5%);--color-black-alpha-10:rgb(0 0 0/10%);--color-black-alpha-20:rgb(0 0 0/20%);--color-black-alpha-30:rgb(0 0 0/30%);--color-black-alpha-40:rgb(0 0 0/40%);--color-black-alpha-50:rgb(0 0 0/50%);--color-black-alpha-60:rgb(0 0 0/60%);--color-black-alpha-70:rgb(0 0 0/70%);--color-black-alpha-80:rgb(0 0 0/80%);--color-black-alpha-90:rgb(0 0 0/90%);--color-grey-10-alpha-5:rgb(26 26 26/5%);--color-grey-10-alpha-10:rgb(26 26 26/10%);--color-grey-10-alpha-20:rgb(26 26 26/20%);--color-grey-10-alpha-30:rgb(26 26 26/30%);--color-grey-10-alpha-40:rgb(26 26 26/40%);--color-grey-10-alpha-50:rgb(26 26 26/50%);--color-grey-10-alpha-60:rgb(26 26 26/60%);--color-grey-10-alpha-70:rgb(26 26 26/70%);--color-grey-10-alpha-80:rgb(26 26 26/80%);--color-grey-10-alpha-90:rgb(26 26 26/90%);--color-grey-12-alpha-5:rgb(31 31 31/5%);--color-grey-12-alpha-10:rgb(31 31 31/10%);--color-grey-12-alpha-20:rgb(31 31 31/20%);--color-grey-12-alpha-30:rgb(31 31 31/30%);--color-grey-12-alpha-40:rgb(31 31 31/40%);--color-grey-12-alpha-50:rgb(31 31 31/50%);--color-grey-12-alpha-60:rgb(31 31 31/60%);--color-grey-12-alpha-70:rgb(31 31 31/70%);--color-grey-12-alpha-80:rgb(31 31 31/80%);--color-grey-12-alpha-90:rgb(31 31 31/90%);--color-grey-14-alpha-5:rgb(36 36 36/5%);--color-grey-14-alpha-10:rgb(36 36 36/10%);--color-grey-14-alpha-20:rgb(36 36 36/20%);--color-grey-14-alpha-30:rgb(36 36 36/30%);--color-grey-14-alpha-40:rgb(36 36 36/40%);--color-grey-14-alpha-50:rgb(36 36 36/50%);--color-grey-14-alpha-60:rgb(36 36 36/60%);--color-grey-14-alpha-70:rgb(36 36 36/70%);--color-grey-14-alpha-80:rgb(36 36 36/80%);--color-grey-14-alpha-90:rgb(36 36 36/90%);--color-brand-10:#061724;--color-brand-20:#082338;--color-brand-30:#0a2e4a;--color-brand-40:#0c3b5e;--color-brand-50:#0e4775;--color-brand-60:#0f548c;--color-brand-70:#115ea3;--color-brand-80:#0f6cbd;--color-brand-90:#2886de;--color-brand-100:#479ef5;--color-brand-110:#62abf5;--color-brand-120:#77b7f7;--color-brand-130:#96c6fa;--color-brand-140:#b4d6fa;--color-brand-150:#cfe4fa;--color-brand-160:#ebf3fc;--color-neutral-foreground-1:var(--color-white);--color-neutral-foreground-1-hover:var(--color-white);--color-neutral-foreground-1-pressed:var(--color-white);--color-neutral-foreground-1-selected:var(--color-white);--color-neutral-foreground-2:var(--color-grey-84);--color-neutral-foreground-2-hover:var(--color-white);--color-neutral-foreground-2-pressed:var(--color-white);--color-neutral-foreground-2-selected:var(--color-white);--color-neutral-foreground-2-brand-hover:var(--color-brand-100);--color-neutral-foreground-2-brand-pressed:var(--color-brand-90);--color-neutral-foreground-2-brand-selected:var(--color-brand-100);--color-neutral-foreground-3:var(--color-grey-68);--color-neutral-foreground-3-hover:var(--color-grey-84);--color-neutral-foreground-3-pressed:var(--color-grey-84);--color-neutral-foreground-3-selected:var(--color-grey-84);--color-neutral-foreground-3-brand-hover:var(--color-brand-100);--color-neutral-foreground-3-brand-pressed:var(--color-brand-90);--color-neutral-foreground-3-brand-selected:var(--color-brand-100);--color-neutral-foreground-4:var(--color-grey-60);--color-neutral-foreground-disabled:var(--color-grey-36);--color-neutral-foreground-inverted-disabled:var(--color-white-alpha-40);--color-brand-foreground-link:var(--color-brand-100);--color-brand-foreground-link-hover:var(--color-brand-110);--color-brand-foreground-link-pressed:var(--color-brand-90);--color-brand-foreground-link-selected:var(--color-brand-100);--color-neutral-foreground-2-link:var(--color-grey-84);--color-neutral-foreground-2-link-hover:var(--color-white);--color-neutral-foreground-2-link-pressed:var(--color-white);--color-neutral-foreground-2-link-selected:var(--color-white);--color-compound-brand-foreground-1:var(--color-brand-100);--color-compound-brand-foreground-1-hover:var(--color-brand-110);--color-compound-brand-foreground-1-pressed:var(--color-brand-90);--color-brand-foreground-1:var(--color-brand-100);--color-brand-foreground-2:var(--color-brand-110);--color-brand-foreground-2-hover:var(--color-brand-130);--color-brand-foreground-2-pressed:var(--color-brand-160);--color-neutral-foreground-1-static:var(--color-grey-14);--color-neutral-foreground-static-inverted:var(--color-white);--color-neutral-foreground-inverted:var(--color-grey-14);--color-neutral-foreground-inverted-hover:var(--color-grey-14);--color-neutral-foreground-inverted-pressed:var(--color-grey-14);--color-neutral-foreground-inverted-selected:var(--color-grey-14);--color-neutral-foreground-inverted-2:var(--color-grey-14);--color-neutral-foreground-on-brand:var(--color-white);--color-neutral-foreground-inverted-link:var(--color-white);--color-neutral-foreground-inverted-link-hover:var(--color-white);--color-neutral-foreground-inverted-link-pressed:var(--color-white);--color-neutral-foreground-inverted-link-selected:var(--color-white);--color-brand-foreground-inverted:var(--color-brand-80);--color-brand-foreground-inverted-hover:var(--color-brand-70);--color-brand-foreground-inverted-pressed:var(--color-brand-60);--color-brand-foreground-on-light:var(--color-brand-80);--color-brand-foreground-on-light-hover:var(--color-brand-70);--color-brand-foreground-on-light-pressed:var(--color-brand-50);--color-brand-foreground-on-light-selected:var(--color-brand-60);--color-neutral-background-1:var(--color-grey-16);--color-neutral-background-1-hover:var(--color-grey-24);--color-neutral-background-1-pressed:var(--color-grey-12);--color-neutral-background-1-selected:var(--color-grey-22);--color-neutral-background-2:var(--color-grey-12);--color-neutral-background-2-hover:var(--color-grey-20);--color-neutral-background-2-pressed:var(--color-grey-8);--color-neutral-background-2-selected:var(--color-grey-18);--color-neutral-background-3:var(--color-grey-8);--color-neutral-background-3-hover:var(--color-grey-16);--color-neutral-background-3-pressed:var(--color-grey-4);--color-neutral-background-3-selected:var(--color-grey-14);--color-neutral-background-4:var(--color-grey-4);--color-neutral-background-4-hover:var(--color-grey-12);--color-neutral-background-4-pressed:var(--color-black);--color-neutral-background-4-selected:var(--color-grey-10);--color-neutral-background-5:var(--color-black);--color-neutral-background-5-hover:var(--color-grey-8);--color-neutral-background-5-pressed:var(--color-grey-2);--color-neutral-background-5-selected:var(--color-grey-6);--color-neutral-background-6:var(--color-grey-20);--color-neutral-background-inverted:var(--color-white);--color-neutral-background-static:var(--color-grey-24);--color-neutral-background-alpha:var(--color-grey-10-alpha-50);--color-neutral-background-alpha-2:var(--color-grey-12-alpha-70);--color-neutral-background-disabled:var(--color-grey-8);--color-neutral-background-inverted-disabled:var(--color-white-alpha-10);--color-subtle-background:transparent;--color-subtle-background-hover:var(--color-grey-22);--color-subtle-background-pressed:var(--color-grey-18);--color-subtle-background-selected:var(--color-grey-20);--color-subtle-background-light-alpha-hover:var(--color-grey-14-alpha-80);--color-subtle-background-light-alpha-pressed:var(--color-grey-14-alpha-50);--color-subtle-background-light-alpha-selected:transparent;--color-subtle-background-inverted:transparent;--color-subtle-background-inverted-hover:var(--color-black-alpha-10);--color-subtle-background-inverted-pressed:var(--color-black-alpha-30);--color-subtle-background-inverted-selected:var(--color-black-alpha-20);--color-transparent-background:transparent;--color-transparent-background-hover:transparent;--color-transparent-background-pressed:transparent;--color-transparent-background-selected:transparent;--color-background-overlay:var(--color-black-alpha-50);--color-brand-background:var(--color-brand-70);--color-brand-background-hover:var(--color-brand-80);--color-brand-background-pressed:var(--color-brand-40);--color-brand-background-selected:var(--color-brand-60);--color-compound-brand-background:var(--color-brand-100);--color-compound-brand-background-hover:var(--color-brand-110);--color-compound-brand-background-pressed:var(--color-brand-90);--color-brand-background-static:var(--color-brand-80);--color-brand-background-2:var(--color-brand-20);--color-brand-background-2-hover:var(--color-brand-40);--color-brand-background-2-pressed:var(--color-brand-10);--color-brand-background-3-static:var(--color-brand-60);--color-brand-background-4-static:var(--color-brand-40);--color-brand-background-inverted:var(--color-white);--color-brand-background-inverted-hover:var(--color-brand-160);--color-brand-background-inverted-pressed:var(--color-brand-140);--color-brand-background-inverted-selected:var(--color-brand-150);--color-neutral-card-background:var(--color-grey-20);--color-neutral-card-background-hover:var(--color-grey-24);--color-neutral-card-background-pressed:var(--color-grey-18);--color-neutral-card-background-selected:var(--color-grey-22);--color-neutral-card-background-disabled:var(--color-grey-8);--color-neutral-stroke-accessible:var(--color-grey-68);--color-neutral-stroke-accessible-hover:var(--color-grey-74);--color-neutral-stroke-accessible-pressed:var(--color-grey-70);--color-neutral-stroke-accessible-selected:var(--color-brand-100);--color-neutral-stroke-1:var(--color-grey-40);--color-neutral-stroke-1-hover:var(--color-grey-46);--color-neutral-stroke-1-pressed:var(--color-grey-42);--color-neutral-stroke-1-selected:var(--color-grey-44);--color-neutral-stroke-2:var(--color-grey-32);--color-neutral-stroke-3:var(--color-grey-24);--color-neutral-stroke-subtle:var(--color-grey-4);--color-neutral-stroke-on-brand:var(--color-grey-16);--color-neutral-stroke-on-brand-2:var(--color-white);--color-neutral-stroke-on-brand-2-hover:var(--color-white);--color-neutral-stroke-on-brand-2-pressed:var(--color-white);--color-neutral-stroke-on-brand-2-selected:var(--color-white);--color-brand-stroke-1:var(--color-brand-100);--color-brand-stroke-2:var(--color-brand-50);--color-brand-stroke-2-hover:var(--color-brand-50);--color-brand-stroke-2-pressed:var(--color-brand-30);--color-brand-stroke-2-contrast:var(--color-brand-50);--color-compound-brand-stroke:var(--color-brand-100);--color-compound-brand-stroke-hover:var(--color-brand-110);--color-compound-brand-stroke-pressed:var(--color-brand-90);--color-neutral-stroke-disabled:var(--color-grey-26);--color-neutral-stroke-inverted-disabled:var(--color-white-alpha-40);--color-transparent-stroke:transparent;--color-transparent-stroke-interactive:transparent;--color-transparent-stroke-disabled:transparent;--color-neutral-stroke-alpha:var(--color-white-alpha-10);--color-neutral-stroke-alpha-2:var(--color-white-alpha-20);--color-stroke-focus-1:var(--color-black);--color-stroke-focus-2:var(--color-white);--shadow-2:0 0 2px var(--color-neutral-shadow-ambient),0 1px 2px var(--color-neutral-shadow-key);--shadow-4:0 0 2px var(--color-neutral-shadow-ambient),0 2px 4px var(--color-neutral-shadow-key);--shadow-8:0 0 2px var(--color-neutral-shadow-ambient),0 4px 8px var(--color-neutral-shadow-key);--shadow-16:0 0 2px var(--color-neutral-shadow-ambient),0 8px 16px var(--color-neutral-shadow-key);--shadow-28:0 0 8px var(--color-neutral-shadow-ambient),0 14px 28px var(--color-neutral-shadow-key);--shadow-64:0 0 8px var(--color-neutral-shadow-ambient),0 32px 64px var(--color-neutral-shadow-key);--shadow-2-brand:0 0 2px var(--color-brand-shadow-ambient),0 1px 2px var(--color-brand-shadow-key);--shadow-4-brand:0 0 2px var(--color-brand-shadow-ambient),0 2px 4px var(--color-brand-shadow-key);--shadow-8-brand:0 0 2px var(--color-brand-shadow-ambient),0 4px 8px var(--color-brand-shadow-key);--shadow-16-brand:0 0 2px var(--color-brand-shadow-ambient),0 8px 16px var(--color-brand-shadow-key);--shadow-28-brand:0 0 8px var(--color-brand-shadow-ambient),0 14px 28px var(--color-brand-shadow-key);--shadow-64-brand:0 0 8px var(--color-brand-shadow-ambient),0 32px 64px var(--color-brand-shadow-key);--font-family-default:'Segoe UI','Segoe UI Web (West European)',-apple-system,blinkmacsystemfont,roboto,'Helvetica Neue',sans-serif}
`,RX='<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M16 13a1 1 0 0 1 1 1v9a1 1 0 1 1-2 0v-9a1 1 0 0 1 1-1Zm0-2a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM2 16a14 14 0 1 1 28 0 14 14 0 0 1-28 0ZM16 4a12 12 0 1 0 0 24 12 12 0 0 0 0-24Z"/></svg>';var NX=Object.defineProperty,OX=Object.getOwnPropertyDescriptor,UX=(o,s,c,h)=>{for(var d=h>1?void 0:h?OX(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&NX(s,c,d),d};let B3=class extends An{render(){return St`
      <div class="dialog">
        <div class="header-icon">${cn(RX)}</div>

        <div class="content">
          <hgroup>
            <h2>${le("You may not access this content")}</h2>
          </hgroup>
        </div>
      </div>
    `}};B3.styles=[so,C0,Cn`
:host{display:flex;align-items:center;justify-content:center;background-color:var(--color-neutral-background-2)}.dialog{padding:var(--spacing-xxxl) var(--spacing-xxxl);display:flex;align-items:center;gap:var(--spacing-xl);z-index:10;margin:var(--spacing-xxl);max-width:var(--size-100)}.content{display:flex;align-items:flex-start;flex-direction:column;gap:var(--spacing-xxl);padding-right:var(--spacing-xxxl)}.header-icon{padding:var(--spacing-s);color:var(--color-brand-130);fill:currentcolor}.header-icon svg{display:block}h2{margin:0;padding:0}hgroup{display:flex;flex-direction:column;gap:var(--spacing-xs)}p{margin:0;padding:0}.select-container{display:flex;gap:var(--spacing-m)}
    `],B3=UX([Xn("ump-age-gate-restricted")],B3);const FX='<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M9 9a7 7 0 1 1 14 0A7 7 0 0 1 9 9Zm7-6a6 6 0 1 0 0 12 6 6 0 0 0 0-12Zm.38 15H7.5A3.5 3.5 0 0 0 4 21.5v.67C4 24.32 6.77 30 16 30c.43 0 .84-.01 1.24-.04-.31-.3-.6-.62-.87-.96H16c-8.77 0-11-5.32-11-6.83v-.67A2.5 2.5 0 0 1 7.5 19h8.2c.2-.35.43-.68.68-1Zm7.12-2a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15Zm4.53 4.72c.3.3.3.77 0 1.06l-5.25 5.25c-.3.3-.77.3-1.06 0l-2.5-2.5a.75.75 0 1 1 1.06-1.06l1.97 1.97 4.72-4.72c.3-.3.77-.3 1.06 0Z"/></svg>',jX=Cn`
.select{--svg:url('data:image/svg+xml;utf8,${Ax(encodeURIComponent('<svg width="16" height="16" fill="none" stroke="#666" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.293 8.293a1 1 0 0 1 1.414 0L12 14.586l6.293-6.293a1 1 0 1 1 1.414 1.414l-7 7a1 1 0 0 1-1.414 0l-7-7a1 1 0 0 1 0-1.414Z" fill="#ffffff"/></svg>'))}');position:relative;display:inline-flex;align-items:center;gap:var(--spacing-s-nudge);margin:0;-webkit-appearance:none;appearance:none;padding:var(--spacing-s) var(--spacing-xxxl) var(--spacing-s) var(--spacing-l);color:var(--color-neutral-foreground-1);transition-duration:var(--duration-faster);transition-property:background,color;font-size:var(--font-size-base-400);transition-timing-function:var(--curve-easy-ease);cursor:pointer;-webkit-user-select:none;user-select:none;background-color:var(--color-neutral-background-1);border-radius:var(--border-radius-medium);border:none;background-image:var(--svg);background-repeat:no-repeat;background-position-y:center;background-position-x:calc(100% - 8px);font-family:var(--font-family-default)}.select:focus{outline:none;border-bottom:solid var(--stroke-width-thick) var(--color-brand-stroke-1)}.select:focus-within{outline:none;border-bottom:solid var(--stroke-width-thick) var(--color-brand-stroke-1)}.select.focus-always:focus,.select.focus-default:focus-visible{outline:var(--stroke-width-thick) solid var(--color-stroke-focus-2)}.select:active{outline:none}.select-outline{border:solid var(--stroke-width-thick) var(--color-neutral-stroke-1)}.select-outline.focus-always:focus,.select-outline.focus-default:focus-visible{border:solid var(--stroke-width-thick) var(--color-neutral-stroke-1)}
`;function BX(o){const s=new Date,c=new Date(o);c.setFullYear(s.getFullYear());let h=s.getFullYear()-o.getFullYear();return s<c&&h--,h}function V3(o,s){return Array.from({length:s-o+1},(c,h)=>o+h)}var VX=Object.defineProperty,$X=Object.getOwnPropertyDescriptor,Fg=(o,s,c,h)=>{for(var d=h>1?void 0:h?$X(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&VX(s,c,d),d};const zX=V3(1,12),HX=V3(1,31),qX=V3(1900,new Date().getFullYear()).reverse();let mc=class extends An{render(){return St`
    <div class="dialog">
      <div class="header-icon">${cn(FX)}</div>

        <div class="content">
          <hgroup>
            <h2>${le("Please enter your date of birth")}</h2>
          </hgroup>

          <div class="select-container">
            <div class="select-wrapper">
              <label for="month">${le("Month")}</label>
              <select
                class=${nt({...lt(this.playerState),select:!0,"select-outline":!0})}
                aria-label="${le("Month")}"
                data-testid="month"
                id="month"
                >
                <option disabled selected value=''></option>
                ${zX.map(o=>St`<option value=${o}>${o}</option>`)}
              </select>
            </div>

            <div class="select-wrapper">
              <label for="day">${le("Day")}</label>
              <select
                class=${nt({...lt(this.playerState),select:!0,"select-outline":!0})}
                aria-label="${le("Day")}"
                data-testid="day"
                id="day"
                >
                <option disabled selected value=''></option>
                ${HX.map(o=>St`<option value=${o}>${o}</option>`)}
              </select>
            </div>

            <div class="select-wrapper">
              <label for="year">${le("Year")}</label>
              <select
                class=${nt({...lt(this.playerState),select:!0,"select-outline":!0})}
                aria-label="${le("Year")}"
                data-testid="year"
                id="year"
                >
                <option disabled selected value=''></option>
                ${qX.map(o=>St`<option value=${o}>${o}</option>`)}
              </select>
            </div>
          </div>

          <button
            type="button"
            class=${nt({btn:!0,"btn-s":!0,"btn-brand":!0,...lt(this.playerState)})}
            data-testid="age-gate-submit"
          @click=${this.submitButtonClicked}>${le("Submit")}</button>
        </div>
      </div>
    </div>
    `}submitButtonClicked(){const o=this.monthSelect.value,s=this.daySelect.value,c=this.yearSelect.value;if(!o||!s||!c)return;const h=BX(new Date(Number(c),Number(o)-1,Number(s)));this.dispatchEvent(new Pt("user-age-set-interaction",h))}};mc.styles=[so,jX,C0,Cn`
:host{display:flex;align-items:center;justify-content:center}.dialog{padding:var(--spacing-xxl) var(--spacing-xxxl);display:flex;align-items:flex-start;gap:var(--spacing-xl);z-index:10;margin:var(--spacing-xxl);max-width:var(--size-100)}.content{display:flex;align-items:flex-start;flex-direction:column;gap:var(--spacing-xxxl);padding-right:var(--spacing-xxl)}.header-icon{padding:var(--spacing-s);color:var(--color-brand-130);fill:currentcolor}hgroup{display:flex;flex-direction:column;gap:var(--spacing-xs)}hgroup h2{margin:0;padding:0}hgroup p{margin:0;padding:0}.select-container{display:flex;flex-direction:row;gap:var(--spacing-m)}.select-wrapper{display:flex;flex-direction:column}.select{background-color:var(--color-brand-30)}.select-outline{border-color:var(--color-brand-150);border-width:var(--stroke-width-thin)}.select-outline.default:focus-visible,.select-outline.focus-always:focus{border-width:var(--stroke-width-thin)}
    `],Fg([On("#month")],mc.prototype,"monthSelect",2),Fg([On("#day")],mc.prototype,"daySelect",2),Fg([On("#year")],mc.prototype,"yearSelect",2),Fg([Tr({context:Ar,subscribe:!0})],mc.prototype,"playerState",2),mc=Fg([Xn("ump-age-gate-verification")],mc);const GX='<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M17.25 22a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM16 9a1 1 0 0 0-1 1v8a1 1 0 1 0 2 0v-8a1 1 0 0 0-1-1Zm-3.06-5.2a3.5 3.5 0 0 1 6.12 0l10.5 19a3.5 3.5 0 0 1-3.07 5.2H5.51a3.5 3.5 0 0 1-3.07-5.2l10.5-19Zm4.37.98a1.5 1.5 0 0 0-2.62 0l-10.5 19A1.5 1.5 0 0 0 5.51 26h20.98a1.5 1.5 0 0 0 1.32-2.23l-10.5-19Z"/></svg>';var KX=Object.defineProperty,WX=Object.getOwnPropertyDescriptor,A7=(o,s,c,h)=>{for(var d=h>1?void 0:h?WX(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&KX(s,c,d),d};let L1=class extends An{render(){return St`
      <div class="dialog message-container" data-testid="error-message">
        <div class="header-icon">${cn(GX)}</div>

        <div class="content">
          <hgroup>
            <h2>${le("Playback Error")}</h2>
            <p>${this.playerState.error}</p>
          </hgroup>
        </div>
      </div>
    `}};L1.styles=[so,C0,Cn`
:host{display:flex;align-items:center;justify-content:center;background-color:var(--color-brand-10)}.message-container{display:flex;align-items:flex-start;gap:var(--spacing-xl);padding:var(--spacing-xxxl) var(--spacing-xxxl)}.content{display:flex;align-items:flex-start;flex-direction:column;gap:var(--spacing-xxl);padding-right:var(--spacing-xxxl)}.header-icon{padding:var(--spacing-s);color:var(--color-brand-foreground-1);fill:currentcolor}h2{margin:0;padding:0}hgroup{display:flex;flex-direction:column;gap:var(--spacing-xs)}p{margin:0;padding:0}.select-container{display:flex;gap:var(--spacing-m)}
    `],A7([Tr({context:Ar,subscribe:!0})],L1.prototype,"playerState",2),L1=A7([Xn("ump-error-modal")],L1);var XX=Object.defineProperty,YX=Object.getOwnPropertyDescriptor,E7=(o,s,c,h)=>{for(var d=h>1?void 0:h?YX(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&XX(s,c,d),d};let R1=class extends An{render(){return this.playerState.error?St`<ump-error-modal class="modal"></ump-error-modal>`:this.playerState.ageGate==="waiting"?St`<div
        data-testid="age-gate-overlay"
        class="overlay modal"
      ></div>`:this.playerState.ageGate==="verification"?St`<ump-age-gate-verification
        class="modal"
      ></ump-age-gate-verification> `:this.playerState.ageGate==="denied"?St`<ump-age-gate-restricted
        class="modal"
      ></ump-age-gate-restricted>`:null}updated(o){var s;super.updated(o);const c=!((s=this.shadowRoot)!=null&&s.children.length);this.ariaHidden=c.toString()}};R1.styles=[T7,Cn`
:host([aria-hidden='true']){display:none}.overlay{background-color:var(--color-black)}.modal{position:absolute;inset:0;width:100%;height:100%;text-align:left}ump-age-gate-verification,ump-age-gate-restricted{background-color:var(--color-brand-10)}
    `],E7([Tr({context:Ar,subscribe:!0})],R1.prototype,"playerState",2),R1=E7([Xn("ump-modals")],R1);function N1(o){return o.map(s=>({...s,type:x_[s.type]??s.type})).sort((s,c)=>{let h=w_.indexOf(s.type)-w_.indexOf(c.type);return h===0&&s.type==="video/mp4"&&(h=S0.indexOf(s.quality)-S0.indexOf(c.quality)),h}).filter(JX)}function JX(o){return document.createElement("video").canPlayType(o.type)!=""?!0:"ManagedMediaSource"in window||"MediaSource"in window}function C7(o){const s=o.map(c=>({...c,ccType:XV[c.ccType]??c.ccType})).reduce((c,h)=>(c[h.locale]||(c[h.locale]=[]),c[h.locale].push(h),c),{});return Object.values(s).map(c=>c.find(h=>h.ccType==="text/vtt")??c[0])}function $3(o){let s=!1,c;return(...h)=>(s||(c=o(...h),s=!0),c)}const QX=$3(async()=>{try{const o=document.createElement("video"),s=o.volume;o.volume=s/2+.1;const c=o.volume;return s!==c&&await new Promise(h=>setTimeout(h,1)),s!==o.volume}catch{return!1}}),ZX=$3(()=>typeof document.createElement("div").requestFullscreen=="function");function eY(o){return"webkitEnterFullscreen"in o&&"webkitSupportsFullscreen"in o&&typeof o.webkitEnterFullscreen=="function"&&o.webkitSupportsFullscreen}function tY(o,s){return Object.fromEntries(Object.entries(o).filter(([c,h])=>!s(c,h)))}function nY(o){return tY(o,(s,c)=>c==null)}const z3=["abort","canplay","canplaythrough","complete","cuechange","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"];class rY extends gn.Player{constructor(s,c,h){super(),this.videoElementEventListeners={},this.plugins=[],this.pluginOnDestroy=[],this.loadRequested=!1,this._autoplay=!1,this.onFullscreenChange=()=>{this.dispatchEvent(new gn.util.FakeEvent("fullscreenchanged"))},this.options={...Nx,...nY(s)},s.autoplay&&s.muted!==!1&&(this.options.muted=!0),this.videoElement=c,this.lastSelectedVolume=c.volume,this.captionDisplay=h,this.configure({streaming:{bufferBehind:300,ignoreTextStreamFailures:!0}})}async initialize(){this.plugins.forEach(s=>this.pluginOnDestroy.push(s(this))),this.setVideoContainer(this.captionDisplay.captionContainer),this.forwardVideoElementEvents(),this.loop=this.options.loop,this.muted=this.options.muted,this.options.hidePosterImage||(this.poster=this.options.poster),this.videoElement.disablePictureInPicture=!0,this.videoElement.playsInline=!0,await this.attach(this.videoElement)}async destroy(){Object.entries(this.videoElementEventListeners).forEach(([s,c])=>this.videoElement.removeEventListener(s,c)),this.pluginOnDestroy.forEach(s=>s()),this.removeFullscreenListener(),await super.destroy()}load(s,c,h){return h===x_.MP4&&(this.adaptiveBitrate=!1),super.load(s,c,h)}async loadCaptions(s=this.options.ccFiles){try{for(const c of C7(s))await this.addTextTrackAsync(c.url,c.locale,"captions",c.ccType)}catch(c){console.error(`Failed to load captions: ${c}`),this.dispatchUmpError({severity:gn.util.Error.Severity.RECOVERABLE,umpErrorType:"Error loading captions",umpErrorDescription:JSON.stringify(c)})}}async play(){if(this.getLoadMode()===gn.Player.LoadMode.NOT_LOADED){this.addEventListener("loadsourcescomplete",this.handleLoadSourcesComplete),this.loadRequest();return}return this.videoElement.play()}pause(){if(!this.isFullyLoaded()){this.removeEventListener("loadsourcescomplete",this.handleLoadSourcesComplete);return}return this.videoElement.pause()}loadRequest(){this.loadRequested||(this.loadRequested=!0,this.dispatchEvent(new gn.util.FakeEvent("loadsourcesrequest")))}handleLoadSourcesComplete(){this.videoElement.play()}requestFullscreen(s){this.removeFullscreenListener(),ZX()?(this.fullscreenElement=s,s.addEventListener("fullscreenchange",this.onFullscreenChange),s.requestFullscreen({navigationUI:"hide"})):eY(this.videoElement)&&this.videoElement.webkitEnterFullscreen()}exitFullscreen(){document.exitFullscreen()}get fullscreen(){return document.fullscreenElement!==null}get ended(){return this.videoElement.ended}get paused(){return this.videoElement.paused}get duration(){return this.videoElement.duration}get currentTime(){return this.videoElement.currentTime}set currentTime(s){this.videoElement.currentTime=s}get loop(){return this.videoElement.loop}set loop(s){this.videoElement.loop=s}get autoplay(){return this._autoplay}set autoplay(s){this._autoplay=s}get muted(){return this.volume===0?!0:this.videoElement.muted}set muted(s){this.videoElement.muted=s,this.videoElement.volume=s?0:this.lastSelectedVolume}get playbackRate(){return this.getPlaybackRate()}set playbackRate(s){this.videoElement.playbackRate=s}get poster(){return this.videoElement.poster}set poster(s){const c=new Image;c.addEventListener("load",()=>{this.dispatchEvent(new gn.util.FakeEvent("playerposterloadcomplete"))}),c.src=s,this.videoElement.poster=c.src}get volume(){return this.videoElement.volume}set volume(s){this.videoElement.muted=!1,this.videoElement.volume=s}get adaptiveBitrate(){return this.getConfiguration().abr.enabled}set adaptiveBitrate(s){this.configure({abr:{enabled:s}})}get videoQualities(){if(this.getManifestType()){const s=this.filterRelatedAdaptiveTracks();return s.length===0?[]:[{videoId:Ad.videoId,label:le(Ad.label)},...s]}else return this.filterStaticMp4Tracks()}get activeVideoId(){var s,c;if(this.getManifestType()){const h=(s=this.getVariantTracks().find(d=>d.active))==null?void 0:s.videoId;if(h)return h}else{const h=this.getAssetUri();return(c=this.options.sources.find(d=>d.src===h))==null?void 0:c.quality}}get buffered(){const s=this.videoElement,c=[];for(let h=0;h<s.buffered.length;h++)c.push({start:s.buffered.start(h),end:s.buffered.end(h)});return c}dispatchUmpError(s){this.dispatchEvent(new gn.util.FakeEvent("error",new Map().set("detail",s)))}saveLastSelectedVolume(s){s!==0&&(this.lastSelectedVolume=s)}async selectVideoQuality(s){if(this.getManifestType()){if(s.videoId===Ad.videoId){this.adaptiveBitrate=!0;return}this.adaptiveBitrate=!1;const c=this.getVariantTracks().filter(h=>h.audioId===this.activeAudioTrackId).find(h=>h.videoId===s.videoId);if(!c)throw new gn.util.Error(gn.util.Error.Severity.RECOVERABLE,gn.util.Error.Category.MEDIA,gn.util.Error.Code.VIDEO_ERROR);this.adaptiveBitrate=!1,this.selectVariantTrack(c,!0)}else{const c=N1(this.options.sources).find(m=>m.quality===s.videoId);if(!c)throw new gn.util.Error(gn.util.Error.Severity.RECOVERABLE,gn.util.Error.Category.MEDIA,gn.util.Error.Code.VIDEO_ERROR);const h=!this.paused,d=this.activeCaptionTrack;await this.load(c.src,this.videoElement.currentTime,c.type),h&&this.play(),await this.loadCaptions(),this.captionTrack=d}}get umpAudioTracks(){const s=this.getAudioTracks(),c=s.map(d=>d.originalLanguage??d.language),h=A0(c);return s.map((d,m)=>({displayName:h[c[m]],isDescriptiveAudio:this.isDescriptiveAudio(d.roles),shakaAudioTrack:d})).sort((d,m)=>d.displayName.localeCompare(m.displayName))}get activeAudioTrackId(){var s;const c=(s=this.getVariantTracks().find(h=>h.active))==null?void 0:s.audioId;if(c)return c}set audioTrack(s){this.selectAudioTrack(s)}get captionTracks(){const s=A0(this.getTextTracks().map(h=>h.language)),c=this.getTextTracks().map(h=>({captionId:h.id,language:h.language,label:s[h.language]})).sort((h,d)=>h.label.localeCompare(d.label));return[Ed,...c]}get activeCaptionTrack(){var s;const c=(s=this.getTextTracks().find(d=>d.active))==null?void 0:s.id,h=this.captionTracks.find(d=>d.captionId===c);return!h||!this.isTextTrackVisible()?Ed:h}get activeCaptionTrackId(){return this.activeCaptionTrack.captionId}set captionTrack(s){if(s.captionId===Ed.captionId){this.setTextTrackVisibility(!1);return}this.selectTextLanguage(s.language),this.setTextTrackVisibility(!0)}addPlugin(s){this.plugins.push(s)}addPlugins(...s){s.forEach(c=>this.addPlugin(c))}addEventListener(s,c,h){h?.once===!0?iY(this,s,c):super.addEventListener(s,c,h)}forwardVideoElementEvents(){z3.forEach(s=>{const c=()=>this.dispatchEvent(new gn.util.FakeEvent(s));this.videoElementEventListeners[s]=c,this.videoElement.addEventListener(s,c)})}filterStaticMp4Tracks(){return N1(this.options.sources).filter(s=>s.type==="video/mp4").sort((s,c)=>S0.indexOf(s.quality)-S0.indexOf(c.quality)).map(s=>({videoId:s.quality,label:s.quality}))}filterRelatedAdaptiveTracks(){const s=this.getVariantTracks(),c=s.find(h=>h.active);return c?s.filter(h=>h.audioId===c.audioId).sort((h,d)=>d.height===h.height||h.height==null||d.height==null?d.bandwidth-h.bandwidth:d.height-h.height).reduce((h,d)=>{const m=new Set(h.map(f=>f.height??f.bandwidth)),b=d.height??d.bandwidth;return m.has(b)||h.push(d),h},[]).map(h=>({videoId:h.videoId,label:h.height?h.height.toString():`${(h.bandwidth/1e6).toFixed(2)} Mbps`})):[]}removeFullscreenListener(){this.fullscreenElement&&this.fullscreenElement.removeEventListener("fullscreenchange",this.onFullscreenChange)}isDescriptiveAudio(s){return s.some(c=>[k0.dashIdentifier,k0.hlsIdentifier].includes(c))}}function iY(o,s,c){const h=d=>{o.removeEventListener(s,h),c(d)};o.addEventListener(s,h)}class aY{constructor(s,c){this.prefix=s,this.store=c}getItem(s){return this.store.getItem(this.prefixed(s))}getNumber(s){const c=this.getItem(s);if(c===null)return null;const h=Number(c);return isNaN(h)?null:h}setNumber(s,c){this.setItem(s,c.toString())}setItem(s,c){this.store.setItem(this.prefixed(s),c)}removeItem(s){this.store.removeItem(this.prefixed(s))}prefixed(s){return`${this.prefix}:${s}`}}const I7=new aY(S_,window.sessionStorage),H3="agegateupdate",q3="UserAge";function oY(o,s){return c=>{var h,d;if(c.options.ageGate===!1)return()=>{};let m=typeof c.options.ageGate=="object"&&typeof((h=c.options.ageGate)==null?void 0:h.minimumAge)=="number"?c.options.ageGate.minimumAge:null,b=typeof c.options.ageGate=="object"&&typeof((d=c.options.ageGate)==null?void 0:d.userAge)=="number"?c.options.ageGate.userAge:I7.getNumber(q3),f=!1;A();function A(){if(s.value.ageGate==="verified"){w();return}return m===0?M("verified"):m===null?M("waiting"):b===null?M("verification"):b>=m?M("verified"):M("denied")}function M(ie){const ge=s.value.ageGate;s.setValue({...s.value,ageGate:ie}),o.updateComplete.then(()=>{f&&ge==="verification"&&s.value.ageGate==="verified"&&o.focusPlayButton()})}function D(ie){m=ie.detail,A()}function N(ie){b=ie.detail,A(),sY(b)}function F(ie){f=!0,N(ie)}function L(ie){b=ie.detail,A(),window.removeEventListener(H3,L)}function w(){G.removeAllListeners(),Z.removeAllListeners()}function U(ie){if(ie.key!==`${S_}:${q3}`||!ie.newValue)return;const ge=Number(ie.newValue);isNaN(ge)||(b=ge,A(),window.removeEventListener("storage",U))}const G=xf(window),Z=xf(o);return G.addEventListener(H3,L),G.addEventListener("storage",U),Z.addEventListener("minimum-age-set",D),Z.addEventListener("user-age-set",N),Z.addEventListener("user-age-set-interaction",F),()=>{w()}}}function sY(o){I7.setNumber(q3,o),window.dispatchEvent(new Pt(H3,o))}const G3=new EventTarget;let K3=null;function uY(o){o!==K3&&(K3=o,G3.dispatchEvent(new Event("change")))}function M7(){return K3}function lY(o,s){return c=>{if(!c.options.autoplay)return()=>{};let h=!1;const d=window.matchMedia("(prefers-reduced-motion: reduce)"),m={threshold:c.options.percentage/100},b=new IntersectionObserver(w=>{L(w[0]),f()&&(w[0].isIntersecting?c.paused&&(!h&&c.currentTime===0&&(c.dispatchEvent(new gn.util.FakeEvent("umpplay")),h=!0),c.play()):c.paused||c.pause())},m);function f(){if(typeof s.value.ageGate=="string"&&s.value.ageGate!=="verified")return!1;const w=M7();return typeof w=="boolean"?w:!d.matches}function A(){c.autoplay=f()}function M(){A()}function D(){A()}function N(){A(),d.addEventListener("change",M),G3.addEventListener("change",D),o.addEventListener("click",F,{once:!0}),c.addEventListener("ended",F,{once:!0}),b.observe(o)}function F(){c.autoplay=!1,b.disconnect(),d.removeEventListener("change",M),G3.removeEventListener("change",D),o.removeEventListener("click",F)}const L=$3(w=>{(!c.autoplay||!w.isIntersecting)&&(c.options.hideControls==null&&s.setValue({...s.value,controlsState:"bigplaybutton"}),c.options.hidePosterImage||(c.poster=c.options.poster))});return N(),F}}function cY(o){return()=>{async function s(){const c=await QX();o.setValue({...o.value,showVolumeSlider:c})}return s(),()=>{}}}function dY(o,s){return c=>{var h;function d(b){o.dir=b,s.setValue({...s.value,dir:b})}const m=(h=document.documentElement.getAttribute("dir"))==null?void 0:h.toLowerCase();return d(c.options.dir==="ltr"||c.options.dir==="rtl"?c.options.dir:m==="ltr"||m==="rtl"?m:"ltr"),()=>{}}}function pY(o){return s=>(o.setValue({...o.value,disableKeyboardEvents:s.options.disableKeyboardEvents}),()=>{})}function hY(o,s){return c=>{if(!c.options.showDownloadMenu)return s.setValue({...s.value,showDownloadMenu:!1}),()=>{};const h=xf(o);h.addEventListener("download-file-clicked",d),h.addEventListener("download-files-updated",m),c.options.downloadableFiles.length>0&&b(c.options.downloadableFiles);async function d(f){let A=null;try{const{url:M}=f.detail,D=await fetch(M);if(!D.ok)throw new Error(`Failed to download file: ${D.url} ${D.statusText}`);const N=await D.blob();A=document.createElement("a"),A.href=URL.createObjectURL(N);const F=M.split("/").pop();A.download=F,document.body.appendChild(A),A.dispatchEvent(new MouseEvent("click",{bubbles:!1}))}catch(M){console.error(`Failed to download file: ${M}`)}finally{A!=null&&A.href&&(URL.revokeObjectURL(A.href),document.body.removeChild(A))}}function m(f){b(f.detail)}function b(f){const A=f.filter(L=>L.url),M=A0(A.filter(L=>L.mediaType==="video").map(L=>L.locale)),D=A.filter(L=>L.mediaType==="video").map(L=>({...L,lang:L.locale,locale:M[L.locale]})).sort((L,w)=>L.locale.localeCompare(w.locale)),N=A0(A.filter(L=>L.mediaType==="transcript").map(L=>L.locale)),F=A.filter(L=>L.mediaType==="transcript").map(L=>({...L,lang:L.locale,locale:N[L.locale]})).sort((L,w)=>L.locale.localeCompare(w.locale));s.setValue({...s.value,downloadableVideoFiles:D,downloadableTranscriptFiles:F})}return()=>{h.removeAllListeners()}}}function fY(o){return s=>{const c={abrstatuschanged:()=>vc(o,s),adaptation:()=>vc(o,s),audiotrackschanged:()=>{W3(o,s)},loaded:()=>{W3(o,s),vc(o,s),_7(o,s)},mediaqualitychanged:()=>vc(o,s),trackschanged:()=>W3(o,s),textchanged:()=>vc(o,s),texttrackvisibility:()=>vc(o,s),timeupdate:()=>mY(o,s),variantchanged:()=>vc(o,s),volumechange:()=>_7(o,s),ended:()=>vY(o),playing:()=>yY(o),pause:()=>bY(o),seeking:()=>wY(o),durationchange:()=>xY(o,s),fullscreenchanged:()=>SY(o,s),ratechange:()=>kY(o,s),error:h=>TY(o,s,h.detail),progress:()=>AY(o,s)};return gY(o,s),EY(o,s),Object.entries(c).forEach(([h,d])=>s.addEventListener(h,d)),()=>{}}}function gY(o,s){const c=s.options.playbackRates.map(h=>({label:h===1?"Normal":`${h}x`,value:h}));o.setValue({...o.value,playbackRates:c})}function mY(o,s){o.setValue({...o.value,currentTime:s.currentTime})}function _7(o,s){o.setValue({...o.value,volume:s.volume,muted:s.muted})}function vc(o,s){const c=s.activeVideoId;o.setValue({...o.value,activeVideoQualityId:c,selectedVideoQualityId:s.adaptiveBitrate?Ad.videoId:c,selectedCaptionTrackId:s.activeCaptionTrackId})}function W3(o,s){o.setValue({...o.value,videoQualities:s.videoQualities,audioTracks:s.umpAudioTracks,captionTracks:s.captionTracks})}function vY(o){o.setValue({...o.value,ended:!0})}function yY(o){o.setValue({...o.value,paused:!1})}function bY(o){o.setValue({...o.value,paused:!0})}function wY(o){o.setValue({...o.value,ended:!1})}function xY(o,s){o.setValue({...o.value,duration:s.duration})}function SY(o,s){o.setValue({...o.value,fullscreen:s.fullscreen})}function kY(o,s){o.setValue({...o.value,playbackRate:s.playbackRate})}function TY(o,s,c){c.severity===gn.util.Error.Severity.CRITICAL&&(s.options.showImageOnError?(s.unload(),o.setValue({...o.value,controlsState:"none"})):o.setValue({...o.value,error:QV}))}function AY(o,s){o.setValue({...o.value,buffered:s.buffered})}function EY(o,s){function c(m){o.setValue({...o.value,loading:m})}function h(){c(!0);const m=s.currentTime,b=()=>{m!==s.currentTime&&(c(!1),s.removeEventListener("timeupdate",b))};s.addEventListener("timeupdate",b)}function d(m){m.detail.severity===gn.util.Error.Severity.CRITICAL&&c(!1)}s.addEventListener("playerloadmediastart",h),s.addEventListener("waiting",h),s.addEventListener("error",d),s.addEventListener("ended",()=>c(!1)),s.addEventListener("playing",()=>c(!1)),s.addEventListener("canplay",()=>c(!1)),s.addEventListener("canplaythrough",()=>c(!1))}function CY(o,s){return c=>{const h=[],d={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},m=()=>{const F=o.getBoundingClientRect();return!(F.width===0||F.height===0)},b=F=>({size:()=>m(),visibility:()=>o.checkVisibility(d),all:()=>m()||o.checkVisibility(d)})[F](),f=F=>{const L=b(F);s.setValue({...s.value,visible:L}),L||c.pause()},A=F=>{F.forEach(L=>{L.type==="attributes"&&L.attributeName==="style"&&f("visibility")})},M={attributes:!0};(F=>{const L=new MutationObserver(A);for(;F;){L.observe(F,M),h.push(L);const w=F?.getRootNode();F=F?.assignedSlot||F?.parentElement||(w instanceof ShadowRoot?w.host:null)}})(o);const D=F=>{F.forEach(()=>{f("size")})},N=new ResizeObserver(D);return N.observe(o),f("all"),()=>{h.forEach(F=>F.disconnect()),N.disconnect()}}}function IY(o){return s=>(s.options.playFullScreen&&s.addEventListener("play",()=>{s.requestFullscreen(o)},{once:!0}),()=>{})}function MY(o){return s=>{s.options.qualityBehavior==="forceHighestQuality"&&s.configure({abr:{enable:!1,defaultBandwidthEstimate:1e10,useNetworkInformation:!1}}),o.setValue({...o.value,showQualityMenu:s.options.showQualityMenu});async function c(){if(s.options.qualityBehavior==="forceHighestQuality"&&s.getManifest()){const h=s.videoQualities[1];h&&s.selectVideoQuality(h)}}return s.addEventListener("loadsourcescomplete",c,{once:!0}),()=>{}}}const _Y=`<svg
  width="38"
  height="37"
  viewBox="0 0 38 37"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <path
    d="M8.01585 5.78125C5.14224 5.78125 2.81272 8.11077 2.81272 10.9844V12.695C2.81242 12.7102 2.81243 12.7253 2.81272 12.7405V26.0156C2.81272 28.8892 5.14224 31.2188 8.01585 31.2188H29.9846C32.8582 31.2188 35.1877 28.8892 35.1877 26.0156V12.7405C35.188 12.7253 35.188 12.7102 35.1877 12.695V10.9844C35.1877 8.11077 32.8582 5.78125 29.9846 5.78125H8.01585ZM32.8752 12.0281L19.0002 19.4993L5.12522 12.0281V10.9844C5.12522 9.38793 6.4194 8.09375 8.01585 8.09375H29.9846C31.581 8.09375 32.8752 9.38793 32.8752 10.9844V12.0281ZM5.12522 14.6546L18.452 21.8305C18.7943 22.0148 19.2062 22.0148 19.5484 21.8305L32.8752 14.6546V26.0156C32.8752 27.6121 31.581 28.9062 29.9846 28.9062H8.01585C6.4194 28.9062 5.12522 27.6121 5.12522 26.0156V14.6546Z"
  />
</svg>`,DY=`<svg
  width="16"
  height="30"
  viewBox="0 0 16 30"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <g clip-path="url(#clip0_511_2982)">
    <path
      fill-rule="evenodd"
      clip-rule="evenodd"
      d="M15.6346 4.86093C9.21328 4.47388 10.4141 7.03694 10.35 11.136C11.691 11.136 14.6137 11.1421 15.4183 11.1421C15.0983 13.2175 14.6746 15.9452 14.6045 16.3993C13.0777 16.4054 11.6819 16.4114 10.3592 16.4145C10.3653 19.008 10.3683 27.8614 10.344 29.3425C9.42357 29.3425 5.54394 29.3974 4.65708 29.3425C4.65708 27.258 4.65098 18.5631 4.65098 16.3993C3.51422 16.3993 1.47535 16.4114 0.012491 16.3932C0.012491 15.3265 -0.00579475 12.9829 0.012491 11.133C0.844494 11.1116 3.70012 11.133 4.66317 11.1025C4.66317 9.9139 4.65708 8.7619 4.65403 7.25332C4.63879 1.92911 8.11919 -1.12157 15.6407 0.387011C15.6407 1.64568 15.6407 3.93445 15.6407 4.86093H15.6346Z"
    />
  </g>
  <defs>
    <clipPath id="clip0_511_2982">
      <rect width="15.6343" height="29.37" fill="white" />
    </clipPath>
  </defs>
</svg>`,PY=`<svg
  width="24"
  height="24"
  viewBox="0 0 24 24"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <g clip-path="url(#clip0_511_2987)">
    <path
      fill-rule="evenodd"
      clip-rule="evenodd"
      d="M13.3045 7.94905L8.62619 7.98985L8.59559 24C10.1698 24 11.7439 24 13.3181 23.9831C13.3181 21.9567 13.3113 18.9444 13.3181 16.5372C13.3215 14.4599 13.4303 12.0731 16.1502 11.9712C18.9687 11.8658 19.0163 14.3953 19.0197 16.51C19.0231 18.8458 18.9007 21.5691 19.0197 23.8607L23.8918 23.8811C23.9292 23.5377 23.902 17.0438 23.902 16.5134C23.902 15.3337 23.9734 13.9975 23.9156 12.8347C23.7592 9.66941 21.3147 7.47306 18.1902 7.46966C16.854 7.46966 15.3546 7.99325 14.4502 8.81603C13.9913 9.23422 13.7295 9.62521 13.3283 10.0332C13.3283 9.36002 13.3147 8.57804 13.3011 7.94565L13.3045 7.94905ZM0.571791 23.8437H5.29087C5.28067 22.9563 5.28747 9.67961 5.29087 7.94905H0.571791V23.8437ZM2.61174 0.0272487C0.986581 0.255043 -0.18639 1.60141 0.024405 3.27417C0.2114 4.76673 1.53737 6.0723 3.26792 5.8615C4.74009 5.68131 6.04225 4.32474 5.82466 2.60778C5.64106 1.15602 4.3015 -0.210745 2.61174 0.0272487Z"
    />
  </g>
  <defs>
    <clipPath id="clip0_511_2987">
      <rect
        width="23.9422"
        height="24"
        fill="white"
        transform="translate(0.000610352)"
      />
    </clipPath>
  </defs>
</svg>`,LY=`<svg
  width="28"
  height="24"
  viewBox="0 0 28 24"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <g clip-path="url(#clip0_511_2985)">
    <path
      fill-rule="evenodd"
      clip-rule="evenodd"
      d="M20.2899 21.4804C19.8539 20.897 6.12454 2.76639 5.93862 2.51957C6.09569 2.51957 7.90683 2.51957 8.08955 2.51957C8.30112 2.80166 22.0401 20.7111 22.5947 21.4804H20.2899ZM17.001 10.0815C18.5685 8.26713 24.8995 0.891145 25.5951 0.0544945L21.7324 0.02885C20.6842 1.23734 15.5585 6.98811 15.0937 7.4978C14.4878 6.73167 9.34933 0.368639 9.07366 0H0.867432C1.87718 1.30466 10.4777 12.5081 10.8559 12.9985C8.76592 15.3963 2.15927 22.987 1.38994 23.8782L5.65012 23.9327L12.7889 15.781C13.8019 17.0792 18.5813 23.3653 19.216 24.0032C19.8924 24.0032 26.9703 23.9519 27.3902 23.9423C26.4991 22.7755 17.6068 10.8732 17.0042 10.0815H17.001Z"
    />
  </g>
  <defs>
    <clipPath id="clip0_511_2985">
      <rect
        width="26.5196"
        height="24"
        fill="white"
        transform="translate(0.867188)"
      />
    </clipPath>
  </defs>
</svg>`;function RY(o,s){return c=>{const h=NY(c).map(f=>OY(f));s.setValue({...s.value,shareOptions:h});function d(){s.setValue({...s.value,shareDialogOpened:!0})}function m(){var f,A,M,D,N,F;s.setValue({...s.value,shareDialogOpened:!1}),(F=(N=(D=(M=(A=(f=o.renderRoot)==null?void 0:f.querySelector("ump-controls"))==null?void 0:A.renderRoot.querySelector("ump-control-bar"))==null?void 0:M.renderRoot.querySelector("ump-more-menu"))==null?void 0:D.renderRoot.querySelector('[data-id="more-menu-button"]'))==null?void 0:N.focus)==null||F.call(N)}const b=xf(o);return b.addEventListener("share-button-clicked",d),b.addEventListener("share-dialog-closed",m),()=>{b.removeAllListeners()}}}function NY(o){return o.options.share?o.options.shareOptions.length===0?y_:o.options.shareOptions:[]}function OY(o){const s=new URL(window.location.href);s.searchParams.delete("jsapi");const c=s.toString();switch(o){case"facebook":return{id:"facebook",url:`https://www.facebook.com/share.php?u=${encodeURIComponent(c)}`,icon:DY};case"linkedin":return{id:"linkedin",url:`https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(c)}&title=&summary=&source=`,icon:PY};case"x":return{id:"x",url:`https://x.com/share?url=${encodeURIComponent(c)}&text=`,icon:LY};case"mail":return{id:"mail",url:`mailto:?subject=Check out this great video&body=${encodeURIComponent(c)}`,icon:_Y};default:return{id:"copy",url:c,icon:""}}}async function D7(o,s){for(const c of o)try{await s.load(c.src,s.options.startTime,c.type);return}catch{s.dispatchUmpError({severity:gn.util.Error.Severity.RECOVERABLE,umpErrorType:"Error loading video source",umpErrorDescription:`Error loading video source: ${c.src}`})}s.dispatchUmpError({severity:gn.util.Error.Severity.CRITICAL,umpErrorType:"Error loading video source",umpErrorDescription:`Error loading video source(s): ${o.map(c=>c.src).join(", ")}`})}function UY(){return o=>{if(o.options.sources.length===0)return()=>{};o.addEventListener("loadsourcesrequest",s);async function s(){o.dispatchEvent(new gn.util.FakeEvent("playerloadmediastart"));const c=N1(o.options.sources);await D7(c,o),await o.loadCaptions(),o.dispatchEvent(new gn.util.FakeEvent("playerloadmediaend")),o.dispatchEvent(new gn.util.FakeEvent("loadsourcescomplete"))}return()=>{}}}const FY="https://video.cascade.microsoft.com";class jY{constructor(s){this.dispose=()=>{this.abortController.abort()},this.options=s,this.abortController=new AbortController}async fetchVideoApiMetadata(){const s=this.options.adobeCms,c=this.abortController.signal,h=this.constructAdobeCmsEndpoint(s?.operatingGroup,s?.videoId,s?.posterWidth,s?.posterHeight),d=await fetch(h.toString(),{signal:c});if(!d.ok)throw new Error(`Error fetching AdobeCMS Metadata from ${h}`);const m=await d.json();return{poster:m.posterUrl,sources:this.parseVideoFiles(m.sources),ccFiles:C7(m.closedCaptions),downloadableFiles:m.downloadableFiles,title:m.videoTitle,ageGate:{minimumAge:m.minimumAge}}}constructAdobeCmsEndpoint(s,c,h,d){const m=new URL(`${FY}/api/og/${s}/videos/${c}/playback-info`);return h&&m.searchParams.set("posterWidth",h),d&&m.searchParams.set("posterHeight",d),m}parseVideoFiles(s){return N1(s.map(c=>({src:c.url,type:c.type})))}}function BY(o){return s=>{var c;const h=s.options.adobeCms,d=(c=s.options.plugins)==null?void 0:c.powerCms;if((!(h!=null&&h.operatingGroup)||!(h!=null&&h.videoId))&&!(d!=null&&d.videoId))return()=>{};let m=()=>{};const b=h!=null&&h.operatingGroup&&h!=null&&h.videoId?0:1,f=new AbortController;let A={};async function M(){var G,Z;if(!((Z=(G=s.options.plugins)==null?void 0:G.powerCms)!=null&&Z.videoId))return;const ie=`https://www.microsoft.com/videoplayer/umpOptionsMappings/${s.options.plugins.powerCms.videoId}.json`,ge=f.signal,fe=await fetch(ie,{signal:ge});if(!fe.ok)throw new Error(`Failed to fetch video options mapping: ${fe.status} ${fe.statusText}`);A=await fe.json()}const D=M();s.addEventListener("loadsourcesrequest",U);const N=[],F=[];async function L(){await D;let G;switch(b){case 0:case 1:{const Z=new jY(b===1?A:s.options);m=Z.dispose,G=await Z.fetchVideoApiMetadata();break}}if(!G||G.sources.length===0)throw new Error("No metadata or no sources found in metadata");G.title&&(o.ariaLabel=G.title),N.push(...G.sources),s.options.hidePosterImage||(s.poster=G.poster),F.push(...G.ccFiles),o.dispatchEvent(new Pt("minimum-age-set",G.ageGate.minimumAge??0)),G.downloadableFiles.length>0&&o.dispatchEvent(new Pt("download-files-updated",G.downloadableFiles))}const w=(async()=>{try{await L()}catch(G){G instanceof Error&&s.dispatchUmpError({severity:gn.util.Error.Severity.CRITICAL,umpErrorType:"Error fetching video metadata",umpErrorDescription:JSON.stringify(G.message)})}})();async function U(){s.dispatchEvent(new gn.util.FakeEvent("playerloadmediastart")),await w,await D7(N,s),await s.loadCaptions(F),s.dispatchEvent(new gn.util.FakeEvent("playerloadmediaend")),s.dispatchEvent(new gn.util.FakeEvent("loadsourcescomplete"))}return()=>{f.abort(),m()}}}function VY(){try{return crypto.randomUUID()}catch{return`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,o=>(o^crypto.getRandomValues(new Uint8Array(1))[0]&15>>o/4).toString(16))}}var $Y=Object.defineProperty,zY=Object.getOwnPropertyDescriptor,yc=(o,s,c,h)=>{for(var d=h>1?void 0:h?zY(s,c):s,m=o.length-1,b;m>=0;m--)(b=o[m])&&(d=(h?b(s,c,d):b(d))||d);return h&&d&&$Y(s,c,d),d};gn.polyfill.installAll();const X3="options";function Y3(o,s,c){const h=o instanceof qi?o:qi.getById(o);return c&&h.addEventListener("ready",c,{once:!0}),h.setAttribute("options",JSON.stringify(s)),h}Object.defineProperty(Y3,"allowAutoplay",{get:M7,set:uY});let qi=class extends An{constructor(){super(...arguments),this.role="group",this.umpId=`ump-${VY()}`,this.ariaLabel=null,this.playerStateContext=new Sx(this,{context:Ar,initialValue:b_}),this.onVideoEvent=o=>{this.dispatchEvent(new Pt(o.type,o.target))}}render(){return St`
      <ump-caption-display></ump-caption-display>
      <ump-controls class="fill-parent"></ump-controls>
      <ump-loading-spinner></ump-loading-spinner>
      <ump-modals class="fill-parent"></ump-modals>
      <ump-aria-announcer></ump-aria-announcer>
    `}setMinimumAge(o){this.dispatchEvent(new Pt("minimum-age-set",o))}setAge(o){this.dispatchEvent(new Pt("user-age-set",o))}dispose(){this.destroyPlayer()}get currentState(){var o;if(this.player)return{duration:this.player.duration,currentTime:this.player.currentTime,percentageComplete:this.player.currentTime/this.player.duration,autoPlay:this.player.autoplay,muted:this.player.muted,loop:this.player.loop,title:this.player.options.title,powerCmsVideoId:(o=this.player.options.plugins.powerCms)==null?void 0:o.videoId,openControls:this.controls.hasOpenControl}}play(){var o;(o=this.player)==null||o.play()}pause(){var o;(o=this.player)==null||o.pause()}focusPlayButton(){this.controls.focusPlayButton()}async updated(o){o.has(X3)&&(await this.destroyPlayer(),this.options&&await this.initPlayer(this.options))}async disconnectedCallback(){super.disconnectedCallback(),await this.destroyPlayer()}connectedCallback(){super.connectedCallback(),this.requestUpdate()}async initPlayer(o){var s,c;this.playerStateContext.setValue(b_);const h=this.addVideo();this.player=new rY(o,h,this.captionDisplay),this.player.addPlugins(IX(this,this.playerStateContext),UY(),BY(this),fY(this.playerStateContext),hY(this,this.playerStateContext),RY(this,this.playerStateContext),Cz(this,this.playerStateContext),oY(this,this.playerStateContext),CY(this,this.playerStateContext),IY(this),lY(this,this.playerStateContext),cY(this.playerStateContext),MY(this.playerStateContext),pY(this.playerStateContext),r$(this.playerStateContext),dY(this,this.playerStateContext)),this.updateStyles(this.player),this.ariaLabel=((s=this.options)==null?void 0:s.title)||null,F$(j$((c=this.options)==null?void 0:c.language)),await this.player.initialize(),this.dispatchEvent(new Pt("ready",this.player))}addVideo(){var o;const s=document.createElement("video");return s.classList.add("fill-parent"),z3.forEach(c=>{s.addEventListener(c,this.onVideoEvent)}),(o=this.shadowRoot)==null||o.prepend(s),s}removeVideo(){var o;const s=(o=this.player)==null?void 0:o.getMediaElement();s&&(z3.forEach(c=>{s.removeEventListener(c,this.onVideoEvent)}),s.remove())}async destroyPlayer(){var o;this.removeVideo(),await((o=this.player)==null?void 0:o.destroy()),this.player=void 0}updateStyles(o){this.style.setProperty("--ump-aspect-ratio",o.options.aspectRatio.replace(":"," /")),o.options.layout==="fill"?this.style.setProperty("--ump-height","100%"):this.style.setProperty("--ump-height","unset")}static getById(o){const s=document.getElementById(o);if(!(s instanceof qi))throw new Error(`Not a valid element. To use Universal Media Player, you must pass in an element named "${ZV}" but you passed in id ${o} which resolves to element ${s?.tagName}.`);return s}};qi.shadowRootOptions={...An.shadowRootOptions,delegatesFocus:!0},qi.styles=[T7,Cn`
:host{--ump-aspect-ratio:unset;--ump-height:unset;container-type:size;container-name:universalmediaplayer;display:inline-block;position:relative;width:100%;height:var(--ump-height);aspect-ratio:var(--ump-aspect-ratio);background-color:var(--color-black);font-family:var(--font-family-default);font-size:var(--font-size-base-300);word-break:normal;min-width:320px;min-height:256px}video{object-fit:contain}.fill-parent{position:absolute;inset:0;width:100%;height:100%}ump-controls{z-index:10}ump-modals{z-index:20}ump-loading-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:15}
    `],yc([tr({reflect:!0})],qi.prototype,"role",2),yc([tr({type:Object,attribute:X3,reflect:!0})],qi.prototype,"options",2),yc([tr({reflect:!0})],qi.prototype,"umpId",2),yc([tr({attribute:"aria-label",reflect:!0})],qi.prototype,"ariaLabel",2),yc([On("ump-caption-display")],qi.prototype,"captionDisplay",2),yc([On("ump-controls")],qi.prototype,"controls",2),qi=yc([Xn("universal-media-player")],qi),window.ump=Y3,window.ISOBoxer=sV;export{X3 as OPTIONS_ATTRIBUTE_NAME,qi as UniversalMediaPlayer,B$ as registerTranslation,V$ as setTranslationLoader,Y3 as ump};
