1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[184],{6746:function(e,t,i){let a;i.r(t),i.d(t,{default:function(){return f}});var n=i(7294),s=i(1979),l=i(589),o=i(3041);let r=(a=(0,l.lK)(s.zM),class extends a{static shadowRootOptions={...a.shadowRootOptions};static getTemplateHTML=(e,t={})=>{let{src:i,...n}=e;return` 2 <script type="application/json" id="config"> 3 ${JSON.stringify(t.config||{})} 4 </script> 5 ${a.getTemplateHTML(n)} 6 `};#e=null;#t=null;constructor(){super(),this.#i("config")}get config(){return this.#t}set config(e){this.#t=e}attributeChangedCallback(e,t,i){"src"!==e&&super.attributeChangedCallback(e,t,i),"src"===e&&t!=i&&this.load()}#a(){var e,t;null==(e=this.#e)||e.remove(),null==(t=this.nativeEl)||t.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.#n),this.api&&(this.api.detachMedia(),this.api.destroy(),this.api=null)}async load(){var e,t;let i=!this.api;if(this.#a(),this.src){if(i&&!this.#t&&(this.#t=JSON.parse((null==(e=this.shadowRoot.getElementById("config"))?void 0:e.textContent)||"{}")),o.ZP.isSupported()){switch(this.api=new o.ZP({liveDurationInfinity:!0,autoStartLoad:!1,...this.config}),await Promise.resolve(),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(o.ZP.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(o.ZP.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.#n),this.#e=document.createElement("source"),this.#e.setAttribute("type","application/x-mpegURL"),this.#e.setAttribute("src",this.src),this.nativeEl.disableRemotePlayback=!1,this.nativeEl.append(this.#e);let e=new WeakMap;this.api.on(o.ZP.Events.MANIFEST_PARSED,(t,a)=>{this.nativeEl.autoplay&&this.nativeEl.paused&&this.nativeEl.play().catch(e=>{console.warn("Autoplay failed:",e)}),i();let n=this.videoTracks.getTrackById("main");for(let[t,i]of(n||((n=this.addVideoTrack("main")).id="main",n.selected=!0),a.levels.entries())){let a=n.addRendition(i.url[0],i.width,i.height,i.videoCodec,i.bitrate);e.set(i,`${t}`),a.id=`${t}`}for(let[e,t]of a.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(o.ZP.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)}),null==(t=this.videoRenditions)||t.addEventListener("change",e=>{let t=e.target.selectedIndex;t!=this.api.nextLevel&&(this.api.nextLevel=t)});let i=()=>{for(let e of this.videoTracks)this.removeVideoTrack(e);for(let e of this.audioTracks)this.removeAudioTrack(e)};this.api.once(o.ZP.Events.DESTROYING,i);return}await Promise.resolve(),this.nativeEl.canPlayType("application/vnd.apple.mpegurl")&&(this.nativeEl.src=this.src)}}#n=()=>{var e,t,i;(null==(e=this.nativeEl)?void 0:e.webkitCurrentPlaybackTargetIsWireless)?null==(t=this.api)||t.stopLoad():null==(i=this.api)||i.startLoad()};#i(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}});globalThis.customElements&&!globalThis.customElements.get("hls-video")&&globalThis.customElements.define("hls-video",r);var d=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),c={className:"class",htmlFor:"for"};function u(e){return e.toLowerCase()}function h(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e?void 0:"object"!=typeof e||null===e?e:void 0}function p(e,t,i){var a;e[t]=i,null==i&&t in((null==(a=globalThis.HTMLElement)?void 0:a.prototype)??{})&&e.removeAttribute(t)}var f=function({react:e,tagName:t,elementClass:i,events:a,displayName:n,defaultProps:s,toAttributeName:l=u,toAttributeValue:o=h}){let r=Number.parseInt(e.version)>=19,f=e.forwardRef((n,u)=>{var f,v;let g=e.useRef(null),m=e.useRef(new Map),E={},y={},T={},b={};for(let[e,t]of Object.entries(n)){if(d.has(e)){T[e]=t;continue}let a=l(c[e]??e);if(i.prototype&&e in i.prototype&&!(e in((null==(f=globalThis.HTMLElement)?void 0:f.prototype)??{}))&&!(null==(v=i.observedAttributes)?void 0:v.some(e=>e===a))){b[e]=t;continue}if(e.startsWith("on")){E[e]=t;continue}let n=o(t);a&&null!=n&&(y[a]=String(n),r||(T[a]=n)),a&&r&&(n!==h(t)?T[a]=n:T[a]=t)}if("undefined"!=typeof window){for(let t in E){let i=E[t],n=t.endsWith("Capture"),s=((null==a?void 0:a[t])??t.slice(2).toLowerCase()).slice(0,n?-7:void 0);e.useLayoutEffect(()=>{let e=null==g?void 0:g.current;if(e&&"function"==typeof i)return e.addEventListener(s,i,n),()=>{e.removeEventListener(s,i,n)}},[null==g?void 0:g.current,i])}e.useLayoutEffect(()=>{if(null===g.current)return;let e=new Map;for(let t in b)p(g.current,t,b[t]),m.current.delete(t),e.set(t,b[t]);for(let[e,t]of m.current)p(g.current,e,void 0);m.current=e})}if("undefined"==typeof window&&(null==i?void 0:i.getTemplateHTML)&&(null==i?void 0:i.shadowRootOptions)){let{mode:t,delegatesFocus:a}=i.shadowRootOptions,s=e.createElement("template",{shadowrootmode:t,shadowrootdelegatesfocus:a,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(y,n)}});T.children=[s,T.children]}return e.createElement(t,{...s,...T,ref:e.useCallback(e=>{g.current=e,"function"==typeof u?u(e):null!==u&&(u.current=e)},[u])})});return f.displayName=n??i.name,f}({react:n,tagName:"hls-video",elementClass:r,toAttributeName:e=>"muted"===e?"":"defaultMuted"===e?"muted":u(e)})}}]);
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.