1/*! For license information please see reactPlayerHls.a1187ac91db35056d86c.js.LICENSE.txt */ 2"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["reactPlayerHls"],{"./node_modules/hls-video-element/dist/react.js"(e,t,i){i.r(t),i.d(t,{default:()=>v});var s=i("react"),n=i("./node_modules/custom-media-element/dist/custom-media-element.js"),a=i("./node_modules/media-tracks/dist/index.js"),o=i("./node_modules/hls.js/dist/hls.mjs");const r=(l=(0,a.u6)(n.lB),class extends l{static shadowRootOptions={...l.shadowRootOptions};static getTemplateHTML=(e,t={})=>{const{src:i,...s}=e;return`\n <script type="application/json" id="config">\n ${JSON.stringify(t.config||{})}\n <\/script>\n ${l.getTemplateHTML(s)}\n `};#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()}#s(){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;const i=!this.api;if(this.#s(),this.src)if(i&&!this.#t&&(this.#t=JSON.parse((null==(e=this.shadowRoot.getElementById("config"))?void 0:e.textContent)||"{}")),o.Ay.isSupported()){switch(await Promise.resolve(),this.api=new o.Ay({liveDurationInfinity:!0,autoStartLoad:!1,...this.config}),this.api.loadSource(this.src),this.api.attachMedia(this.nativeEl),this.nativeEl.preload){case"none":{const e=()=>this.api.startLoad();this.nativeEl.addEventListener("play",e,{once:!0}),this.api.on(o.Ay.Events.DESTROYING,(()=>{this.nativeEl.removeEventListener("play",e)}));break}case"metadata":{const e=this.api.config.maxBufferLength,t=this.api.config.maxBufferSize;this.api.config.maxBufferLength=1,this.api.config.maxBufferSize=1;const i=()=>{this.api.config.maxBufferLength=e,this.api.config.maxBufferSize=t};this.nativeEl.addEventListener("play",i,{once:!0}),this.api.on(o.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.#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);const e=new WeakMap;this.api.on(o.Ay.Events.MANIFEST_PARSED,((t,i)=>{this.nativeEl.autoplay&&this.nativeEl.paused&&this.nativeEl.play().catch((e=>{console.warn("Autoplay failed:",e)})),n();let s=this.videoTracks.getTrackById("main");s||(s=this.addVideoTrack("main"),s.id="main",s.selected=!0);for(const[t,n]of i.levels.entries()){const i=s.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()){const i=t.default?"main":"alternative",s=this.addAudioTrack(i,t.name,t.lang);s.id=`${e}`,t.default&&(s.enabled=!0)}})),this.audioTracks.addEventListener("change",(()=>{var e;const 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.Ay.Events.LEVELS_UPDATED,((t,i)=>{const s=this.videoTracks[this.videoTracks.selectedIndex??0];if(!s)return;const n=i.levels.map((t=>e.get(t)));for(const e of this.videoRenditions)e.id&&!n.includes(e.id)&&s.removeRendition(e)}));let i=null;this.api.on(o.Ay.Events.ERROR,((e,t)=>{t.type===o.Ay.ErrorTypes.NETWORK_ERROR&&t.details===o.Ay.ErrorDetails.FRAG_LOAD_ERROR&&(i=t.frag.level)})),this.api.on(o.Ay.Events.LEVEL_SWITCHED,((e,t)=>{const s=t.level;null!==i&&s<i&&(console.warn(`â ï¸ hls.js downgraded quality from level ${i} to ${s} due to fragment load failure.`),this.videoRenditions.selectedIndex=s,i=null)}));const s=e=>{const t=e.target.selectedIndex;t!=this.api.nextLevel&&(this.api.nextLevel=t)};null==(t=this.videoRenditions)||t.addEventListener("change",s);const n=()=>{for(const e of this.videoTracks)this.removeVideoTrack(e);for(const e of this.audioTracks)this.removeAudioTrack(e)};this.api.once(o.Ay.Events.DESTROYING,n)}else 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)){const t=this[e];delete this[e],this[e]=t}}});var l;globalThis.customElements&&!globalThis.customElements.get("hls-video")&&globalThis.customElements.define("hls-video",r);var c=r,d=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),u={className:"class",htmlFor:"for"};function h(e){return e.toLowerCase()}function p(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e||"object"==typeof e&&null!==e?void 0:e}function f(e,t,i){var s;e[t]=i,null==i&&t in((null==(s=globalThis.HTMLElement)?void 0:s.prototype)??{})&&e.removeAttribute(t)}var v=function({react:e,tagName:t,elementClass:i,events:s,displayName:n,defaultProps:a,toAttributeName:o=h,toAttributeValue:r=p}){const l=Number.parseInt(e.version)>=19,c=e.forwardRef(((n,c)=>{var h,v;const m=e.useRef(null),g=e.useRef(new Map),y={},E={},T={},L={};for(const[e,t]of Object.entries(n)){if(d.has(e)){T[e]=t;continue}const s=o(u[e]??e);if(i.prototype&&e in i.prototype&&!(e in((null==(h=globalThis.HTMLElement)?void 0:h.prototype)??{}))&&!(null==(v=i.observedAttributes)?void 0:v.some((e=>e===s)))){L[e]=t;continue}if(e.startsWith("on")){y[e]=t;continue}const n=r(t);if(s&&null!=n&&(E[s]=String(n),l||(T[s]=n)),s&&l){const e=p(t);T[s]=n!==e?n:t}}if("undefined"!=typeof window){for(const t in y){const i=y[t],n=t.endsWith("Capture"),a=((null==s?void 0:s[t])??t.slice(2).toLowerCase()).slice(0,n?-7:void 0);e.useLayoutEffect((()=>{const e=null==m?void 0:m.current;if(e&&"function"==typeof i)return e.addEventListener(a,i,n),()=>{e.removeEventListener(a,i,n)}}),[null==m?void 0:m.current,i])}e.useLayoutEffect((()=>
2{if(null===m.current)return;const e=new Map;for(const t in L)f(m.current,t,L[t]),g.current.delete(t),e.set(t,L[t]);for(const[e,t]of g.current)f(m.current,e,void 0);g.current=e}))}if("undefined"==typeof window&&(null==i?void 0:i.getTemplateHTML)&&(null==i?void 0:i.shadowRootOptions)){const{mode:t,delegatesFocus:s}=i.shadowRootOptions,a=e.createElement("template",{shadowrootmode:t,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(E,n)},key:"ce-la-react-ssr-template-shadow-root"});T.children=[a,T.children]}return e.createElement(t,{...a,...T,ref:e.useCallback((e=>{m.current=e,"function"==typeof c?c(e):null!==c&&(c.current=e)}),[c])},T.children)}));return c.displayName=n??i.name,c}({react:s,tagName:"hls-video",elementClass:c,toAttributeName:e=>"muted"===e?"":"defaultMuted"===e?"muted":h(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.