import{_ as k,R as C}from"./index-95Cb4Zif.js";import{C as m}from"./custom-media-element-Ce0vsE-t.js";class L extends m{static shadowRootOptions={...m.shadowRootOptions};static getTemplateHTML=i=>{const{src:n,...s}=i;return m.getTemplateHTML(s)};#t;attributeChangedCallback(i,n,s){i!=="src"&&super.attributeChangedCallback(i,n,s),i==="src"&&n!=s&&this.load()}async load(){if(this.#t)this.api.attachSource(this.src);else{this.#t=!0;const i=await k(()=>import("./dash.all.min-C1mu-HkH.js"),[]);this.api=i.MediaPlayer().create(),this.api.initialize(this.nativeEl,this.src,this.autoplay)}}}globalThis.customElements&&!globalThis.customElements.get("dash-video")&&globalThis.customElements.define("dash-video",L);var N=L,A=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),O={className:"class",htmlFor:"for"};function S(e){return e.toLowerCase()}function g(e){if(typeof e=="boolean")return e?"":void 0;if(typeof e!="function"&&!(typeof e=="object"&&e!==null))return e}function I({react:e,tagName:i,elementClass:n,events:s,displayName:M,defaultProps:P,toAttributeName:R=S,toAttributeValue:H=g}){const v=Number.parseInt(e.version)>=19,y=e.forwardRef((T,d)=>{var b,E;const a=e.useRef(null),p=e.useRef(new Map),h={},_={},u={},f={};for(const[t,o]of Object.entries(T)){if(A.has(t)){u[t]=o;continue}const r=R(O[t]??t);if(t in n.prototype&&!(t in(((b=globalThis.HTMLElement)==null?void 0:b.prototype)??{}))&&!((E=n.observedAttributes)!=null&&E.some(c=>c===r))){f[t]=o;continue}if(t.startsWith("on")){h[t]=o;continue}const l=H(o);if(r&&l!=null&&(_[r]=String(l),v||(u[r]=l)),r&&v){const c=g(o);l!==c?u[r]=l:u[r]=o}}if(typeof window<"u"){for(const t in h){const o=h[t],r=t.endsWith("Capture"),l=(s?.[t]??t.slice(2).toLowerCase()).slice(0,r?-7:void 0);e.useLayoutEffect(()=>{const c=a?.current;if(!(!c||typeof o!="function"))return c.addEventListener(l,o,r),()=>{c.removeEventListener(l,o,r)}},[a?.current,o])}e.useLayoutEffect(()=>{if(a.current===null)return;const t=new Map;for(const o in f)w(a.current,o,f[o]),p.current.delete(o),t.set(o,f[o]);for(const[o,r]of p.current)w(a.current,o,void 0);p.current=t})}if(typeof window>"u"&&n?.getTemplateHTML&&n?.shadowRootOptions){const{mode:t,delegatesFocus:o}=n.shadowRootOptions,r=e.createElement("template",{shadowrootmode:t,shadowrootdelegatesfocus:o,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(_,T)}});u.children=[r,u.children]}return e.createElement(i,{...P,...u,ref:e.useCallback(t=>{a.current=t,typeof d=="function"?d(t):d!==null&&(d.current=t)},[d])})});return y.displayName=M??n.name,y}function w(e,i,n){var s;e[i]=n,n==null&&i in(((s=globalThis.HTMLElement)==null?void 0:s.prototype)??{})&&e.removeAttribute(i)}var F=I({react:C,tagName:"dash-video",elementClass:N});/*! Bundled license information:

ce-la-react/dist/ce-la-react.js:
  (**
   * @license
   * Copyright 2018 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *
   * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
   *)
*/export{F as default};
