@zeniai/web-cockpit-ui 2.0.34-dev → 2.0.35-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/assets/CreditAgentRoutes-CZ-C1wzQ.js +4 -0
  2. package/dist/assets/Preview-CAmOkbjw.js +1 -0
  3. package/dist/assets/ScreenRoutes-yvbp_Lbz.js +180 -0
  4. package/dist/assets/SignInScreen-DIqNMUI1.js +1 -0
  5. package/dist/assets/analytics-BfH6x-bh.js +68 -0
  6. package/dist/assets/analyticsHelper-DpKWIfA_.js +1 -0
  7. package/dist/assets/core-BMXdW52V.js +12 -0
  8. package/dist/assets/dash.all.min-BNMSYYE9.js +21 -0
  9. package/dist/assets/empty-CMgD5T-3.js +1 -0
  10. package/dist/assets/empty-CURC4K9t.js +1 -0
  11. package/dist/assets/epic-0u3weRPq.js +2 -0
  12. package/dist/assets/favicon-D56XvgAH.ico +0 -0
  13. package/dist/assets/hls-DifHSkbp.js +40 -0
  14. package/dist/assets/index-BIPrynO9.js +79830 -0
  15. package/dist/assets/index-BcCMwDMT.js +1 -0
  16. package/dist/assets/index-CY8CEYeK.js +3304 -0
  17. package/dist/assets/index-D9Zhqjkb.js +2 -0
  18. package/dist/assets/index-DSJ2w1jZ.js +1 -0
  19. package/dist/assets/index-OG0h_gMR.js +1 -0
  20. package/dist/assets/index-sjMkGJDk.js +1 -0
  21. package/dist/assets/index-y98xvd7i.css +1 -0
  22. package/dist/assets/lexical-Cj6VOpGX.js +21 -0
  23. package/dist/assets/liveblocks-BQqAIDc5.js +54 -0
  24. package/dist/assets/lottie-qwRZdbTy.js +2 -0
  25. package/dist/assets/mixin-BPAPQfSE.js +43 -0
  26. package/dist/assets/mui-BQBCqqWF.js +9 -0
  27. package/dist/assets/react-BFtEL_0u.js +34 -0
  28. package/dist/assets/react-BfNEEjJ_.js +19 -0
  29. package/dist/assets/react-C83wXUqV.js +6 -0
  30. package/dist/assets/react-C8sJgD0w.js +22 -0
  31. package/dist/assets/react-Cu6ubvAK.js +7 -0
  32. package/dist/assets/react-DZq71Z0g.js +19 -0
  33. package/dist/assets/react-hF-9mrjI.js +21 -0
  34. package/dist/assets/react-jnSxQgdS.js +17 -0
  35. package/dist/assets/recharts-BZRqFQc_.js +65 -0
  36. package/dist/assets/sentry-B9T9CHF5.js +500 -0
  37. package/dist/assets/url-BEGh4GqD.js +1 -0
  38. package/dist/assets/url-BMK-Vtzl.js +6 -0
  39. package/dist/assets/utils-Fih0Jz-h.js +36 -0
  40. package/dist/assets/zeni-epic-state-DSTkpZye.js +13 -0
  41. package/dist/index.html +1 -0
  42. package/dist/robots.txt +3 -0
  43. package/dist/service-worker.js +160 -0
  44. package/package.json +4 -4
@@ -0,0 +1,6 @@
1
+ import{b as O}from"./sentry-B9T9CHF5.js";import{M as P,C as A}from"./mixin-BPAPQfSE.js";import{H as f}from"./hls-DifHSkbp.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},v=new t.Error().stack;v&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[v]="5938584d-4999-48a7-96a3-89019d2e4c10",t._sentryDebugIdIdentifier="sentry-dbid-5938584d-4999-48a7-96a3-89019d2e4c10")}catch{}})();const x=t=>class extends t{static shadowRootOptions={...t.shadowRootOptions};static getTemplateHTML=(e,s={})=>{const{src:h,...y}=e;return`
2
+ <script type="application/json" id="config">
3
+ ${JSON.stringify(s.config||{})}
4
+ <\/script>
5
+ ${t.getTemplateHTML(y)}
6
+ `};#e=null;#t=null;constructor(){super(),this.#o("config")}get config(){return this.#t}set config(e){this.#t=e}attributeChangedCallback(e,s,h){e!=="src"&&super.attributeChangedCallback(e,s,h),e==="src"&&s!=h&&this.load()}#n(){var e,s;(e=this.#e)==null||e.remove(),(s=this.nativeEl)==null||s.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.#i),this.api&&(this.api.detachMedia(),this.api.destroy(),this.api=null)}async load(){var e,s;const h=!this.api;if(this.#n(),!!this.src){if(h&&!this.#t&&(this.#t=JSON.parse(((e=this.shadowRoot.getElementById("config"))==null?void 0:e.textContent)||"{}")),f.isSupported()){switch(await Promise.resolve(),this.api=new f({liveDurationInfinity:!0,autoStartLoad:!1,...this.config}),this.api.loadSource(this.src),this.api.attachMedia(this.nativeEl),this.nativeEl.preload){case"none":{const r=()=>this.api.startLoad();this.nativeEl.addEventListener("play",r,{once:!0}),this.api.on(f.Events.DESTROYING,()=>{this.nativeEl.removeEventListener("play",r)});break}case"metadata":{const r=this.api.config.maxBufferLength,o=this.api.config.maxBufferSize;this.api.config.maxBufferLength=1,this.api.config.maxBufferSize=1;const i=()=>{this.api.config.maxBufferLength=r,this.api.config.maxBufferSize=o};this.nativeEl.addEventListener("play",i,{once:!0}),this.api.on(f.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.#i),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 y=new WeakMap;this.api.on(f.Events.MANIFEST_PARSED,(r,o)=>{this.nativeEl.autoplay&&this.nativeEl.paused&&this.nativeEl.play().catch(d=>{console.warn("Autoplay failed:",d)}),b();let i=this.videoTracks.getTrackById("main");i||(i=this.addVideoTrack("main"),i.id="main",i.selected=!0);for(const[d,l]of o.levels.entries()){const u=i.addRendition(l.url[0],l.width,l.height,l.videoCodec,l.bitrate);y.set(l,`${d}`),u.id=`${d}`}for(let[d,l]of o.audioTracks.entries()){const u=l.default?"main":"alternative",T=this.addAudioTrack(u,l.name,l.lang);T.id=`${d}`,l.default&&(T.enabled=!0)}}),this.audioTracks.addEventListener("change",()=>{var r;const o=+((r=[...this.audioTracks].find(d=>d.enabled))==null?void 0:r.id),i=this.api.audioTracks.map(d=>d.id);o!=this.api.audioTrack&&i.includes(o)&&(this.api.audioTrack=o)}),this.api.on(f.Events.LEVELS_UPDATED,(r,o)=>{const i=this.videoTracks[this.videoTracks.selectedIndex??0];if(!i)return;const d=o.levels.map(l=>y.get(l));for(const l of this.videoRenditions)l.id&&!d.includes(l.id)&&i.removeRendition(l)});let E=null;this.api.on(f.Events.ERROR,(r,o)=>{o.type===f.ErrorTypes.NETWORK_ERROR&&o.details===f.ErrorDetails.FRAG_LOAD_ERROR&&(E=o.frag.level)}),this.api.on(f.Events.LEVEL_SWITCHED,(r,o)=>{const i=o.level;E!==null&&i<E&&(console.warn(`⚠️ hls.js downgraded quality from level ${E} to ${i} due to fragment load failure.`),this.videoRenditions.selectedIndex=i,E=null)});const L=r=>{const o=r.target.selectedIndex;o!=this.api.nextLevel&&(this.api.nextLevel=o)};(s=this.videoRenditions)==null||s.addEventListener("change",L);const b=()=>{for(const r of this.videoTracks)this.removeVideoTrack(r);for(const r of this.audioTracks)this.removeAudioTrack(r)};this.api.once(f.Events.DESTROYING,b);return}await Promise.resolve(),this.nativeEl.canPlayType("application/vnd.apple.mpegurl")&&(this.nativeEl.src=this.src)}}#i=()=>{var e,s,h;(e=this.nativeEl)!=null&&e.webkitCurrentPlaybackTargetIsWireless?(s=this.api)==null||s.stopLoad():(h=this.api)==null||h.startLoad()};#o(e){if(Object.prototype.hasOwnProperty.call(this,e)){const s=this[e];delete this[e],this[e]=s}}},S=x(P(A));globalThis.customElements&&!globalThis.customElements.get("hls-video")&&globalThis.customElements.define("hls-video",S);var H=S,D=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),N={className:"class",htmlFor:"for"};function M(t){return t.toLowerCase()}function _(t){if(typeof t=="boolean")return t?"":void 0;if(typeof t!="function"&&!(typeof t=="object"&&t!==null))return t}function C({react:t,tagName:v,elementClass:e,events:s,displayName:h,defaultProps:y,toAttributeName:E=M,toAttributeValue:L=_}){const b=Number.parseInt(t.version)>=19,r=t.forwardRef((o,i)=>{var d,l;const u=t.useRef(null),T=t.useRef(new Map),w={},R={},p={},k={};for(const[n,a]of Object.entries(o)){if(D.has(n)){p[n]=a;continue}const c=E(N[n]??n);if(e.prototype&&n in e.prototype&&!(n in(((d=globalThis.HTMLElement)==null?void 0:d.prototype)??{}))&&!((l=e.observedAttributes)!=null&&l.some(m=>m===c))){k[n]=a;continue}if(n.startsWith("on")){w[n]=a;continue}const g=L(a);if(c&&g!=null&&(R[c]=String(g),b||(p[c]=g)),c&&b){const m=_(a);g!==m?p[c]=g:p[c]=a}}if(typeof window<"u"){for(const n in w){const a=w[n],c=n.endsWith("Capture"),g=(s?.[n]??n.slice(2).toLowerCase()).slice(0,c?-7:void 0);t.useLayoutEffect(()=>{const m=u?.current;if(!(!m||typeof a!="function"))return m.addEventListener(g,a,c),()=>{m.removeEventListener(g,a,c)}},[u?.current,a])}t.useLayoutEffect(()=>{if(u.current===null)return;const n=new Map;for(const a in k)I(u.current,a,k[a]),T.current.delete(a),n.set(a,k[a]);for(const[a,c]of T.current)I(u.current,a,void 0);T.current=n})}if(typeof window>"u"&&e?.getTemplateHTML&&e?.shadowRootOptions){const{mode:n,delegatesFocus:a}=e.shadowRootOptions,c=t.createElement("template",{shadowrootmode:n,shadowrootdelegatesfocus:a,dangerouslySetInnerHTML:{__html:e.getTemplateHTML(R,o)},key:"ce-la-react-ssr-template-shadow-root"});p.children=[c,p.children]}return t.createElement(v,{...y,...p,ref:t.useCallback(n=>{u.current=n,typeof i=="function"?i(n):i!==null&&(i.current=n)},[i])},p.children)});return r.displayName=h??e.name,r}function I(t,v,e){var s;t[v]=e,e==null&&v in(((s=globalThis.HTMLElement)==null?void 0:s.prototype)??{})&&t.removeAttribute(v)}var j=C({react:O,tagName:"hls-video",elementClass:H,toAttributeName(t){return t==="muted"?"":t==="defaultMuted"?"muted":M(t)}});export{j as default};
@@ -0,0 +1,22 @@
1
+ import{b as N}from"./sentry-B9T9CHF5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4f661688-f882-4da4-9f6d-1cbb0c5f2007",e._sentryDebugIdIdentifier="sentry-dbid-4f661688-f882-4da4-9f6d-1cbb0c5f2007")}catch{}})();const O="https://open.spotify.com",$=/open\.spotify\.com\/(\w+)\/(\w+)/i,B="https://open.spotify.com/embed-podcast/iframe-api/v1",D="SpotifyIframeApi",j="onSpotifyIframeApiReady";function L(e,t={}){const i={src:R(e,t),scrolling:"no",frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return`
2
+ <style>
3
+ :host {
4
+ display: inline-block;
5
+ min-width: 160px;
6
+ min-height: 80px;
7
+ position: relative;
8
+ }
9
+ iframe {
10
+ position: absolute;
11
+ top: 0;
12
+ left: 0;
13
+ width: 100%;
14
+ height: 100%;
15
+ overflow: hidden;
16
+ }
17
+ :host(:not([controls])) {
18
+ display: none !important;
19
+ }
20
+ </style>
21
+ <iframe${W(i)}></iframe>
22
+ `}function R(e,t){var i,s,u;if(!e.src)return;const a=e.src.match($),d=a&&a[1],p=a&&a[2],r={t:(i=t.config)==null?void 0:i.startAt,theme:((s=t.config)==null?void 0:s.theme)==="dark"?"0":null},y=(u=t.config)!=null&&u.preferVideo?"/video":"";return`${O}/embed/${d}/${p}${y}?${x(r)}`}class C extends(globalThis.HTMLElement??class{}){static getTemplateHTML=L;static shadowRootOptions={mode:"open"};static observedAttributes=["controls","loop","src"];loadComplete=new M;#r;#a;#l;#t=!1;#e=!1;#i=!0;#s=0;#n=NaN;#o=!1;#u=null;constructor(){super(),this.#d("config")}async load(){var t,i,s;if(this.#r)return;this.#a&&(this.loadComplete=new M),this.#a=!0,await(this.#r=Promise.resolve()),this.#r=null,this.#t=!1,this.#e=!1,this.#s=0,this.#n=NaN,this.#o=!1,this.dispatchEvent(new Event("emptied"));let u=this.api;if(this.api=null,!this.src)return;this.dispatchEvent(new Event("loadstart"));const a={t:(t=this.config)==null?void 0:t.startAt,theme:((i=this.config)==null?void 0:i.theme)==="dark"?"0":null,preferVideo:(s=this.config)==null?void 0:s.preferVideo};if(this.#l)this.api=u,this.api.iframeElement.src=R(k(this.attributes),this);else{this.#l=!0,this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=L(k(this.attributes),this));let d=this.shadowRoot.querySelector("iframe");const p=await U(B,D,j);this.api=await new Promise(r=>p.createController(d,a,r)),this.api.iframeElement=d,this.api.addListener("ready",()=>{this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("volumechange"))}),this.api.addListener("playback_update",r=>{if(this.#e&&this.#i&&(r.data.isBuffering||!r.data.isPaused)){this.#e=!1,this.currentTime=1;return}if(r.data.duration/1e3!==this.#n&&(this.#e=!1,this.#n=r.data.duration/1e3,this.dispatchEvent(new Event("durationchange"))),r.data.position/1e3!==this.#s&&(this.#o=!1,this.#e=!1,this.#s=r.data.position/1e3,this.dispatchEvent(new Event("timeupdate"))),!this.#t&&!this.#i&&r.data.isPaused){this.#i=!0,this.dispatchEvent(new Event("pause"));return}if(this.#i&&(r.data.isBuffering||!r.data.isPaused)){this.#i=!1,this.dispatchEvent(new Event("play")),this.#t=r.data.isBuffering,this.#t?this.dispatchEvent(new Event("waiting")):this.dispatchEvent(new Event("playing"));return}if(this.#t&&!r.data.isPaused){this.#t=!1,this.dispatchEvent(new Event("playing"));return}if(!this.paused&&!this.seeking&&!this.#e&&Math.ceil(this.currentTime)>=this.duration){if(this.#e=!0,this.loop){this.currentTime=1;return}this.continuous||(this.pause(),this.dispatchEvent(new Event("ended")));return}})}this.loadComplete.resolve(),await this.loadComplete}async attributeChangedCallback(t,i,s){if(i!==s)switch(t){case"src":{this.load();return}}}async play(){var t;return this.#i=!1,this.#t=!0,this.dispatchEvent(new Event("play")),await this.loadComplete,(t=this.api)==null?void 0:t.resume()}async pause(){var t;return await this.loadComplete,(t=this.api)==null?void 0:t.pause()}get config(){return this.#u}set config(t){this.#u=t}get paused(){return this.#i??!0}get muted(){return!1}set muted(t){}get volume(){return 1}set volume(t){}get ended(){return Math.ceil(this.currentTime)>=this.duration}get seeking(){return this.#o}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",!!t)}get currentTime(){return this.#s}set currentTime(t){if(this.currentTime==t)return;this.#o=!0;let i=this.#s;this.#s=t,this.dispatchEvent(new Event("timeupdate")),this.#s=i,this.loadComplete.then(()=>{var s;(s=this.api)==null||s.seek(t)})}get duration(){return this.#n}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",`${t}`)}#d(t){if(Object.prototype.hasOwnProperty.call(this,t)){const i=this[t];delete this[t],this[t]=i}}}function W(e){let t="";for(const i in e){const s=e[i];s===""?t+=` ${i}`:t+=` ${i}="${s}"`}return t}function x(e){return String(new URLSearchParams(z(e)))}function z(e){let t={};for(let i in e){let s=e[i];s===!0||s===""?t[i]=1:s===!1?t[i]=0:s!=null&&(t[i]=s)}return t}function k(e){let t={};for(let i of e)t[i.name]=i.value;return t}const b={};async function U(e,t,i){return b[e]?b[e]:self[t]?Promise.resolve(self[t]):b[e]=new Promise(function(s,u){const a=document.createElement("script");a.src=e;const d=p=>s(p);self[i]=d,a.onload=()=>!i,a.onerror=u,document.head.append(a)})}class M extends Promise{constructor(t=()=>{}){let i,s;super((u,a)=>{t(u,a),i=u,s=a}),this.resolve=i,this.reject=s}}globalThis.customElements&&!globalThis.customElements.get("spotify-audio")&&globalThis.customElements.define("spotify-audio",C);var q=C,F=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),G={className:"class",htmlFor:"for"};function H(e){return e.toLowerCase()}function S(e){if(typeof e=="boolean")return e?"":void 0;if(typeof e!="function"&&!(typeof e=="object"&&e!==null))return e}function V({react:e,tagName:t,elementClass:i,events:s,displayName:u,defaultProps:a,toAttributeName:d=H,toAttributeValue:p=S}){const r=Number.parseInt(e.version)>=19,y=e.forwardRef((T,v)=>{var _,A;const c=e.useRef(null),w=e.useRef(new Map),E={},P={},h={},g={};for(const[n,o]of Object.entries(T)){if(F.has(n)){h[n]=o;continue}const l=d(G[n]??n);if(i.prototype&&n in i.prototype&&!(n in(((_=globalThis.HTMLElement)==null?void 0:_.prototype)??{}))&&!((A=i.observedAttributes)!=null&&A.some(m=>m===l))){g[n]=o;continue}if(n.startsWith("on")){E[n]=o;continue}const f=p(o);if(l&&f!=null&&(P[l]=String(f),r||(h[l]=f)),l&&r){const m=S(o);f!==m?h[l]=f:h[l]=o}}if(typeof window<"u"){for(const n in E){const o=E[n],l=n.endsWith("Capture"),f=(s?.[n]??n.slice(2).toLowerCase()).slice(0,l?-7:void 0);e.useLayoutEffect(()=>{const m=c?.current;if(!(!m||typeof o!="function"))return m.addEventListener(f,o,l),()=>{m.removeEventListener(f,o,l)}},[c?.current,o])}e.useLayoutEffect(()=>{if(c.current===null)return;const n=new Map;for(const o in g)I(c.current,o,g[o]),w.current.delete(o),n.set(o,g[o]);for(const[o,l]of w.current)I(c.current,o,void 0);w.current=n})}if(typeof window>"u"&&i?.getTemplateHTML&&i?.shadowRootOptions){const{mode:n,delegatesFocus:o}=i.shadowRootOptions,l=e.createElement("template",{shadowrootmode:n,shadowrootdelegatesfocus:o,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(P,T)},key:"ce-la-react-ssr-template-shadow-root"});h.children=[l,h.children]}return e.createElement(t,{...a,...h,ref:e.useCallback(n=>{c.current=n,typeof v=="function"?v(n):v!==null&&(v.current=n)},[v])},h.children)});return y.displayName=u??i.name,y}function I(e,t,i){var s;e[t]=i,i==null&&t in(((s=globalThis.HTMLElement)==null?void 0:s.prototype)??{})&&e.removeAttribute(t)}var J=V({react:N,tagName:"spotify-audio",elementClass:q,toAttributeName(e){return e==="muted"?"":e==="defaultMuted"?"muted":H(e)}});export{J as default};
@@ -0,0 +1,7 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dash.all.min-BNMSYYE9.js","assets/zeni-epic-state-DSTkpZye.js","assets/sentry-B9T9CHF5.js","assets/core-BMXdW52V.js"])))=>i.map(i=>d[i]);
2
+ import{b as D}from"./sentry-B9T9CHF5.js";import{ba as N}from"./zeni-epic-state-DSTkpZye.js";import{M as A,C as R}from"./mixin-BPAPQfSE.js";import"./core-BMXdW52V.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="5c362604-4fd2-4ccf-9c05-05b93d8e73e6",t._sentryDebugIdIdentifier="sentry-dbid-5c362604-4fd2-4ccf-9c05-05b93d8e73e6")}catch{}})();class L extends A(R){static shadowRootOptions={...R.shadowRootOptions};static getTemplateHTML=e=>{const{src:n,...o}=e;return R.getTemplateHTML(o)};#t;attributeChangedCallback(e,n,o){e!=="src"&&super.attributeChangedCallback(e,n,o),e==="src"&&n!=o&&this.load()}async _initThumbnails(e){const n=async(d,h)=>{const b=[],g=e.timescale||1,f=e.startNumber||1,w=e.presentationTimeOffset?e.presentationTimeOffset/g:0,_=e.segmentDuration;for(let l=0;l<d;l++){const T=C({thIndex:l,thduration:h,ttiles:d,tduration:_,startNumber:f,pto:w}),E=T+h,M=new Promise((m,y)=>{this.api.provideThumbnail(T,({url:s,width:a,height:c,x:p,y:v})=>{try{const k=new VTTCue(T,E,`${s}#xywh=${p},${v},${a},${c}`);m(k)}catch(k){y(k)}})});b.push(M)}return await Promise.all(b).catch(l=>console.error("Error processing thumbnails",l))},{totalThumbnails:o,thumbnailDuration:i}=$(e),u=await n(o,i);let r=this.nativeEl.querySelector('track[label="thumbnails"]');if(!r){r=O(),this.nativeEl.appendChild(r);const d=x(u);r.src=d,r.dispatchEvent(new Event("change"))}}async load(){if(this.#t){this.api.attachSource(this.src);return}this.#t=!0;const e=await N(()=>import("./dash.all.min-BNMSYYE9.js"),__vite__mapDeps([0,1,2,3]));this.api=e.MediaPlayer().create(),this.api.initialize(this.nativeEl,this.src,this.autoplay),this.api.on(e.MediaPlayer.events.STREAM_INITIALIZED,()=>{const n=this.api.getRepresentationsByType("video");let o=this.videoTracks.getTrackById("main");o||(o=this.addVideoTrack("main"),o.id="main",o.selected=!0),n.forEach(i=>{const u=i.bandwidth??i.bitrate??(Number.isFinite(i.bitrateInKbit)?i.bitrateInKbit*1e3:void 0),r=o.addRendition(i.id,i.width,i.height,i.mimeType??i.codec,u);r.id=i.id}),this.videoRenditions.addEventListener("change",()=>{const i=this.videoRenditions[this.videoRenditions.selectedIndex];i?.id?(this.api.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),this.api.setRepresentationForTypeById("video",i.id,!0)):this.api.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}})}),this.api.isDynamic()||this.api.getRepresentationsByType("image").forEach(async(u,r)=>{r>0||this._initThumbnails(u)})})}}function $(t){var e,n;const o=t.essentialProperties[0],[i,u]=o.value.split("x").map(Number),r=i*u,d=((n=(e=t.adaptation)==null?void 0:e.period)==null?void 0:n.duration)||null,h=t.segmentDuration,b=t.timescale||1,f=h/b/r;return{totalThumbnails:d!=null?Math.ceil(d/f):Math.ceil(h/f),thumbnailDuration:f}}function C({thIndex:t,tduration:e,thduration:n,ttiles:o,startNumber:i,pto:u}){const r=Math.floor(t/o)+i,d=t%o+1,h=(r-1)*e-u,b=(d-1)*n;return h+b}function O(){const t=document.createElement("track");return t.kind="metadata",t.label="thumbnails",t.srclang="en",t.mode="hidden",t.default=!0,t}function x(t){let e=`WEBVTT
3
+
4
+ `;for(const i of t)e+=`${o(i.startTime)} --> ${o(i.endTime)}
5
+ `,e+=`${i.text}
6
+
7
+ `;const n=new Blob([e],{type:"text/vtt"});return URL.createObjectURL(n);function o(i){const u=String(Math.floor(i/3600)).padStart(2,"0"),r=String(Math.floor(i%3600/60)).padStart(2,"0"),d=(i%60).toFixed(3).padStart(6,"0");return`${u}:${r}:${d}`}}globalThis.customElements&&!globalThis.customElements.get("dash-video")&&globalThis.customElements.define("dash-video",L);var B=L,H=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),F={className:"class",htmlFor:"for"};function P(t){return t.toLowerCase()}function S(t){if(typeof t=="boolean")return t?"":void 0;if(typeof t!="function"&&!(typeof t=="object"&&t!==null))return t}function W({react:t,tagName:e,elementClass:n,events:o,displayName:i,defaultProps:u,toAttributeName:r=P,toAttributeValue:d=S}){const h=Number.parseInt(t.version)>=19,b=t.forwardRef((g,f)=>{var w,_;const l=t.useRef(null),T=t.useRef(new Map),E={},M={},m={},y={};for(const[s,a]of Object.entries(g)){if(H.has(s)){m[s]=a;continue}const c=r(F[s]??s);if(n.prototype&&s in n.prototype&&!(s in(((w=globalThis.HTMLElement)==null?void 0:w.prototype)??{}))&&!((_=n.observedAttributes)!=null&&_.some(v=>v===c))){y[s]=a;continue}if(s.startsWith("on")){E[s]=a;continue}const p=d(a);if(c&&p!=null&&(M[c]=String(p),h||(m[c]=p)),c&&h){const v=S(a);p!==v?m[c]=p:m[c]=a}}if(typeof window<"u"){for(const s in E){const a=E[s],c=s.endsWith("Capture"),p=(o?.[s]??s.slice(2).toLowerCase()).slice(0,c?-7:void 0);t.useLayoutEffect(()=>{const v=l?.current;if(!(!v||typeof a!="function"))return v.addEventListener(p,a,c),()=>{v.removeEventListener(p,a,c)}},[l?.current,a])}t.useLayoutEffect(()=>{if(l.current===null)return;const s=new Map;for(const a in y)I(l.current,a,y[a]),T.current.delete(a),s.set(a,y[a]);for(const[a,c]of T.current)I(l.current,a,void 0);T.current=s})}if(typeof window>"u"&&n?.getTemplateHTML&&n?.shadowRootOptions){const{mode:s,delegatesFocus:a}=n.shadowRootOptions,c=t.createElement("template",{shadowrootmode:s,shadowrootdelegatesfocus:a,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(M,g)},key:"ce-la-react-ssr-template-shadow-root"});m.children=[c,m.children]}return t.createElement(e,{...u,...m,ref:t.useCallback(s=>{l.current=s,typeof f=="function"?f(s):f!==null&&(f.current=s)},[f])},m.children)});return b.displayName=i??n.name,b}function I(t,e,n){var o;t[e]=n,n==null&&e in(((o=globalThis.HTMLElement)==null?void 0:o.prototype)??{})&&t.removeAttribute(e)}var q=W({react:D,tagName:"dash-video",elementClass:B,toAttributeName(t){return t==="muted"?"":t==="defaultMuted"?"muted":P(t)}});export{q as default};
@@ -0,0 +1,19 @@
1
+ import{b as D}from"./sentry-B9T9CHF5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="3f9c635d-bb5c-433d-a4be-90b33a6abe62",t._sentryDebugIdIdentifier="sentry-dbid-3f9c635d-bb5c-433d-a4be-90b33a6abe62")}catch{}})();const H="https://www.tiktok.com/player/v1",O=/tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/,d={INIT:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3},x={[d.INIT]:"emptied",[d.PAUSED]:"pause",[d.ENDED]:"ended",[d.PLAYING]:"play",[d.BUFFERING]:"waiting"};function N(t,e={}){const o={src:I(t,e),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; autoplay; fullscreen; encrypted-media; gyroscope; picture-in-picture"};return e.config&&(o["data-config"]=JSON.stringify(e.config)),`
2
+ <style>
3
+ :host {
4
+ display:inline-block;
5
+ min-width: 300px;
6
+ min-height: 150px;
7
+ position: relative;
8
+ }
9
+ iframe {
10
+ position:absolute;
11
+ top:0;
12
+ left:0;
13
+ width:100%;
14
+ height:100%;
15
+ border:0;
16
+ }
17
+ </style>
18
+ <iframe ${$(o)} title="TikTok video"></iframe>
19
+ `}function I(t,e={}){if(!t.src)return;const o=t.src.match(O),i=o&&o[1],a={controls:t.controls===""?null:0,autoplay:t.autoplay,muted:t.muted,loop:t.loop,rel:0,...e.config};return`${H}/${i}?${W(a)}`}class v extends(globalThis.HTMLElement??class{}){static getTemplateHTML=N;static shadowRootOptions={mode:"open"};static get observedAttributes(){return["src","controls","loop","autoplay","muted"]}loadComplete=new A;#n;#s;#t=!1;#r=0;#a=!0;#l=null;#o=100;#u=0;#i;constructor(){super(),this.#m("config")}async load(){if(this.#n)return;this.shadowRoot||this.attachShadow(v.shadowRootOptions);const e=!this.#s;if(this.#s&&(this.loadComplete=new A),this.#s=!0,await(this.#n=Promise.resolve()),this.#n=null,this.#r=0,this.#t=!1,this.#a=!0,!this.src){this.shadowRoot.innerHTML="",globalThis.removeEventListener("message",this.#c);return}let o=this.shadowRoot.querySelector("iframe");const i=F(this.attributes);e&&o&&(this.#l=JSON.parse(o.getAttribute("data-config")||"{}")),(!o?.src||o.src!==I(i,this))&&(this.shadowRoot.innerHTML=N(i,this),o=this.shadowRoot.querySelector("iframe")),this.#i=o,globalThis.addEventListener("message",this.#c)}async attributeChangedCallback(e,o,i){if(o!==i)switch(e){case"muted":{await this.loadComplete,this.muted=i!=null;break}case"autoplay":case"controls":case"loop":case"src":{this.load();return}}}get config(){return this.#l}set config(e){this.#l=e}#c=e=>{var o;if(e.source!==((o=this.#i)==null?void 0:o.contentWindow))return;const i=e.data;if(i?.["x-tiktok-player"])switch(i.type){case"onPlayerReady":this.loadComplete.resolve();break;case"onStateChange":{this.#a=[d.INIT,d.PAUSED,d.ENDED].includes(i.value);const a=x[i.value];a&&this.dispatchEvent(new Event(a));break}case"onCurrentTime":this.#r=i.value.currentTime,this.#u=i.value.duration,this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("timeupdate"));break;case"onVolumeChange":this.#o=i.value,this.dispatchEvent(new Event("volumechange"));break;case"onMute":this.#t=!!i.value,this.#o=i.value?0:this.#o,this.dispatchEvent(new Event("volumechange"));break;case"onError":this.dispatchEvent(new Event("error"));break;default:console.warn("Unhandled TikTok player message:",i);break}};#e(e,o){var i;if(!((i=this.#i)!=null&&i.contentWindow))return;const a={"x-tiktok-player":!0,type:e,...o!==void 0?{value:o}:{}};this.#i.contentWindow.postMessage(a,"*")}async play(){await this.loadComplete,this.#e("play")}async pause(){await this.loadComplete,this.#e("pause")}async#d(e){await this.loadComplete,this.#e("seekTo",Number(e))}async#h(){await this.loadComplete,this.#e("mute")}async#f(){await this.loadComplete,this.#e("unMute")}get volume(){return this.#o/100}set volume(e){console.warn("Volume control is not supported for TikTok videos.")}get currentTime(){return this.#r}set currentTime(e){this.#d(e)}get muted(){return this.#t}set muted(e){this.#t=e,e?this.#h():this.#f()}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(e){this.toggleAttribute("muted",!!e)}get paused(){return this.#a}get duration(){return this.#u}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",e??"")}#m(e){if(Object.prototype.hasOwnProperty.call(this,e)){const o=this[e];delete this[e],this[e]=o}}}class A extends Promise{constructor(e=()=>{}){let o,i;super((a,m)=>{e(a,m),o=a,i=m}),this.resolve=o,this.reject=i}}function F(t){let e={};for(let o of t)e[o.name]=o.value;return e}function U(t){let e={};for(let o in t){let i=t[o];i===!0||i===""?e[o]=1:i===!1?e[o]=0:i!=null&&(e[o]=i)}return e}function W(t){return String(new URLSearchParams(U(t)))}function $(t){let e="";for(const o in t){const i=t[o];i===""?e+=` ${b(o)}`:e+=` ${b(o)}="${b(`${i}`)}"`}return e}function b(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}globalThis.customElements&&!globalThis.customElements.get("tiktok-video")&&globalThis.customElements.define("tiktok-video",v);var j=v,B=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),q={className:"class",htmlFor:"for"};function S(t){return t.toLowerCase()}function P(t){if(typeof t=="boolean")return t?"":void 0;if(typeof t!="function"&&!(typeof t=="object"&&t!==null))return t}function G({react:t,tagName:e,elementClass:o,events:i,displayName:a,defaultProps:m,toAttributeName:R=S,toAttributeValue:C=P}){const w=Number.parseInt(t.version)>=19,T=t.forwardRef((E,f)=>{var k,M;const l=t.useRef(null),g=t.useRef(new Map),y={},L={},u={},p={};for(const[n,s]of Object.entries(E)){if(B.has(n)){u[n]=s;continue}const r=R(q[n]??n);if(o.prototype&&n in o.prototype&&!(n in(((k=globalThis.HTMLElement)==null?void 0:k.prototype)??{}))&&!((M=o.observedAttributes)!=null&&M.some(h=>h===r))){p[n]=s;continue}if(n.startsWith("on")){y[n]=s;continue}const c=C(s);if(r&&c!=null&&(L[r]=String(c),w||(u[r]=c)),r&&w){const h=P(s);c!==h?u[r]=c:u[r]=s}}if(typeof window<"u"){for(const n in y){const s=y[n],r=n.endsWith("Capture"),c=(i?.[n]??n.slice(2).toLowerCase()).slice(0,r?-7:void 0);t.useLayoutEffect(()=>{const h=l?.current;if(!(!h||typeof s!="function"))return h.addEventListener(c,s,r),()=>{h.removeEventListener(c,s,r)}},[l?.current,s])}t.useLayoutEffect(()=>{if(l.current===null)return;const n=new Map;for(const s in p)_(l.current,s,p[s]),g.current.delete(s),n.set(s,p[s]);for(const[s,r]of g.current)_(l.current,s,void 0);g.current=n})}if(typeof window>"u"&&o?.getTemplateHTML&&o?.shadowRootOptions){const{mode:n,delegatesFocus:s}=o.shadowRootOptions,r=t.createElement("template",{shadowrootmode:n,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:o.getTemplateHTML(L,E)},key:"ce-la-react-ssr-template-shadow-root"});u.children=[r,u.children]}return t.createElement(e,{...m,...u,ref:t.useCallback(n=>{l.current=n,typeof f=="function"?f(n):f!==null&&(f.current=n)},[f])},u.children)});return T.displayName=a??o.name,T}function _(t,e,o){var i;t[e]=o,o==null&&e in(((i=globalThis.HTMLElement)==null?void 0:i.prototype)??{})&&t.removeAttribute(e)}var J=G({react:D,tagName:"tiktok-video",elementClass:j,toAttributeName(t){return t==="muted"?"":t==="defaultMuted"?"muted":S(t)}});export{J as default};
@@ -0,0 +1,21 @@
1
+ import{b as W}from"./sentry-B9T9CHF5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9f2463f5-cadb-4a0f-a184-2a72be6fe7c8",e._sentryDebugIdIdentifier="sentry-dbid-9f2463f5-cadb-4a0f-a184-2a72be6fe7c8")}catch{}})();const L="https://player.twitch.tv",x=/(?:www\.|go\.)?twitch\.tv\/(?:videos?\/|\?video=)(\d+)($|\?)/,U=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,k={IDLE:"Idle",ENDED:"Ended"},v={PAUSE:2,PLAY:3,SEEK:4,SET_MUTED:10,SET_VOLUME:11};function N(e,t={}){const i={src:C(e,t),frameborder:"0",width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; picture-in-picture;",sandbox:"allow-modals allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",scrolling:"no"};return t.config&&(i["data-config"]=JSON.stringify(t.config)),`
2
+ <style>
3
+ :host {
4
+ display: inline-block;
5
+ min-width: 300px;
6
+ min-height: 150px;
7
+ position: relative;
8
+ }
9
+ iframe {
10
+ position: absolute;
11
+ top: 0;
12
+ left: 0;
13
+ width: 100%;
14
+ height: 100%;
15
+ }
16
+ :host(:not([controls])) {
17
+ pointer-events: none;
18
+ }
19
+ </style>
20
+ <iframe${B(i)}></iframe>
21
+ `}function C(e,t){var i;if(!e.src)return;const n=e.src.match(x),l=e.src.match(U),u={parent:(i=globalThis.location)==null?void 0:i.hostname,controls:e.controls===""?null:!1,autoplay:e.autoplay===""?null:!1,muted:e.muted,preload:e.preload,...t.config};if(n){const r=n[1];return`${L}/?video=v${r}&${D(u)}`}else if(l){const r=l[1];return`${L}/?channel=${r}&${D(u)}`}return""}class O extends(globalThis.HTMLElement??class{}){static getTemplateHTML=N;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","loop","muted","playsinline","preload","src"];loadComplete=new I;#o;#r;#e;#t={};#d=0;#a=!1;#l=1;#u=!this.autoplay;#n=!1;#s=0;#c=null;constructor(){super(),this.#f("config")}get config(){return this.#c}set config(t){this.#c=t}async load(){if(this.#o)return;this.shadowRoot||this.attachShadow({mode:"open"});const t=!this.#r;if(this.#r&&(this.loadComplete=new I),this.#r=!0,await(this.#o=Promise.resolve()),this.#o=null,this.#s=0,this.dispatchEvent(new Event("emptied")),!this.src){this.shadowRoot.innerHTML="",globalThis.removeEventListener("message",this.#h);return}this.dispatchEvent(new Event("loadstart"));let i=this.shadowRoot.querySelector("iframe");const n=j(this.attributes);t&&i&&(this.#c=JSON.parse(i.getAttribute("data-config")||"{}")),(!i?.src||i.src!==C(n,this))&&(this.shadowRoot.innerHTML=N(n,this),i=this.shadowRoot.querySelector("iframe")),this.#e=i,globalThis.addEventListener("message",this.#h)}attributeChangedCallback(t,i,n){if(i!==n)switch(t){case"src":case"controls":{this.load();break}}}getVideoPlaybackQuality(){return this.#t.stats.videoStats}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",t)}get readyState(){return this.#s}get seeking(){return this.#n}get buffered(){var t,i;return F(0,((i=(t=this.#t.stats)==null?void 0:t.videoStats)==null?void 0:i.bufferSize)??0)}get paused(){return this.#t.playback?this.#t.playback===k.IDLE:this.#u}get ended(){return this.#t.playback?this.#t.playback===k.ENDED:!1}get duration(){return this.#t.duration??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(t){this.autoplay!=t&&this.toggleAttribute("autoplay",!!t)}get controls(){return this.hasAttribute("controls")}set controls(t){this.controls!=t&&this.toggleAttribute("controls",!!t)}get currentTime(){return this.#t.currentTime?this.#t.currentTime:this.#d}set currentTime(t){this.#d=t,this.loadComplete.then(()=>{this.#i(v.SEEK,t)})}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(t){this.toggleAttribute("muted",!!t)}get loop(){return this.hasAttribute("loop")}set loop(t){this.toggleAttribute("loop",!!t)}get muted(){return this.#a}set muted(t){this.#a=t,this.loadComplete.then(()=>{this.#i(v.SET_MUTED,t)})}get volume(){return this.#l}set volume(t){this.#l=t,this.loadComplete.then(()=>{this.#i(v.SET_VOLUME,t)})}get playsInline(){return this.hasAttribute("playsinline")}set playsInline(t){this.toggleAttribute("playsinline",!!t)}play(){this.#u=!1,this.#i(v.PLAY)}pause(){this.#u=!0,this.#i(v.PAUSE)}#h=async t=>{var i,n,l,u;if(!this.#e.contentWindow)return;const{data:r,source:E}=t;if(E===this.#e.contentWindow){if(r.namespace==="twitch-embed")await new Promise(p=>setTimeout(p,10)),r.eventName==="ready"?(this.dispatchEvent(new Event("loadcomplete")),this.loadComplete.resolve(),this.#s=1,this.dispatchEvent(new Event("loadedmetadata"))):r.eventName==="seek"?(this.#n=!0,this.dispatchEvent(new Event("seeking"))):r.eventName==="playing"?(this.#n&&(this.#n=!1,this.dispatchEvent(new Event("seeked"))),this.#s=3,this.dispatchEvent(new Event("playing"))):this.dispatchEvent(new Event(r.eventName));else if(r.namespace==="twitch-embed-player-proxy"&&r.eventName==="UPDATE_STATE"){const p=this.#t.duration,g=this.#t.currentTime,f=this.#t.volume,b=this.#t.muted,y=(n=(i=this.#t.stats)==null?void 0:i.videoStats)==null?void 0:n.bufferSize;this.#t={...this.#t,...r.params},p!==this.#t.duration&&this.dispatchEvent(new Event("durationchange")),g!==this.#t.currentTime&&this.dispatchEvent(new Event("timeupdate")),(f!==this.#t.volume||b!==this.#t.muted)&&(this.#t.volume!==void 0&&(this.#l=this.#t.volume),this.#t.muted!==void 0&&(this.#a=this.#t.muted),this.dispatchEvent(new Event("volumechange"))),y!==((u=(l=this.#t.stats)==null?void 0:l.videoStats)==null?void 0:u.bufferSize)&&this.dispatchEvent(new Event("progress"))}}};#i(t,i){if(!this.#e.contentWindow)return;const n={eventName:t,params:i,namespace:"twitch-embed-player-proxy"};this.#e.contentWindow.postMessage(n,L)}#f(t){if(Object.prototype.hasOwnProperty.call(this,t)){const i=this[t];delete this[t],this[t]=i}}}function j(e){let t={};for(let i of e)t[i.name]=i.value;return t}function B(e){let t="";for(const i in e){const n=e[i];n===""?t+=` ${_(i)}`:t+=` ${_(i)}="${_(`${n}`)}"`}return t}function _(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}function D(e){return String(new URLSearchParams(z(e)))}function z(e){let t={};for(let i in e){let n=e[i];n===!0||n===""?t[i]=!0:n===!1?t[i]=!1:n!=null&&(t[i]=n)}return t}class I extends Promise{constructor(t=()=>{}){let i,n;super((l,u)=>{t(l,u),i=l,n=u}),this.resolve=i,this.reject=n}}function F(e,t){return Array.isArray(e)?M(e):t==null||t===0?M([[0,0]]):M([[e,t]])}function M(e){return Object.defineProperties(e,{start:{value:t=>e[t][0]},end:{value:t=>e[t][1]}}),e}globalThis.customElements&&!globalThis.customElements.get("twitch-video")&&globalThis.customElements.define("twitch-video",O);var q=O,V=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),J={className:"class",htmlFor:"for"};function $(e){return e.toLowerCase()}function H(e){if(typeof e=="boolean")return e?"":void 0;if(typeof e!="function"&&!(typeof e=="object"&&e!==null))return e}function K({react:e,tagName:t,elementClass:i,events:n,displayName:l,defaultProps:u,toAttributeName:r=$,toAttributeValue:E=H}){const T=Number.parseInt(e.version)>=19,p=e.forwardRef((g,f)=>{var b,y;const c=e.useRef(null),A=e.useRef(new Map),S={},P={},d={},w={};for(const[s,o]of Object.entries(g)){if(V.has(s)){d[s]=o;continue}const a=r(J[s]??s);if(i.prototype&&s in i.prototype&&!(s in(((b=globalThis.HTMLElement)==null?void 0:b.prototype)??{}))&&!((y=i.observedAttributes)!=null&&y.some(m=>m===a))){w[s]=o;continue}if(s.startsWith("on")){S[s]=o;continue}const h=E(o);if(a&&h!=null&&(P[a]=String(h),T||(d[a]=h)),a&&T){const m=H(o);h!==m?d[a]=h:d[a]=o}}if(typeof window<"u"){for(const s in S){const o=S[s],a=s.endsWith("Capture"),h=(n?.[s]??s.slice(2).toLowerCase()).slice(0,a?-7:void 0);e.useLayoutEffect(()=>{const m=c?.current;if(!(!m||typeof o!="function"))return m.addEventListener(h,o,a),()=>{m.removeEventListener(h,o,a)}},[c?.current,o])}e.useLayoutEffect(()=>{if(c.current===null)return;const s=new Map;for(const o in w)R(c.current,o,w[o]),A.current.delete(o),s.set(o,w[o]);for(const[o,a]of A.current)R(c.current,o,void 0);A.current=s})}if(typeof window>"u"&&i?.getTemplateHTML&&i?.shadowRootOptions){const{mode:s,delegatesFocus:o}=i.shadowRootOptions,a=e.createElement("template",{shadowrootmode:s,shadowrootdelegatesfocus:o,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(P,g)},key:"ce-la-react-ssr-template-shadow-root"});d.children=[a,d.children]}return e.createElement(t,{...u,...d,ref:e.useCallback(s=>{c.current=s,typeof f=="function"?f(s):f!==null&&(f.current=s)},[f])},d.children)});return p.displayName=l??i.name,p}function R(e,t,i){var n;e[t]=i,i==null&&t in(((n=globalThis.HTMLElement)==null?void 0:n.prototype)??{})&&e.removeAttribute(t)}var Q=K({react:W,tagName:"twitch-video",elementClass:q,toAttributeName(e){return e==="muted"?"":e==="defaultMuted"?"muted":$(e)}});export{Q as default};
@@ -0,0 +1,17 @@
1
+ import{b as H}from"./sentry-B9T9CHF5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ce177346-ec0f-49be-9efc-945cf7b8fe8e",t._sentryDebugIdIdentifier="sentry-dbid-ce177346-ec0f-49be-9efc-945cf7b8fe8e")}catch{}})();const V="https://www.youtube.com/embed",$="https://www.youtube-nocookie.com/embed",j="https://www.youtube.com/iframe_api",Y="YT",F="onYouTubeIframeAPIReady",C=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/,G=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;function R(t,e={}){var i;const n={src:x(t,e),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return(i=e.config)!=null&&i.referrerpolicy&&(n.referrerpolicy=e.config.referrerpolicy),e.config&&(n["data-config"]=JSON.stringify(e.config)),`
2
+ <style>
3
+ :host {
4
+ display: inline-block;
5
+ line-height: 0;
6
+ position: relative;
7
+ min-width: 300px;
8
+ min-height: 150px;
9
+ }
10
+ iframe {
11
+ position: absolute;
12
+ top: 0;
13
+ left: 0;
14
+ }
15
+ </style>
16
+ <iframe${U(n)}></iframe>
17
+ `}function x(t,e){if(!t.src)return;const i=t.src.includes("-nocookie")?$:V,n={controls:t.controls===""?null:0,autoplay:t.autoplay,loop:t.loop,mute:t.muted,playsinline:t.playsinline,preload:t.preload??"metadata",enablejsapi:1,cc_load_policy:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1,...e.config};if(C.test(t.src)){const p=t.src.match(C),g=p&&p[1];return`${i}/${g}?${M(n)}`}const l=t.src.match(G),f={listType:"playlist",list:l&&l[1],...n};return`${i}?${M(f)}`}class B extends(globalThis.HTMLElement??class{}){static getTemplateHTML=R;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src"];loadComplete=new A;#o;#r;#t=0;#i=!1;#e;isLoaded=!1;#l=null;#a=null;#s=null;#n=1;constructor(){super(),this.#u("config")}get config(){return this.#a}set config(e){this.#a=e}async load(){if(this.#o)return;this.shadowRoot||this.attachShadow({mode:"open"});const e=!this.#r;this.#r&&(this.loadComplete=new A,this.isLoaded=!1),this.#r=!0,await(this.#o=Promise.resolve()),this.#o=null,this.#t=0,this.dispatchEvent(new Event("emptied"));let i=this.api;if(this.api=null,!this.src){i?.destroy();return}this.#s=document.createElement("video"),this.textTracks=this.#s.textTracks,this.textTracks.addEventListener("change",()=>{var s;const u=Array.from(this.textTracks).find(d=>d.mode==="showing");(s=this.api)==null||s.setOption("captions","track",u?{languageCode:u.language}:{})}),this.dispatchEvent(new Event("loadstart"));let n=this.shadowRoot.querySelector("iframe"),l=q(this.attributes);e&&n&&(this.#a=JSON.parse(n.getAttribute("data-config")||"{}")),(!n?.src||n.src!==x(l,this))&&(this.shadowRoot.innerHTML=R(l,this),n=this.shadowRoot.querySelector("iframe"));const a=await z(j,Y,F);this.api=new a.Player(n,{events:{onReady:()=>{var s;this.#t=1,this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.#n!==1&&((s=this.api)==null||s.setVolume(this.#n*100)),this.dispatchEvent(new Event("volumechange")),this.dispatchEvent(new Event("loadcomplete")),this.isLoaded=!0,this.loadComplete.resolve()},onError:s=>{console.error(s),this.#l={code:s.data,message:`YouTube iframe player error #${s.data}; visit https://developers.google.com/youtube/iframe_api_reference#onError for the full error message.`},this.dispatchEvent(new Event("error"))}}});let f=!1;this.api.addEventListener("onStateChange",s=>{var u;const d=s.data;if((d===a.PlayerState.PLAYING||d===a.PlayerState.BUFFERING)&&(f||(f=!0,this.dispatchEvent(new Event("play"))),(this.api.getOption("captions","tracklist")||[]).forEach(h=>{[...this.textTracks].some(E=>E.language===h.languageCode)||this.#s.addTextTrack("subtitles",h.displayName,h.languageCode),this.textTracks=this.#s.textTracks}),this.dispatchEvent(new Event("loadstart"))),d===a.PlayerState.PLAYING)this.seeking&&(this.#i=!1,(u=this.#e)==null||u.resolve(),this.dispatchEvent(new Event("seeked"))),this.#t=3,this.dispatchEvent(new Event("playing"));else if(d===a.PlayerState.PAUSED){const b=Math.abs(this.currentTime-p);!this.seeking&&b>.1&&(this.#i=!0,this.dispatchEvent(new Event("seeking"))),f=!1,this.dispatchEvent(new Event("pause"))}d===a.PlayerState.ENDED&&(f=!1,this.dispatchEvent(new Event("pause")),this.dispatchEvent(new Event("ended")),this.loop&&this.play())}),this.api.addEventListener("onPlaybackRateChange",()=>{this.dispatchEvent(new Event("ratechange"))}),this.api.addEventListener("onVolumeChange",()=>{var s;const u=((s=this.api)==null?void 0:s.getVolume())/100;this.#n=u,this.dispatchEvent(new Event("volumechange"))}),this.api.addEventListener("onVideoProgress",()=>{this.dispatchEvent(new Event("timeupdate"))}),await this.loadComplete;let p=0;setInterval(()=>{var s;const u=Math.abs(this.currentTime-p),d=this.buffered.end(this.buffered.length-1);this.seeking&&d>.1?(this.#i=!1,(s=this.#e)==null||s.resolve(),this.dispatchEvent(new Event("seeked"))):!this.seeking&&u>.1&&(this.#i=!0,this.dispatchEvent(new Event("seeking"))),p=this.currentTime},50);let g;const w=setInterval(()=>{const s=this.buffered.end(this.buffered.length-1);s>=this.duration&&(clearInterval(w),this.#t=4),g!=s&&(g=s,this.dispatchEvent(new Event("progress")))},100)}async attributeChangedCallback(e,i,n){if(i!==n)switch(e){case"src":case"autoplay":case"controls":case"loop":case"playsinline":this.load()}}async play(){var e;return this.#e=null,await this.loadComplete,(e=this.api)==null||e.playVideo(),Q(this)}async pause(){var e;return await this.loadComplete,(e=this.api)==null?void 0:e.pauseVideo()}get seeking(){return this.#i}get readyState(){return this.#t}get src(){return this.getAttribute("src")}set src(e){this.src!=e&&this.setAttribute("src",e)}get error(){return this.#l}get paused(){var e,i;return this.isLoaded?[-1,0,2,5].includes((i=(e=this.api)==null?void 0:e.getPlayerState)==null?void 0:i.call(e)):!this.autoplay}get duration(){var e,i;return((i=(e=this.api)==null?void 0:e.getDuration)==null?void 0:i.call(e))??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(e){this.autoplay!=e&&this.toggleAttribute("autoplay",!!e)}get buffered(){var e,i;if(!this.isLoaded)return P();const n=((e=this.api)==null?void 0:e.getVideoLoadedFraction())*((i=this.api)==null?void 0:i.getDuration());return n>0?P(0,n):P()}get controls(){return this.hasAttribute("controls")}set controls(e){this.controls!=e&&this.toggleAttribute("controls",!!e)}get currentTime(){var e,i;return((i=(e=this.api)==null?void 0:e.getCurrentTime)==null?void 0:i.call(e))??0}set currentTime(e){this.currentTime!=e&&(this.#e=new A,this.loadComplete.then(()=>{var i,n;(i=this.api)==null||i.seekTo(e,!0),this.paused&&((n=this.#e)==null||n.then(()=>{var l;this.#e&&((l=this.api)==null||l.pauseVideo())}))}))}set defaultMuted(e){this.defaultMuted!=e&&this.toggleAttribute("muted",!!e)}get defaultMuted(){return this.hasAttribute("muted")}get loop(){return this.hasAttribute("loop")}set loop(e){this.loop!=e&&this.toggleAttribute("loop",!!e)}set muted(e){this.muted!=e&&this.loadComplete.then(()=>{var i,n;e?(i=this.api)==null||i.mute():(n=this.api)==null||n.unMute()})}get muted(){var e,i;return this.isLoaded?(i=(e=this.api)==null?void 0:e.isMuted)==null?void 0:i.call(e):this.defaultMuted}get playbackRate(){var e,i;return((i=(e=this.api)==null?void 0:e.getPlaybackRate)==null?void 0:i.call(e))??1}set playbackRate(e){this.playbackRate!=e&&this.loadComplete.then(()=>{var i;(i=this.api)==null||i.setPlaybackRate(e)})}get playsInline(){return this.hasAttribute("playsinline")}set playsInline(e){this.playsInline!=e&&this.toggleAttribute("playsinline",!!e)}get poster(){return this.getAttribute("poster")}set poster(e){this.poster!=e&&this.setAttribute("poster",`${e}`)}set volume(e){this.volume!=e&&(this.#n=e,this.loadComplete.then(()=>{var i;(i=this.api)==null||i.setVolume(e*100)}))}get volume(){var e;return this.isLoaded?((e=this.api)==null?void 0:e.getVolume())/100:this.#n}#u(e){if(Object.prototype.hasOwnProperty.call(this,e)){const i=this[e];delete this[e],this[e]=i}}}function U(t){let e="";for(const i in t){const n=t[i];n===""?e+=` ${k(i)}`:e+=` ${k(i)}="${k(`${n}`)}"`}return e}function k(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}function M(t){return String(new URLSearchParams(W(t)))}function W(t){let e={};for(let i in t){let n=t[i];n===!0||n===""?e[i]=1:n===!1?e[i]=0:n!=null&&(e[i]=n)}return e}function q(t){let e={};for(let i of t)e[i.name]=i.value;return e}const L={};async function z(t,e,i){return L[t]?L[t]:self[e]?(await J(0),self[e]):L[t]=new Promise(function(n,l){const a=document.createElement("script");a.src=t;const f=()=>n(self[e]);self[i]=f,a.onload=()=>!i,a.onerror=l,document.head.append(a)})}const J=t=>new Promise(e=>setTimeout(e,t));function K(t){return(...e)=>new Promise(i=>{t(...e,(...n)=>{n.length>1?i(n):i(n[0])})})}function Q(t){return K((e,i)=>{let n;t.addEventListener(e,n=()=>{t.removeEventListener(e,n),i()})})("playing")}class A extends Promise{constructor(e=()=>{}){let i,n;super((l,a)=>{e(l,a),i=l,n=a}),this.resolve=i,this.reject=n}}function P(t,e){return Array.isArray(t)?I(t):t==null||e==null||t===0&&e===0?I([[0,0]]):I([[t,e]])}function I(t){return Object.defineProperties(t,{start:{value:e=>t[e][0]},end:{value:e=>t[e][1]}}),t}globalThis.customElements&&!globalThis.customElements.get("youtube-video")&&globalThis.customElements.define("youtube-video",B);var X=B,Z=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),ee={className:"class",htmlFor:"for"};function D(t){return t.toLowerCase()}function O(t){if(typeof t=="boolean")return t?"":void 0;if(typeof t!="function"&&!(typeof t=="object"&&t!==null))return t}function te({react:t,tagName:e,elementClass:i,events:n,displayName:l,defaultProps:a,toAttributeName:f=D,toAttributeValue:p=O}){const g=Number.parseInt(t.version)>=19,w=t.forwardRef((s,u)=>{var d,b;const h=t.useRef(null),E=t.useRef(new Map),T={},S={},v={},_={};for(const[o,r]of Object.entries(s)){if(Z.has(o)){v[o]=r;continue}const c=f(ee[o]??o);if(i.prototype&&o in i.prototype&&!(o in(((d=globalThis.HTMLElement)==null?void 0:d.prototype)??{}))&&!((b=i.observedAttributes)!=null&&b.some(y=>y===c))){_[o]=r;continue}if(o.startsWith("on")){T[o]=r;continue}const m=p(r);if(c&&m!=null&&(S[c]=String(m),g||(v[c]=m)),c&&g){const y=O(r);m!==y?v[c]=m:v[c]=r}}if(typeof window<"u"){for(const o in T){const r=T[o],c=o.endsWith("Capture"),m=(n?.[o]??o.slice(2).toLowerCase()).slice(0,c?-7:void 0);t.useLayoutEffect(()=>{const y=h?.current;if(!(!y||typeof r!="function"))return y.addEventListener(m,r,c),()=>{y.removeEventListener(m,r,c)}},[h?.current,r])}t.useLayoutEffect(()=>{if(h.current===null)return;const o=new Map;for(const r in _)N(h.current,r,_[r]),E.current.delete(r),o.set(r,_[r]);for(const[r,c]of E.current)N(h.current,r,void 0);E.current=o})}if(typeof window>"u"&&i?.getTemplateHTML&&i?.shadowRootOptions){const{mode:o,delegatesFocus:r}=i.shadowRootOptions,c=t.createElement("template",{shadowrootmode:o,shadowrootdelegatesfocus:r,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(S,s)},key:"ce-la-react-ssr-template-shadow-root"});v.children=[c,v.children]}return t.createElement(e,{...a,...v,ref:t.useCallback(o=>{h.current=o,typeof u=="function"?u(o):u!==null&&(u.current=o)},[u])},v.children)});return w.displayName=l??i.name,w}function N(t,e,i){var n;t[e]=i,i==null&&e in(((n=globalThis.HTMLElement)==null?void 0:n.prototype)??{})&&t.removeAttribute(e)}var ne=te({react:H,tagName:"youtube-video",elementClass:X,toAttributeName(t){return t==="muted"?"":t==="defaultMuted"?"muted":D(t)}});export{ne as default};