1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6332],{36332:function(e,t,i){let r;i.r(t),i.d(t,{MuxBackgroundVideo:function(){return G}});var n,a,o,s,l,u,d,c=i(53359),h=i(10851),f=i(70262),p=i(27938),g=i(12226),v=i(2265),m=i(57437);function w(e,t){var i,r,n,a,o,s,l,u;return i=new WeakMap,r=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakSet,l=new WeakMap,u=new WeakMap,class extends e{get display(){return(0,c._)(this,i)}set display(e){(0,f._)(this,i,e),(0,p._)(this,s,d).call(this)}set src(e){(0,f._)(this,n,e),(0,p._)(this,s,d).call(this)}get src(){return(0,c._)(this,n)}get config(){return(0,c._)(this,a)}set config(e){(0,f._)(this,a,null!=e?e:{}),(0,p._)(this,s,d).call(this)}destroy(){var e,t;null===(e=this.display)||void 0===e||e.removeEventListener("play",(0,c._)(this,l)),null===(t=this.display)||void 0===t||t.removeEventListener("play",(0,c._)(this,u)),(0,f._)(this,i,void 0),(0,f._)(this,r,void 0),(0,f._)(this,n,""),(0,f._)(this,a,{}),(0,f._)(this,o,void 0)}load(){var e,i;if(!this.display)return;if(typeof MediaSource>"u"){this.display.src=this.src;return}(0,c._)(this,r)||(0,f._)(this,r,new t),(0,c._)(this,r).attachMedia(this.display);let n=this.display.paused;if(this.config&&((0,c._)(this,r).config=this.config,(null===(e=this.config)||void 0===e?void 0:e.preload)==="metadata"&&n&&((0,c._)(this,r).config.maxBufferLength=0,this.display.addEventListener("play",(0,c._)(this,u),{once:!0}))),(null===(i=this.config)||void 0===i?void 0:i.preload)==="none"&&n){this.display.addEventListener("play",(0,c._)(this,l),{once:!0});return}(0,c._)(this,l).call(this)}constructor(...e){super(...e),(0,g._)(this,s),(0,h._)(this,i,{writable:!0,value:void 0}),(0,h._)(this,r,{writable:!0,value:void 0}),(0,h._)(this,n,{writable:!0,value:void 0}),(0,h._)(this,a,{writable:!0,value:void 0}),(0,h._)(this,o,{writable:!0,value:void 0}),(0,h._)(this,l,{writable:!0,value:void 0}),(0,h._)(this,u,{writable:!0,value:void 0}),(0,f._)(this,n,""),(0,f._)(this,a,{}),(0,f._)(this,l,()=>{(0,c._)(this,r)&&this.src&&(0,c._)(this,r).loadSource(this.src)}),(0,f._)(this,u,()=>{(0,c._)(this,r)&&((0,c._)(this,r).config.maxBufferLength=t.DefaultConfig.maxBufferLength)})}};async function d(){(0,c._)(this,o)||(await (0,f._)(this,o,Promise.resolve()),(0,f._)(this,o,null),this.load())}}var y=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{maxRetries:i=5,baseDelay:r=1e3,...n}=t,a=Math.max(1,i);for(let t=0;t<=a;t++){try{let i=await fetch(e,{...n});if(i.ok)return i;if(i.status<500&&![408,429].includes(i.status)||t===a)throw Error("HTTP ".concat(i.status,": ").concat(i.statusText))}catch(e){if(t===a||"TypeError"!==e.name&&!e.message.includes("fetch")&&!e.message.includes("network"))throw e}if(t<a){let e=r*Math.pow(2,t)*(1+.1*Math.random());await new Promise(t=>setTimeout(t,e))}}throw Error()},_=[["#EXT-X-MAP",(e,t,i)=>{let{baseURI:r}=i,{uri:n,...a}=L(t);return e.push({...a,uri:T(n,r),duration:0}),e}],["#EXTINF",(e,t)=>(e.push({uri:void 0,duration:+t.split(":")[1].split(",")[0].trim()}),e)],[e=>!!e.trim()&&!e.startsWith("#"),(e,t,i)=>{let{baseURI:r}=i;return e[e.length-1].uri=T(t,r),e}]],b=[["#EXT-X-MEDIA",(e,t,i)=>{let{baseURI:r}=i,{uri:n,...a}=L(t);return n&&e.push({...a,uri:T(n,r),mimeType:"audio/mp4",codec:void 0}),e}],["#EXT-X-STREAM-INF",(e,t)=>{let{audio:i,codecs:r,resolution:n,...a}=L(t);e.push({...a,audio:i,mimeType:"video/mp4",codecs:r,codec:r.split(",").find(e=>!e.toLowerCase().startsWith("mp4a")),width:+n.split("x")[0],height:+n.split("x")[1]});let o=e.find(e=>{let{groupId:t,mimeType:r}=e;return"audio/mp4"===r&&t===i});return o&&(o.codec=r.split(",").find(e=>e.toLowerCase().startsWith("mp4a"))),e}],[e=>!!e.trim()&&!e.startsWith("#"),(e,t,i)=>{let{baseURI:r}=i;return e[e.length-1].uri=T(t,r),e}]],x=async(e,t)=>{let i=await M(e,b,t);return{uri:e,renditions:i}},k=async(e,t)=>{if(!e.uri)throw Error("Media playlist data must have a URI");let i=E(await M(e.uri,_,t));return{...e,segments:i}},E=e=>{let t=0;return e.map(e=>{let i=t,r=i+(e.duration||0);return t=r,{...e,start:i,end:r}})},M=async(e,t,i)=>{let r={baseURI:W(e)};return y(e,{signal:i}).then(e=>e.text()).then(e=>R(e,t,r))},R=(e,t,i)=>e.split("\n").reduce((e,r)=>{var n;let[,a]=null!==(n=t.find(e=>{let[t]=e;return"string"==typeof t?r.startsWith(t):"function"==typeof t?t(r):t instanceof RegExp&&t.test(r)}))&&void 0!==n?n:[];return a?a(e,r,i):e},[]),T=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.trim();return i.startsWith("http")?i:"".concat(t,"/").concat(i)},W=e=>{let t=new URL(e);return t.pathname=t.pathname.endsWith("/")?t.pathname:t.pathname.split("/").slice(0,-1).join("/"),t.search="",t.href},L=e=>Object.fromEntries([...e.matchAll(/([A-Z0-9-]+)=(?:"([^"]+)"|([^,]+))/g)].map(e=>[S(e[1]),e[2]||e[3]])),S=e=>e.toLowerCase().replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase()),I=(a=new WeakMap,r=Symbol.asyncIterator,class{get error(){return(0,c._)(this,a)}async *[r](){let e,t=this.readableStream.getReader();try{for(;;){let{done:i,value:r}=await t.read();if(i){if(e){let t=e;e=void 0,yield t}break}if(e){let t=new Uint8Array(e.length+r.length);t.set(e),t.set(r,e.length),e=t,t=void 0}else e=r;
1for(;e&&e.length>=131072;){let t=e;e=void 0,yield t;break}}}catch(e){(0,f._)(this,a,e)}finally{if(e){let t=e;e=void 0,yield t}t.releaseLock();return}}constructor(e){(0,h._)(this,a,{writable:!0,value:void 0}),this.readableStream=e}}),B=(e,t,i)=>{if(!e)return;let r=new AbortController,n=r.signal;return x(e,n).then(async e=>{let{renditions:r}=e,a=C(r,i),o=await Promise.all(a.map(e=>k(e,n)));if(n.aborted)return;let s=await U(o,t);j(o,s,t,i,n)}).catch(e=>{if("unload"!==e)throw e}),()=>{t.src&&(t.src="",t.load()),r.abort("unload")}},C=(e,t)=>{let{maxResolution:i,audio:r}=t,n=e.filter(e=>!e.type),a=i?n.filter(e=>{let{height:t}=e;return!t||t<=parseInt(i)}).sort((e,t)=>(t.height||0)-(e.height||0))[0]:n[0],o=a.audio&&e.filter(e=>{let{groupId:t}=e;return t===a.audio}).find(e=>"YES"===e.default);return o&&r?[a,o]:[a]},U=async(e,t)=>{var i;let r=new(null!==(i=globalThis.ManagedMediaSource)&&void 0!==i?i:MediaSource);t.src=URL.createObjectURL(r),await H(r,"sourceopen");let n=P(e);return n>0&&(r.duration=n),e.forEach(e=>{let{mimeType:t,codec:i}=e;try{let e=r.addSourceBuffer("".concat(t,'; codecs="').concat(i,'"'));n>0&&(e.appendWindowEnd=n)}catch(e){throw console.error("Failed to add source buffer for ".concat(t," with codec ").concat(i)),e}}),r},P=e=>{let[{segments:t=[]},{segments:i=[]}={}]=e;return Math.max(t.reduce((e,t)=>{let{duration:i}=t;return e+i},0),i.reduce((e,t)=>{let{duration:i}=t;return e+i},0))},j=(e,t,i,r,n)=>{let a=!1,o,s=D(e),l=async()=>{if(n.aborted){i.removeEventListener("timeupdate",l),clearInterval(o);return}if(!a){a=!0;try{await Promise.all(e.map(async(e,n)=>{let a=t.sourceBuffers[n],o=[...s][n],l=e.segments,u=o?[o]:[];for(let e of(u.push(...N(l,a.buffered,i.currentTime,r)),u)){let o=new URL(e.uri);try{for await(let l of(r.debug&&console.info("".concat(n?"audio":"video"),"".concat(e.start," -> ").concat(e.end),o.hostname,o.pathname),await O(e.uri)))try{await V(t,a,l),0===e.duration&&s.delete(e)}catch(e){if((null==e?void 0:e.name)==="QuotaExceededError")await z(a,i.currentTime),await V(t,a,l);else throw e}}catch(t){console.error("Failed to load segment ".concat(e.uri,":"),t)}}}))}finally{a=!1}
1A(t,P(e))}};l(),o=setInterval(l,500),i.addEventListener("timeupdate",l)},A=(e,t)=>{if(t>0&&"open"===e.readyState&&Q(e,t))try{e.endOfStream()}catch(e){}},D=e=>{let t=new Set;for(let{segments:i}of e){let e=null==i?void 0:i.find(e=>0===(e.duration||0)&&!!e.uri);e&&t.add(e)}return t},N=function(){var e,t,i;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=new Set,l=X(n,a),u=a+(null!==(e=o.maxBufferLength)&&void 0!==e?e:15);if(l>=u)return s;let d=r.findIndex(e=>(e.end||0)>l);if(d<0)return s;for(let e=d;e<r.length;e+=1){let a=r[e],o=null!==(t=a.start)&&void 0!==t?t:0,d=null!==(i=a.end)&&void 0!==i?i:o+(a.duration||0);if(!(d<=l)&&!F(o,d,n)&&(a.uri&&!s.has(a)&&s.add(a),d>=u))break}return s},X=(e,t)=>{if(0===e.length)return t;for(let i=0;i<e.length;i+=1){let r=e.start(i),n=e.end(i);if(r-.25<=t&&t<n+.25){let t=n;for(let r=i+1;r<e.length;r+=1){let i=e.start(r),n=e.end(r);if(i-t<=.25)t=Math.max(t,n);else break}return t}}return t},F=(e,t,i)=>{if(null==e||null==t)return!1;for(let r=0;r<i.length;r++){let n=i.start(r),a=i.end(r);if(n<=e+.25&&t-.25<=a)return!0}return!1},O=async e=>{let t=await y(e);if(!t.ok||!t.body)throw Error("Failed to fetch segment: ".concat(t.status));return new I(t.body)},V=async(e,t,i)=>{if(t.updating&&await H(t,"updateend"),"closed"===e.readyState)return;let r=H(t,"updateend");return t.appendBuffer(i),r},z=async(e,t)=>{try{e.updating&&await H(e,"updateend");let i=e.buffered;if(0===i.length)return;let r=i.start(0),n=Math.min(Math.max(0,t-5),i.end(i.length-1));if(n>r){let t=H(e,"updateend");e.remove(r,n),await t}}catch(e){console.warn("Buffer eviction failed:",e)}},H=async(e,t)=>new Promise(i=>{e.addEventListener(t,i,{once:!0})}),Q=(e,t)=>Array.from(e.sourceBuffers).every(e=>F(t,t,e.buffered)),Y=(o=new WeakMap,s=new WeakMap,l=new WeakMap,u=new WeakMap,(d=class e{get config(){return(0,c._)(this,l)}set config(t){(0,f._)(this,l,{...e.DefaultConfig,...t})}attachMedia(e){(0,f._)(this,o,e)}loadSource(e){var t;(0,f._)(this,s,e),(0,c._)(this,o)&&(this.config.debug&&console.info("load",(0,c._)(this,s),this.config),null===(t=(0,c._)(this,u))||void 0===t||t.call(this),(0,f._)(this,u,B((0,c._)(this,s),(0,c._)(this,o),this.config)))}constructor(){(0,h._)(this,o,{writable:!0,value:void 0}),(0,h._)(this,s,{writable:!0,value:void 0}),(0,h._)(this,l,{writable:!0,value:void 0}),(0,h._)(this,u,{writable:!0,value:void 0}),(0,f._)(this,o,null),(0,f._)(this,s,null),(0,f._)(this,l,{...e.DefaultConfig})}}).DefaultConfig={maxBufferLength:15,audio:!0},d),Z={audio:!1},q=(n=EventTarget,class extends w(n,Y){get config(){return Object.assign(super.config,{...Z,...super.config})}set config(e){super.config=e}load(){let e=globalThis.mux,t=this.display;if(e&&t&&!t.mux&&this.src){var i,r;let n=null!==(r=performance.timeOrigin)&&void 0!==r?r:null===(i=performance.timing)||void 0===i?void 0:i.navigationStart;e.monitor(t,{debug:this.config.debug,data:{player_name:"mux-background-video",player_version:"0.0.1",player_init_time:n,video_stream_type:"on-demand"}}),t.mux.setStateDataTranslator(e=>({...e,video_source_url:this.src}))}super.load()}}),G=(0,v.forwardRef)((e,t)=>{let{className:i,style:r,children:n,src:a,audio:o,debug:s,maxResolution:l,preload:u,...d}=e,c=(0,v.useRef)(null),h=(0,v.useRef)(null);return(0,v.useEffect)(()=>{var e;if(c.current)return null!==(e=h.current)&&void 0!==e||(h.current=new q),h.current.display=c.current,h.current.config={audio:o,debug:s,maxResolution:l,preload:u},h.current.src=null!=a?a:"",()=>{h.current&&(h.current=null)}},[a,o,s,l,u]),(0,m.jsxs)("div",{className:"".concat(i?"".concat(i," "):"","mux-background-video"),style:r,children:[(0,m.jsx)("style",{children:"\n .mux-background-video {\n position: relative;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .mux-background-video > video {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: inherit;\n }\n\n .mux-background-video > :where(img, picture) {\n width: 100%;\n height: 100%;\n object-fit: inherit;\n }\n "}),n,(0,m.jsx)("video",{ref:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return v.useCallback(function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return e=>{let i=!1,r=t.map(t=>{let r=J(t,e);return i||"function"!=typeof r||(i=!0),r});if(i)return()=>{for(let e=0;e<r.length;e++){let i=r[e];"function"==typeof i?i():J(t[e],null)}}}}(...t),t)}
1(c,t),muted:!0,autoPlay:!0,loop:!0,playsInline:!0,disableRemotePlayback:!0,disablePictureInPicture:!0,...d})]})});function J(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}G.displayName="MuxBackgroundVideo"},27938:function(e,t,i){i.d(t,{_:function(){return r}});function r(e,t,i){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return i}},12226:function(e,t,i){i.d(t,{_:function(){return n}});var r=i(51410);function n(e,t){(0,r.E)(e,t),t.add(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.