1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1352],{71352:(e,t,i)=>{i.r(t),i.d(t,{Hls:()=>x.Ay,HlsVideoElement:()=>I,HlsVideoMixin:()=>q,default:()=>P});let a=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"],n=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function r(e){return` 2 <style> 3 :host { 4 display: inline-flex; 5 line-height: 0; 6 flex-direction: column; 7 justify-content: end; 8 } 9 10 audio { 11 width: 100%; 12 } 13 </style> 14 <slot name="media"> 15 <audio${d(e)}></audio> 16 </slot> 17 <slot></slot> 18 `}function s(e){return` 19 <style> 20 :host { 21 display: inline-block; 22 line-height: 0; 23 } 24 25 video { 26 max-width: 100%; 27 max-height: 100%; 28 min-width: 100%; 29 min-height: 100%; 30 object-fit: var(--media-object-fit, contain); 31 object-position: var(--media-object-position, 50% 50%); 32 } 33 34 video::-webkit-media-text-track-container { 35 transform: var(--media-webkit-text-track-transform); 36 transition: var(--media-webkit-text-track-transition); 37 } 38 </style> 39 <slot name="media"> 40 <video${d(e)}></video> 41 </slot> 42 <slot></slot> 43 `}function o(e,{tag:t,is:i}){let d=globalThis.document?.createElement?.(t,{is:i}),l=d?function(e){let t=[];for(let i=Object.getPrototypeOf(e);i&&i!==HTMLElement.prototype;i=Object.getPrototypeOf(i)){let e=Object.getOwnPropertyNames(i);t.push(...e)}return t}(d):[];return class o extends e{static getTemplateHTML=t.endsWith("audio")?r:s;static shadowRootOptions={mode:"open"};static Events=a;static #e=!1;static get observedAttributes(){return o.#t(),[...d?.constructor?.observedAttributes??[],...n]}static #t(){if(this.#e)return;this.#e=!0;let e=new Set(this.observedAttributes);for(let t of(e.delete("muted"),l))if(!(t in this.prototype))if("function"==typeof d[t])this.prototype[t]=function(...e){return this.#i(),(()=>{if(this.call)return this.call(t,...e);let i=this.nativeEl?.[t];return i?.apply(this.nativeEl,e)})()};else{let i={get(){this.#i();let i=t.toLowerCase();if(e.has(i)){let e=this.getAttribute(i);return null!==e&&(""===e||e)}return this.get?.(t)??this.nativeEl?.[t]}};t!==t.toUpperCase()&&(i.set=function(i){this.#i();let a=t.toLowerCase();e.has(a)?!0===i||!1===i||null==i?this.toggleAttribute(a,!!i):this.setAttribute(a,i):this.set?this.set(t,i):this.nativeEl&&(this.nativeEl[t]=i)}),Object.defineProperty(this.prototype,t,i)}}#a=!1;#n=null;#r=new Map;#s;#o;get;set;call;get nativeEl(){return this.#i(),this.#n??this.querySelector(":scope > [slot=media]")??this.querySelector(t)??this.shadowRoot?.querySelector(t)??null}set nativeEl(e){this.#n=e}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(e){this.toggleAttribute("muted",e)}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",`${e}`)}get preload(){return this.getAttribute("preload")??this.nativeEl?.preload}set preload(e){this.setAttribute("preload",`${e}`)}#i(){this.#a||(this.#a=!0,this.init())}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let e=function(e){let t={};for(let i of e)t[i.name]=i.value;return t}(this.attributes);i&&(e.is=i),t&&(e.part=t),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}for(let e of(this.nativeEl.muted=this.hasAttribute("muted"),l))this.#d(e);this.#l()}#l(){for(let e of(this.#s=new MutationObserver(this.#c.bind(this)),this.#o=()=>this.#h(),this.shadowRoot?.addEventListener("slotchange",this.#o),this.#h(),this.constructor.Events))this.shadowRoot?.addEventListener(e,this,!0)}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail}))}#h(){let e=new Map(this.#r),t=this.shadowRoot?.querySelector("slot:not([name])");(t?.assignedElements({flatten:!0}).filter(e=>
43["track","source"].includes(e.localName))).forEach(t=>{e.delete(t);let i=this.#r.get(t);i||(i=t.cloneNode(),this.#r.set(t,i),this.#s?.observe(t,{attributes:!0})),this.nativeEl?.append(i),this.#u(i)}),e.forEach((e,t)=>{e.remove(),this.#r.delete(t)})}#c(e){for(let t of e)if("attributes"===t.type){let{target:e,attributeName:i}=t,a=this.#r.get(e);a&&i&&(a.setAttribute(i,e.getAttribute(i)??""),this.#u(a))}}#u(e){e&&"track"===e.localName&&e.default&&("chapters"===e.kind||"metadata"===e.kind)&&"disabled"===e.track.mode&&(e.track.mode="hidden")}#d(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}attributeChangedCallback(e,t,i){this.#i(),this.#v(e,t,i)}#v(e,t,i){["id","class"].includes(e)||!o.observedAttributes.includes(e)&&this.constructor.observedAttributes.includes(e)||(null===i?this.nativeEl?.removeAttribute(e):this.nativeEl?.getAttribute(e)!==i&&this.nativeEl?.setAttribute(e,i))}connectedCallback(){this.#i(),this.#o||this.#l()}disconnectedCallback(){for(let e of(this.#s?.disconnect(),this.#s=void 0,this.#o&&(this.shadowRoot?.removeEventListener("slotchange",this.#o),this.#o=void 0),this.constructor.Events))this.shadowRoot?.removeEventListener(e,this,!0);this.#r.forEach(e=>e.remove()),this.#r.clear(),this.#n=null}}}function d(e){let t="";for(let i in e){if(!n.includes(i))continue;let a=e[i];""===a?t+=` ${i}`:t+=` ${i}="${a}"`}return t}let l=o(globalThis.HTMLElement??class{},{tag:"video"});o(globalThis.HTMLElement??class{},{tag:"audio"});class c extends Event{track;constructor(e,t){super(e),this.track=t.track}}let h=new WeakMap;function u(e){var t,i;let a;return h.get(e)??(t=e,i={},(a=h.get(t))||h.set(t,a={}),Object.assign(a,i))}function v(e,t){let i=e.videoTracks;u(t).media=new WeakRef(e),u(t).renditionSet||(u(t).renditionSet=new Set);let a=u(i).trackSet;a.add(t);let n=a.size-1;n in k.prototype||Object.defineProperty(k.prototype,n,{get(){return[...u(this).trackSet][n]}}),queueMicrotask(()=>{i.dispatchEvent(new c("addtrack",{track:t}))})}function p(e){let t=u(e).media?.deref()?.videoTracks;t&&(u(t).trackSet.delete(e),queueMicrotask(()=>{t.dispatchEvent(new c("removetrack",{track:e}))}))}class k extends EventTarget{#p;#k;#g;constructor(){super(),u(this).trackSet=new Set}get #f(){return u(this).trackSet}[Symbol.iterator](){return this.#f.values()}get length(){return this.#f.size}getTrackById(e){return[...this.#f].find(t=>t.id===e)??null}get selectedIndex(){return[...this.#f].findIndex(e=>e.selected)}get onaddtrack(){return this.#p}set onaddtrack(e){this.#p&&(this.removeEventListener("addtrack",this.#p),this.#p=void 0),"function"==typeof e&&(this.#p=e,this.addEventListener("addtrack",e))}get onremovetrack(){return this.#k}set onremovetrack(e){this.#k&&(this.removeEventListener("removetrack",this.#k),this.#k=void 0),"function"==typeof e&&(this.#k=e,this.addEventListener("removetrack",e))}get onchange(){return this.#g}set onchange(e){this.#g&&(this.removeEventListener("change",this.#g),this.#g=void 0),"function"==typeof e&&(this.#g=e,this.addEventListener("change",e))}}class g extends Event{rendition;constructor(e,t){super(e),this.rendition=t.rendition}}function f(e){let t=u(e).media?.deref();return t?[...t.videoTracks].filter(e=>e.selected).flatMap(e=>[...u(e).renditionSet]):[]}class b extends EventTarget{#b;#m;#g;[Symbol.iterator](){return f(this).values()}get length(){return f(this).length}getRenditionById(e){return f(this).find(t=>`${t.id}`==`${e}`)??null}get selectedIndex(){return f(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,i]of f(this).entries())i.selected=t===e}get onaddrendition(){return this.#b}set onaddrendition(e){this.#b&&(this.removeEventListener("addrendition",this.#b),this.#b=void 0),"function"==typeof e&&(this.#b=e,this.addEventListener("addrendition",e))}get onremoverendition(){return this.#m}set onremoverendition(e){this.#m&&(this.removeEventListener("removerendition",this.#m),this.#m=void 0),"function"==typeof e&&(this.#m=e,this.addEventListener("removerendition",e))}get onchange(){return this.#g}set onchange(e){this.#g&&(this.removeEventListener("change",this.#g),this.#g=void 0),"function"==typeof e&&(this.#g=e,this.addEventListener("change",e))}}class m{src;id;width;height;bitrate;frameRate;codec;#E=!1;get selected(){return this.#E}set selected(e){if(this.#E!==e){var t;let i;this.#E=e,t=this,(i=u(t).media?.deref()?.videoRenditions)&&!u(i).changeRequested&&(u(i).changeRequested=!0,queueMicrotask(()=>{delete u(i).changeRequested,u(t).track.selected&&i.dispatchEvent(new Event("change"))}))}}}class E{id;kind;label="";language="";sourceBuffer;#E=!1;addRendition(e,t,i,a,n,r){var s;let o,d,l,c=new m;return c.src=e,c.width=t,c.height=i,c.frameRate=r,c.bitrate=n,c.codec=a,s=this,o=u(s).media?.deref()?.videoRenditions,u(c).media=u(s).media,u(c).track=s,(d=u(s).renditionSet).add(c),(l=d.size-1)in b.prototype||Ob
43ject.defineProperty(b.prototype,l,{get(){return f(this)[l]}}),queueMicrotask(()=>{o&&s.selected&&o.dispatchEvent(new g("addrendition",{rendition:c}))}),c}removeRendition(e){let t,i;t=u(e).media?.deref()?.videoRenditions,i=u(e).track,u(i).renditionSet.delete(e),queueMicrotask(()=>{let i=u(e).track;t&&i.selected&&t.dispatchEvent(new g("removerendition",{rendition:e}))})}get selected(){return this.#E}set selected(e){this.#E===e||(this.#E=e,!0===e&&function(e){let t=u(e).media?.deref()?.videoTracks??[],i=!1;for(let a of t)a!==e&&(a.selected=!1,i=!0);if(i){if(u(t).changeRequested)return;u(t).changeRequested=!0,queueMicrotask(()=>{delete u(t).changeRequested,t.dispatchEvent(new Event("change"))})}}(this))}}function y(e){let t=u(e).media?.deref();return t?[...t.audioTracks].filter(e=>e.enabled).flatMap(e=>[...u(e).renditionSet]):[]}class T extends EventTarget{#b;#m;#g;[Symbol.iterator](){return y(this).values()}get length(){return y(this).length}getRenditionById(e){return y(this).find(t=>`${t.id}`==`${e}`)??null}get selectedIndex(){return y(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,i]of y(this).entries())i.selected=t===e}get onaddrendition(){return this.#b}set onaddrendition(e){this.#b&&(this.removeEventListener("addrendition",this.#b),this.#b=void 0),"function"==typeof e&&(this.#b=e,this.addEventListener("addrendition",e))}get onremoverendition(){return this.#m}set onremoverendition(e){this.#m&&(this.removeEventListener("removerendition",this.#m),this.#m=void 0),"function"==typeof e&&(this.#m=e,this.addEventListener("removerendition",e))}get onchange(){return this.#g}set onchange(e){this.#g&&(this.removeEventListener("change",this.#g),this.#g=void 0),"function"==typeof e&&(this.#g=e,this.addEventListener("change",e))}}class C{src;id;bitrate;codec;#E=!1;get selected(){return this.#E}set selected(e){if(this.#E!==e){var t;let i;this.#E=e,t=this,(i=u(t).media?.deref()?.audioRenditions)&&!u(i).changeRequested&&(u(i).changeRequested=!0,queueMicrotask(()=>{delete u(i).changeRequested,u(t).track.enabled&&i.dispatchEvent(new Event("change"))}))}}}function R(e,t){let i=e.audioTracks;u(t).media=new WeakRef(e),u(t).renditionSet||(u(t).renditionSet=new Set);let a=u(i).trackSet;a.add(t);let n=a.size-1;n in L.prototype||Object.defineProperty(L.prototype,n,{get(){return[...u(this).trackSet][n]}}),queueMicrotask(()=>{i.dispatchEvent(new c("addtrack",{track:t}))})}function w(e){let t=u(e).media?.deref()?.audioTracks;t&&(u(t).trackSet.delete(e),queueMicrotask(()=>{t.dispatchEvent(new c("removetrack",{track:e}))}))}class L extends EventTarget{#p;#k;#g;constructor(){super(),u(this).trackSet=new Set}get #f(){return u(this).trackSet}[Symbol.iterator](){return this.#f.values()}get length(){return this.#f.size}getTrackById(e){return[...this.#f].find(t=>t.id===e)??null}get onaddtrack(){return this.#p}set onaddtrack(e){this.#p&&(this.removeEventListener("addtrack",this.#p),this.#p=void 0),"function"==typeof e&&(this.#p=e,this.addEventListener("addtrack",e))}get onremovetrack(){return this.#k}set onremovetrack(e){this.#k&&(this.removeEventListener("removetrack",this.#k),this.#k=void 0),"function"==typeof e&&(this.#k=e,this.addEventListener("removetrack",e))}get onchange(){return this.#g}set onchange(e){this.#g&&(this.removeEventListener("change",this.#g),this.#g=void 0),"function"==typeof e&&(this.#g=e,this.addEventListener("change",e))}}class S{id;kind;label="";language="";sourceBuffer;#y=!1;addRendition(e,t,i){var a;let n,r,s,o=new C;return o.src=e,o.codec=t,o.bitrate=i,a=this,n=u(a).media?.deref()?.audioRenditions,u(o).media=u(a).media,u(o).track=a,(r=u(a).renditionSet).add(o),(s=r.size-1)in T.prototype||Object.defineProperty(T.prototype,s,{get(){return y(this)[s]}}),queueMicrotask(()=>{n&&a.enabled&&n.dispatchEvent(new g("addrendition",{rendition:o}))}),o}removeRendition(e){let t,i;t=u(e).media?.deref()?.audioRenditions,i=u(e).track,u(i).renditionSet.delete(e),queueMicrotask(()=>{let i=u(e).track;t&&i.enabled&&t.dispatchEvent(new g("removerendition",{rendition:e}))})}get enabled(){return this.#y}set enabled(e){if(this.#y!==e){let t;this.#y=e,(t=u(this).media?.deref()?.audioTracks)&&!u(t).changeRequested&&(u(t).changeRequested=!0,queueMicrotask(()=>{delete u(t).changeRequested,t.dispatchEvent(new Event("change"))}))}}}let A=O(globalThis.HTMLMediaElement,"video"),M=O(globalThis.HTMLMediaElement,"audio");function O(e,t){if(e?.prototype)return Object.getOwnPropertyDescriptor(e.prototype,`${t}Tracks`)?.get}var x=i(87019);let q=e=>class extends e{static shadowRootOptions={...e.shadowRootOptions};static getTemplateHTML=(t,i={})=>{let{src:a,...n}=t;return` 44 <script type="application/json" id="config"> 45 ${JSON.stringify(i.config||{})} 46 </script> 47 ${e.getTemplateHTML(n)} 48 `};#T=null;#C=null;constructor(){super(),this.#d("config")}get config(){return this.#C}set config(e){this.#C=e}attributeChangedCallback(e,t,i){"src"!==e&&super.attributeChangedCallback(e,t,i),"src"===e&&t!=i&&this.load()}#R(){var e,t;null==(e=this.#T)||e.remove(),null==(t=this.nativeEl)||t.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.#w),this.api&&(this.api.detachMedia(),this.api.destroy(),this.api=null)}async load(){var e,t;let i=!this.api;
48if(this.#R(),this.src){if(i&&!this.#C&&(this.#C=JSON.parse((null==(e=this.shadowRoot.getElementById("config"))?void 0:e.textContent)||"{}")),x.Ay.isSupported()){switch(await Promise.resolve(),this.api=new x.Ay({liveDurationInfinity:!0,autoStartLoad:!1,...this.config}),this.api.loadSource(this.src),this.api.attachMedia(this.nativeEl),this.nativeEl.preload){case"none":{let e=()=>this.api.startLoad();this.nativeEl.addEventListener("play",e,{once:!0}),this.api.on(x.Ay.Events.DESTROYING,()=>{this.nativeEl.removeEventListener("play",e)});break}case"metadata":{let e=this.api.config.maxBufferLength,t=this.api.config.maxBufferSize;this.api.config.maxBufferLength=1,this.api.config.maxBufferSize=1;let i=()=>{this.api.config.maxBufferLength=e,this.api.config.maxBufferSize=t};this.nativeEl.addEventListener("play",i,{once:!0}),this.api.on(x.Ay.Events.DESTROYING,()=>{this.nativeEl.removeEventListener("play",i)}),this.api.startLoad();break}default:this.api.startLoad()}this.nativeEl.webkitCurrentPlaybackTargetIsWireless&&this.api.stopLoad(),this.nativeEl.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.#w),this.#T=document.createElement("source"),this.#T.setAttribute("type","application/x-mpegURL"),this.#T.setAttribute("src",this.src),this.nativeEl.disableRemotePlayback=!1,this.nativeEl.append(this.#T);let e=new WeakMap;this.api.on(x.Ay.Events.MANIFEST_PARSED,(t,i)=>{this.nativeEl.autoplay&&this.nativeEl.paused&&this.nativeEl.play().catch(e=>{console.warn("Autoplay failed:",e)}),n();let a=this.videoTracks.getTrackById("main");for(let[t,n]of(a||((a=this.addVideoTrack("main")).id="main",a.selected=!0),i.levels.entries())){let i=a.addRendition(n.url[0],n.width,n.height,n.videoCodec,n.bitrate);e.set(n,`${t}`),i.id=`${t}`}for(let[e,t]of i.audioTracks.entries()){let i=t.default?"main":"alternative",a=this.addAudioTrack(i,t.name,t.lang);a.id=`${e}`,t.default&&(a.enabled=!0)}}),this.audioTracks.addEventListener("change",()=>{var e;let t=+(null==(e=[...this.audioTracks].find(e=>e.enabled))?void 0:e.id),i=this.api.audioTracks.map(e=>e.id);t!=this.api.audioTrack&&i.includes(t)&&(this.api.audioTrack=t)}),this.api.on(x.Ay.Events.LEVELS_UPDATED,(t,i)=>{let a=this.videoTracks[this.videoTracks.selectedIndex??0];if(!a)return;let n=i.levels.map(t=>e.get(t));for(let e of this.videoRenditions)e.id&&!n.includes(e.id)&&a.removeRendition(e)});let i=null;this.api.on(x.Ay.Events.ERROR,(e,t)=>{t.type===x.Ay.ErrorTypes.NETWORK_ERROR&&t.details===x.Ay.ErrorDetails.FRAG_LOAD_ERROR&&(i=t.frag.level)}),this.api.on(x.Ay.Events.LEVEL_SWITCHED,(e,t)=>{let a=t.level;null!==i&&a<i&&(console.warn(`\u26A0\uFE0F hls.js downgraded quality from level ${i} to ${a} due to fragment load failure.`),this.videoRenditions.selectedIndex=a,i=null)});let a=e=>{let t=e.target.selectedIndex;t!=this.api.nextLevel&&(this.api.nextLevel=t)};null==(t=this.videoRenditions)||t.addEventListener("change",a);let n=()=>{for(let e of this.videoTracks)this.removeVideoTrack(e);for(let e of this.audioTracks)this.removeAudioTrack(e)};this.api.once(x.Ay.Events.DESTROYING,n);return}await Promise.resolve(),this.nativeEl.canPlayType("application/vnd.apple.mpegurl")&&(this.nativeEl.src=this.src)}}#w=()=>{var e,t,i;(null==(e=this.nativeEl)?void 0:e.webkitCurrentPlaybackTargetIsWireless)?null==(t=this.api)||t.stopLoad():null==(i=this.api)||i.startLoad()};#d(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}},I=q(function(e){if(!e?.prototype)return e;let t=O(e,"video");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"videoTracks",{get(){var e=this;let t=u(e).videoTracks;if(!t&&(t=new k,u(e).videoTracks=t,A)){let i=A.call(e.nativeEl??e);for(let t of i)v(e,t);i.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),i.addEventListener("addtrack",a=>{if([...t].some(e=>e instanceof E)){for(let e of i)p(e);return}v(e,a.track)}),i.addEventListener("removetrack",e=>{p(e.track)})}return t}});let i=O(e,"audio");(!i||`${i}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"audioTracks",{get(){var e=this;let t=u(e).audioTracks;
48if(!t&&(t=new L,u(e).audioTracks=t,M)){let i=M.call(e.nativeEl??e);for(let t of i)R(e,t);i.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),i.addEventListener("addtrack",a=>{if([...t].some(e=>e instanceof S)){for(let e of i)w(e);return}R(e,a.track)}),i.addEventListener("removetrack",e=>{w(e.track)})}return t}}),"addVideoTrack"in e.prototype||(e.prototype.addVideoTrack=function(e,t="",i=""){let a=new E;return a.kind=e,a.label=t,a.language=i,v(this,a),a}),"removeVideoTrack"in e.prototype||(e.prototype.removeVideoTrack=p),"addAudioTrack"in e.prototype||(e.prototype.addAudioTrack=function(e,t="",i=""){let a=new S;return a.kind=e,a.label=t,a.language=i,R(this,a),a}),"removeAudioTrack"in e.prototype||(e.prototype.removeAudioTrack=w),"videoRenditions"in e.prototype||Object.defineProperty(e.prototype,"videoRenditions",{get(){return a(this)}});let a=e=>{let t=u(e).videoRenditions;return t||(u(t=new b).media=new WeakRef(e),u(e).videoRenditions=t),t};"audioRenditions"in e.prototype||Object.defineProperty(e.prototype,"audioRenditions",{get(){return n(this)}});let n=e=>{let t=u(e).audioRenditions;return t||(u(t=new T).media=new WeakRef(e),u(e).audioRenditions=t),t};return e}(l));globalThis.customElements&&!globalThis.customElements.get("hls-video")&&globalThis.customElements.define("hls-video",I);var P=I}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.