@banou/ftube 0.0.0-stage → 0.0.0
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.
- package/LICENSE +21 -0
- package/README.md +44 -2
- package/__yt_engine__/engine.html +9 -0
- package/app.webmanifest +31 -0
- package/assets/account-BL8Hv7lS.js +157 -0
- package/assets/account-By94iboj.js +1 -0
- package/assets/account-DfiXzypA-YE6OyKjK.js +1 -0
- package/assets/account-generation-BP_-Qyck-BOth6YQ_.js +1 -0
- package/assets/agent-source-E4g0cDzU.js +1 -0
- package/assets/api-1NDCtwel-CAaxX8P1.js +3 -0
- package/assets/binary-encoding-By5K7InN.js +1 -0
- package/assets/build-CNn3bm6X.js +1 -0
- package/assets/busy-C1JPjoZ_-CJ0641jK.js +1 -0
- package/assets/cards-Csel8naI.js +2334 -0
- package/assets/channel-B5f9YTIf.js +1160 -0
- package/assets/client-version-D9kIz6Gz.js +1 -0
- package/assets/comments-CJp9O808.js +612 -0
- package/assets/dislikes-DH5jCVEY.js +1 -0
- package/assets/dist-7VpLCl1k.js +1 -0
- package/assets/dist-BOrL1gYg.js +2 -0
- package/assets/downloads-CMXDjA_E.js +191 -0
- package/assets/egress.worker-DopXr5uP.js +104 -0
- package/assets/engine-B_kFyW7L.js +2 -0
- package/assets/feed-channels-Dg2mvF5x.js +251 -0
- package/assets/feed-groups-CnyR4sOO.js +160 -0
- package/assets/feed-history-BDAGG9N5.js +368 -0
- package/assets/feed-playlists-DcGR2AL6.js +167 -0
- package/assets/feed-subscriptions-Sm3tKz4P.js +165 -0
- package/assets/feed-you-lxbqknXX.js +110 -0
- package/assets/formats-CDwXfKnr.js +1 -0
- package/assets/frame-BrGNSf3s.js +2 -0
- package/assets/fs-CjRTQ7Nu.js +1 -0
- package/assets/fs-CwRtKje1-CBsYhX2-.js +1 -0
- package/assets/fullscreen-view-BLgosU84.js +269 -0
- package/assets/group-C00s0aT7.js +183 -0
- package/assets/groups-button-CvVnqwlu.js +25 -0
- package/assets/hashtag-CCIhITaL.js +115 -0
- package/assets/icons-DKsqNLSs.js +1 -0
- package/assets/index-A5dHbptn.css +1 -0
- package/assets/index-DwsYJ-bu.js +1328 -0
- package/assets/lib-h0P14ZFl.js +70 -0
- package/assets/linkify-B6hdFhsL.js +1 -0
- package/assets/packages-C3w3tSjj-BCtDk0vj.js +1 -0
- package/assets/party-CUcxsJDF.js +180 -0
- package/assets/playlist-DF7wsidw.js +521 -0
- package/assets/playlist-card-Btoc7D8f.js +91 -0
- package/assets/playlist-panel-D97BwT1f.js +199 -0
- package/assets/post-CQ9mfVos.js +39 -0
- package/assets/post-card-ZUQixO1G.js +76 -0
- package/assets/privacy-hkbqXFeB.js +46 -0
- package/assets/protobuf-BXZ2dCCc.js +1 -0
- package/assets/read-more-BhddUSlS.js +20 -0
- package/assets/rich-text-07paR5O3.js +25 -0
- package/assets/roboto-cyrillic-ext-BCp_3N7R.woff2 +0 -0
- package/assets/roboto-cyrillic-fOt7epNf.woff2 +0 -0
- package/assets/roboto-greek-DlT9XTxE.woff2 +0 -0
- package/assets/roboto-greek-ext-Bgw4czJT.woff2 +0 -0
- package/assets/roboto-latin-ccAYIvAh.woff2 +0 -0
- package/assets/roboto-latin-ext-DYIxWhlt.woff2 +0 -0
- package/assets/roboto-math-4a3xuzGk.woff2 +0 -0
- package/assets/roboto-symbols-B7iHSfaG.woff2 +0 -0
- package/assets/roboto-vietnamese-_f1XEJpo.woff2 +0 -0
- package/assets/rooms-B-AvBY-c-FNDqRDHE.js +1 -0
- package/assets/rooms-B91zuirR.js +1 -0
- package/assets/save-menu-DF1WKqSE.js +462 -0
- package/assets/search-Cx5IpDtZ.js +1026 -0
- package/assets/settings-kESE_uBm.js +99 -0
- package/assets/shaka-BwT9pJcV.js +36 -0
- package/assets/share-dialog-Cp0BJ6bg.js +156 -0
- package/assets/shorts-BxDB7m0c.js +686 -0
- package/assets/shorts-grid-Bgbkl5dP.js +11 -0
- package/assets/sign-in-Bx3zmj-m.js +97 -0
- package/assets/signed-out-prompt-CEAx65kq.js +79 -0
- package/assets/signin-DkI8Ogzz.js +18 -0
- package/assets/social-bXt3vmd4.js +1 -0
- package/assets/video-card-compact-r-K4XyDb.js +190 -0
- package/assets/watch-CkxSP1IA.js +1802 -0
- package/assets/web-BNanCsH5.js +43 -0
- package/favicon.ico +0 -0
- package/favicon.svg +5 -0
- package/icons/icon-192.png +0 -0
- package/icons/icon-512.png +0 -0
- package/index-Bj-Q3X8Q.js +4120 -0
- package/index.html +32 -0
- package/package.json +45 -4
- package/store/background.webp +0 -0
- package/store/channel.webp +0 -0
- package/store/cover.webp +0 -0
- package/store/phone.webp +0 -0
- package/store/search.webp +0 -0
- package/store/watch.webp +0 -0
|
@@ -0,0 +1,4120 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/account-By94iboj.js","assets/account-DfiXzypA-YE6OyKjK.js","assets/api-1NDCtwel-CAaxX8P1.js","assets/build-CNn3bm6X.js","assets/account-generation-BP_-Qyck-BOth6YQ_.js","assets/fs-CjRTQ7Nu.js","assets/fs-CwRtKje1-CBsYhX2-.js","assets/busy-C1JPjoZ_-CJ0641jK.js","assets/rooms-B91zuirR.js","assets/rooms-B-AvBY-c-FNDqRDHE.js","assets/social-bXt3vmd4.js","assets/packages-C3w3tSjj-BCtDk0vj.js","assets/channel-B5f9YTIf.js","assets/dist-BOrL1gYg.js","assets/icons-DKsqNLSs.js","assets/sign-in-Bx3zmj-m.js","assets/cards-Csel8naI.js","assets/rich-text-07paR5O3.js","assets/groups-button-CvVnqwlu.js","assets/playlist-card-Btoc7D8f.js","assets/post-card-ZUQixO1G.js","assets/read-more-BhddUSlS.js","assets/video-card-compact-r-K4XyDb.js","assets/shorts-grid-Bgbkl5dP.js","assets/linkify-B6hdFhsL.js","assets/downloads-CMXDjA_E.js","assets/feed-channels-Dg2mvF5x.js","assets/feed-groups-CnyR4sOO.js","assets/feed-history-BDAGG9N5.js","assets/client-version-D9kIz6Gz.js","assets/signed-out-prompt-CEAx65kq.js","assets/feed-playlists-DcGR2AL6.js","assets/feed-subscriptions-Sm3tKz4P.js","assets/feed-you-lxbqknXX.js","assets/group-C00s0aT7.js","assets/hashtag-CCIhITaL.js","assets/party-CUcxsJDF.js","assets/playlist-DF7wsidw.js","assets/playlist-panel-D97BwT1f.js","assets/post-CQ9mfVos.js","assets/comments-CJp9O808.js","assets/privacy-hkbqXFeB.js","assets/search-Cx5IpDtZ.js","assets/protobuf-BXZ2dCCc.js","assets/binary-encoding-By5K7InN.js","assets/settings-kESE_uBm.js","assets/account-BL8Hv7lS.js","assets/shorts-BxDB7m0c.js","assets/share-dialog-Cp0BJ6bg.js","assets/dislikes-DH5jCVEY.js","assets/signin-DkI8Ogzz.js","assets/watch-CkxSP1IA.js","assets/save-menu-DF1WKqSE.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
(()=>{for(const h of ["/assets/index-A5dHbptn.css"]){if(!document.querySelector('link[rel="stylesheet"][href="'+h+'"]')){const l=document.createElement('link');l.rel='stylesheet';l.href=h;document.head.appendChild(l)}}})();
|
|
3
|
+
import{A as e,D as t,E as n,T as r,p as i,s as a,x as o}from"./assets/dist-BOrL1gYg.js";import{D as s,a as c}from"./assets/build-CNn3bm6X.js";import{$ as l,A as u,At as d,B as f,Ct as p,Dt as m,E as h,Et as g,Jt as _,K as v,Kt as y,L as b,Lt as x,M as S,Mt as C,Nt as w,O as T,P as E,Q as D,R as O,St as k,T as A,Tt as j,Wt as ee,X as te,Y as ne,Zt as M,_t as re,a as ie,an as N,at as ae,bt as oe,ct as se,en as ce,f as le,ft as ue,i as de,in as P,it as fe,j as pe,jt as me,k as he,l as ge,ln as _e,mn as ve,n as ye,nt as be,on as F,ot as xe,pt as Se,q as Ce,rn as we,s as Te,sn as I,st as Ee,t as De,tn as L,u as Oe,un as ke,vt as Ae,w as je,wt as Me,yt as Ne,z as Pe}from"./assets/icons-DKsqNLSs.js";import{$ as Fe,A as Ie,B as Le,C as Re,E as ze,F as Be,G as Ve,H as He,I as Ue,J as We,K as Ge,L as Ke,M as qe,N as Je,O as Ye,P as Xe,Q as Ze,R,S as Qe,T as $e,U as et,V as tt,W as nt,X as rt,Y as it,Z as at,a as ot,at as st,b as ct,c as z,d as lt,et as ut,f as dt,g as ft,h as pt,i as mt,it as ht,j as gt,k as _t,l as vt,m as yt,n as bt,nt as xt,o as B,ot as V,p as St,q as Ct,r as wt,rt as H,s as U,t as W,tt as Tt,u as Et,x as G,y as K,z as Dt}from"./assets/sign-in-Bx3zmj-m.js";import{$ as Ot,A as kt,At,B as jt,Bt as Mt,C as Nt,Cn as Pt,Ct as Ft,D as It,E as Lt,En as Rt,Et as zt,Ft as Bt,G as Vt,Gt as Ht,Ht as Ut,I as Wt,It as Gt,J as Kt,Lt as qt,Mt as Jt,Ot as Yt,Pt as Xt,Q as Zt,Rt as Qt,S as $t,T as en,Tt as tn,Ut as nn,V as rn,Vt as an,Wt as on,X as sn,Xt as q,Y as cn,Yt as ln,Z as un,_ as dn,an as fn,at as pn,b as mn,bt as hn,c as gn,cn as J,ct as _n,dn as vn,dt as yn,en as bn,et as Y,f as xn,fn as Sn,ft as Cn,g as wn,gn as Tn,gt as En,h as Dn,hn as On,ht as kn,i as An,in as jn,it as X,j as Mn,jt as Nn,k as Pn,l as Fn,ln as In,lt as Ln,m as Rn,mn as zn,mt as Bn,n as Vn,nt as Hn,on as Z,ot as Un,pn as Wn,pt as Gn,r as Kn,rn as qn,rt as Jn,sn as Yn,tn as Xn,un as Zn,ut as Qn,v as $n,wt as er,x as tr,xn as nr,y as rr,yt as ir,zt as ar}from"./assets/cards-Csel8naI.js";import{i as or}from"./assets/formats-CDwXfKnr.js";ve(),I(),M();var sr=e=>{if(`definitions`in e){for(var t=[],n=0,r=e.definitions.length;n<r;n++){var i=sr(e.definitions[n]);t.push(i)}return{...e,definitions:t}}if(`directives`in e&&e.directives&&e.directives.length){for(var a=[],o={},s=0,c=e.directives.length;s<c;s++){var l=e.directives[s],u=l.name.value;u[0]===`_`?u=u.slice(1):a.push(l),o[u]=l}e={...e,directives:a,_directives:o}}if(`selectionSet`in e){var d=[],f=e.kind===H.OPERATION_DEFINITION;if(e.selectionSet){for(var p=0,m=e.selectionSet.selections.length;p<m;p++){var h=e.selectionSet.selections[p];f||=h.kind===H.FIELD&&h.name.value===`__typename`&&!h.alias;var g=sr(h);d.push(g)}return f||d.push({kind:H.FIELD,name:{kind:H.NAME,value:`__typename`},_generated:!0}),{...e,selectionSet:{...e.selectionSet,selections:d}}}}return e},cr=new Map,lr=e=>{var t=gt(e),n=cr.get(t.__key);return n||(cr.set(t.__key,n=sr(t)),Object.defineProperty(n,"__key",{value:t.__key,enumerable:!1})),n};function ur(e){var t=t=>e(t);return t.toPromise=()=>xt(Fe(1)(R((e=>!e.stale&&!e.hasNext))(t))),t.then=(e,n)=>t.toPromise().then(e,n),t.subscribe=e=>at(e)(t),t}function dr(e,t,n){return{...t,kind:e,context:t.context?{...t.context,...n}:n||t.context}}var fr=()=>{},pr=({forward:e,dispatchDebug:t})=>t=>{var n=nt((e=>{var n=qe(e),r=Be(e,n),i=Je(e,n);return ut(R((t=>t.kind===`teardown`&&t.key===e.key))(t))(Xe(e,r,i))}))(R((e=>e.kind!==`teardown`&&(e.kind!==`subscription`||!!e.context.fetchSubscriptions)))(t)),r=e(R((e=>e.kind===`teardown`||e.kind===`subscription`&&!e.context.fetchSubscriptions))(t));return et([n,r])},mr=e=>({client:t,forward:n,dispatchDebug:r})=>e.reduceRight(((e,n)=>n({client:t,forward(t){return rt(e(rt(t)))},dispatchDebug(e){}})),n),hr=({dispatchDebug:e})=>e=>R((e=>!1))(e),gr=function e(t){var n=0,r=new Map,i=new Map,a=new Set,o=[],s={url:t.url,fetchSubscriptions:t.fetchSubscriptions,fetchOptions:t.fetchOptions,fetch:t.fetch,preferGetMethod:t.preferGetMethod==null?`within-url-limit`:t.preferGetMethod,requestPolicy:t.requestPolicy||`cache-first`},c=tt();function l(e){(e.kind===`mutation`||e.kind===`teardown`||!a.has(e.key))&&(e.kind===`teardown`?a.delete(e.key):e.kind!==`mutation`&&a.add(e.key),c.next(e))}var u=!1;function d(e){if(e&&l(e),!u){for(u=!0;u&&(e=o.shift());)l(e);u=!1}}var f=e=>{var t=ut(R((t=>t.kind===`teardown`&&t.key===e.key))(c.source))(R((t=>t.operation.kind===e.kind&&t.operation.key===e.key&&(!t.operation.context._instance||t.operation.context._instance===e.context._instance)))(_));return t=e.kind===`query`?Ze((t=>{var n=Dt(t);return t.stale||t.hasNext?n:et([n,He((()=>(t.stale=!0,t)))(Fe(1)(R((t=>t.key===e.key))(c.source)))])}))(t):Tt((e=>!!e.hasNext),!0)(t),t=e.kind===`mutation`?Ct((()=>{l(e)}))(t):Ve((()=>{a.delete(e.key),r.delete(e.key),i.delete(e.key),u=!1;for(var t=o.length-1;t>=0;t--)o[t].key===e.key&&o.splice(t,1);l(dr(`teardown`,e,e.context))}))(Ge((t=>{if(t.stale){if(!t.hasNext)a.delete(e.key);else for(var n=0;n<o.length;n++){var i=o[n];if(i.key===t.operation.key){a.delete(i.key);break}}}else t.hasNext||a.delete(e.key);r.set(e.key,t)}))(t)),rt(t)},p=this instanceof e?this:Object.create(e.prototype),m=Object.assign(p,{suspense:!!t.suspense,operations$:c.source,reexecuteOperation(e){if(e.kind===`teardown`)d(e);else if(e.kind===`mutation`)o.push(e),Promise.resolve().then(d);else if(i.has(e.key)){for(var t=!1,n=0;n<o.length;n++)o[n].key===e.key&&(o[n]=e,t=!0);t||a.has(e.key)&&e.context.requestPolicy!==`network-only`?(a.delete(e.key),Promise.resolve().then(d)):(o.push(e),Promise.resolve().then(d))}},createRequestOperation(e,t,r){return r||={},dr(e,t,{_instance:e===`mutation`?n=n+1|0:void 0,...s,...r,requestPolicy:r.requestPolicy||s.requestPolicy,suspense:r.suspense||!1!==r.suspense&&m.suspense})},executeRequestOperation(e){return e.kind===`mutation`?ur(f(e)):ur(Le((()=>{var t=i.get(e.key);t||i.set(e.key,t=f(e)),t=Ct((()=>{d(e)}))(t);var n=r.get(e.key);return e.kind===`query`&&n&&(n.stale||n.hasNext)?Ze(Dt)(et([t,R((t=>t===r.get(e.key)))(Dt(n))])):t})))},executeQuery(e,t){var n=m.createRequestOperation(`query`,e,t);return m.executeRequestOperation(n)},executeSubscription(e,t){var n=m.createRequestOperation(`subscription`,e,t);return m.executeRequestOperation(n)},executeMutation(e,t){var n=m.createRequestOperation(`mutation`,e,t);return m.executeRequestOperation(n)},readQuery(e,t,n){var r=null;return at((e=>{r=e}))(m.query(e,t,n)).unsubscribe(),r},query:(e,t,n)=>m.executeQuery(Ie(e,t),n),subscription:(e,t,n)=>m.executeSubscription(Ie(e,t),n),mutation:(e,t,n)=>m.executeMutation(Ie(e,t),n)}),h=fr,g=mr(t.exchanges),_=rt(g({client:m,dispatchDebug:h,forward:hr({dispatchDebug:h})})(c.source));return We(_),m},_r=!1;addEventListener(`popstate`,()=>{_r=!0}),addEventListener(`pushState`,()=>{_r=!1}),addEventListener(`replaceState`,()=>{_r=!1});var vr=()=>_r,yr=`yt-client:groups`,br=`yt-client:groups-sync`,xr=e=>`/feed/groups/${encodeURIComponent(e)}`,Sr=`📁`,Cr=(e,t)=>typeof e==`string`&&e.trim().length>0?e.trim().slice(0,t):void 0,wr=t=>{if(!t||typeof t!=`object`)return;let{id:n,name:r,avatar:i}=t,a=Cr(r,100);if(typeof n==`string`&&e(n)&&a)return typeof i==`string`&&/^(https:)?\/\//.test(i)?{id:n,name:a,avatar:i}:{id:n,name:a}},Tr=e=>{let t=new Map;for(let n of e)n&&!t.has(n.id)&&t.set(n.id,n);return[...t.values()]},Er=e=>{if(!e||typeof e!=`object`)return;let{id:t,name:n,emoji:r,channels:i,updatedAt:a,parentId:o}=e,s=Cr(t,64),c=Cr(n,100);if(!s||!c)return;let l=Cr(o,64);return{id:s,name:c,emoji:Cr(r,16)??`📁`,channels:Array.isArray(i)?Tr(i.map(wr)):[],updatedAt:typeof a==`number`&&Number.isFinite(a)?a:0,...l&&l!==s?{parentId:l}:{}}},Dr=(e,t)=>{if(!e.parentId||e.parentId===e.id||!t.has(e.parentId))return;let n=new Set([e.id]),r=e.parentId;for(;r;){if(n.has(r))return;n.add(r),r=t.get(r)?.parentId}return e.parentId},Or=(e,t,n)=>{if(t===n)return!0;let r=new Map(e.map(e=>[e.id,e])),i=new Set,a=r.get(t)?.parentId;for(;a&&!i.has(a);){if(a===n)return!0;i.add(a),a=r.get(a)?.parentId}return!1},kr=e=>{let t=new Map(e.map(e=>[e.id,e])),n=new Map;for(let r of e){let e=Dr(r,t),i=n.get(e);i?i.push(r):n.set(e,[r])}let r=[],i=(e,t)=>{for(let a of n.get(e)??[]){let o=n.get(a.id)??[];r.push({group:a,depth:t,parentId:e,hasChildren:o.length>0}),i(a.id,t+1)}};return i(void 0,0),r},Ar=(e,t)=>{let n=new Map(e.map(e=>[e.id,e])),r=[],i=new Set([t]),a=n.get(t)?.parentId;for(;a&&!i.has(a);){let e=n.get(a);if(!e)break;i.add(a),r.unshift(e),a=e.parentId}return r},jr=(e,t)=>{let n=new Map(e.map(e=>[e.id,e]));return e.filter(e=>Dr(e,n)===t)},Mr=(e,t)=>{let n=new Map(e.map(e=>[e.id,e])),r=n.get(t);if(!r)return[];let i=new Map;for(let t of e){let e=Dr(t,n);if(!e)continue;let r=i.get(e);r?r.push(t):i.set(e,[t])}let a=[],o=new Set,s=e=>{if(!o.has(e.id)){o.add(e.id),a.push(...e.channels);for(let t of i.get(e.id)??[])s(t)}};return s(r),Tr(a)},Nr=e=>Array.isArray(e)?Tr(e.map(Er)):[],Pr=e=>{let{file:t,deleted:n}=e&&typeof e==`object`?e:{},r={};if(n&&typeof n==`object`)for(let[e,t]of Object.entries(n))typeof t==`number`&&Number.isFinite(t)&&(r[e]=t);return typeof t==`string`&&t?{file:t,deleted:r}:{deleted:r}},Fr=(e=0)=>Math.max(Date.now(),e+1),Ir=(e,t)=>{let n=(t,n)=>{try{return JSON.parse(e?.getItem(t)??n)}catch{return}},r=()=>Nr(n(yr,`[]`)),i=()=>Pr(n(br,`{}`)),a=r(),o=i(),s=e!==void 0,c=new Set,l=new Set,u=()=>{for(let e of c)e(a)},d=(t,n)=>{a=t,o=n;try{e?.setItem(yr,JSON.stringify(t)),e?.setItem(br,JSON.stringify(n))}catch{s=!1}u()},f=(e,t=o)=>{d(e,t);for(let e of l)e()};t?.addEventListener(`storage`,e=>{let t=e.key;(t===null||t===`yt-client:groups`||t===`yt-client:groups-sync`)&&(a=r(),o=i(),u())});let p=(e,t)=>f(a.map(n=>n.id===e?Er({...t(n),updatedAt:Fr(n.updatedAt)})??n:n));return{getGroups:()=>a,subscribe:e=>(c.add(e),()=>{c.delete(e)}),createGroup:e=>{let t=e.parentId&&a.some(t=>t.id===e.parentId)?e.parentId:void 0,n=Er({id:crypto.randomUUID(),...e,parentId:t,updatedAt:Fr()});if(!n)throw Error(`A group needs a name`);return f([...a,n]),n},updateGroup:(e,t)=>p(e,n=>{if(!(`parentId`in t))return{...n,...t};let r=t.parentId&&a.some(e=>e.id===t.parentId)&&!Or(a,t.parentId,e)?t.parentId:void 0;return{...n,...t,parentId:r}}),deleteGroup:e=>{let t=a.find(t=>t.id===e);if(!t)return;let n=a.filter(t=>t.id!==e).map(n=>n.parentId===e?Er({...n,parentId:t.parentId,updatedAt:Fr(n.updatedAt)})??n:n);f(n,{...o,deleted:{...o.deleted,[e]:Fr(t.updatedAt)}})},setChannel:(e,t,n)=>p(e,e=>({...e,channels:n?[...e.channels.filter(e=>e.id!==t.id),t]:e.channels.filter(e=>e.id!==t.id)})),persists:()=>s,snapshot:()=>({groups:r(),...i()}),settle:(e,t)=>d(e,t),onEdit:e=>(l.add(e),()=>{l.delete(e)})}},Lr=typeof window>`u`?Ir():Ir((()=>{try{return window.localStorage}catch{return}})(),window),Rr=()=>{let[e,t]=F(Lr.getGroups);return P(()=>(t(Lr.getGroups()),Lr.subscribe(t)),[]),e};I();var zr=ft(`
|
|
4
|
+
query ChannelPreview($id: ID!) {
|
|
5
|
+
channel(id: $id, tab: VIDEOS) {
|
|
6
|
+
channel {
|
|
7
|
+
id
|
|
8
|
+
name
|
|
9
|
+
avatar
|
|
10
|
+
handle
|
|
11
|
+
subscriberCountText
|
|
12
|
+
videoCountText
|
|
13
|
+
banner
|
|
14
|
+
description
|
|
15
|
+
isVerified
|
|
16
|
+
isVerifiedArtist
|
|
17
|
+
}
|
|
18
|
+
videos {
|
|
19
|
+
items {
|
|
20
|
+
id
|
|
21
|
+
title
|
|
22
|
+
thumbnail
|
|
23
|
+
durationSeconds
|
|
24
|
+
viewCount
|
|
25
|
+
publishedText
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`),Br=12,Vr=8,Hr=3,Ur=V`
|
|
31
|
+
position: fixed;
|
|
32
|
+
z-index: calc(var(--z-dialog) + 1);
|
|
33
|
+
width: 36rem;
|
|
34
|
+
max-width: calc(100vw - 1.6rem);
|
|
35
|
+
border: 1px solid var(--border-subtle);
|
|
36
|
+
border-radius: 1.2rem;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
background: var(--bg-menu);
|
|
39
|
+
box-shadow: var(--shadow-menu);
|
|
40
|
+
color: var(--text-primary);
|
|
41
|
+
|
|
42
|
+
.banner {
|
|
43
|
+
display: block;
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 6.4rem;
|
|
46
|
+
object-fit: cover;
|
|
47
|
+
background: var(--bg-elevated);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.head {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: 1.2rem;
|
|
54
|
+
padding: 1.2rem 1.4rem 0.8rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.avatar {
|
|
58
|
+
flex: none;
|
|
59
|
+
width: 4.4rem;
|
|
60
|
+
height: 4.4rem;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
object-fit: cover;
|
|
63
|
+
background: var(--bg-chip);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.avatar.fallback {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
font-size: 1.8rem;
|
|
71
|
+
font-weight: 500;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.identity {
|
|
75
|
+
flex: 1;
|
|
76
|
+
min-width: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.name {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
font-size: 1.5rem;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
line-height: 2rem;
|
|
85
|
+
color: var(--text-primary);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.name-text {
|
|
89
|
+
min-width: 0;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
text-overflow: ellipsis;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.meta {
|
|
96
|
+
margin-top: 0.2rem;
|
|
97
|
+
font-size: 1.2rem;
|
|
98
|
+
color: var(--text-secondary);
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
white-space: nowrap;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.description {
|
|
105
|
+
margin: 0;
|
|
106
|
+
padding: 0 1.4rem 1rem;
|
|
107
|
+
font-size: 1.2rem;
|
|
108
|
+
line-height: 1.7rem;
|
|
109
|
+
color: var(--text-secondary);
|
|
110
|
+
display: -webkit-box;
|
|
111
|
+
-webkit-line-clamp: 2;
|
|
112
|
+
-webkit-box-orient: vertical;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.videos {
|
|
117
|
+
display: grid;
|
|
118
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
119
|
+
gap: 0.8rem;
|
|
120
|
+
padding: 0.4rem 1.4rem 1.4rem;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.video {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: 0.4rem;
|
|
127
|
+
min-width: 0;
|
|
128
|
+
color: var(--text-primary);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.thumb {
|
|
132
|
+
position: relative;
|
|
133
|
+
aspect-ratio: 16 / 9;
|
|
134
|
+
border-radius: 0.6rem;
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
background: var(--bg-elevated);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.thumb img {
|
|
140
|
+
display: block;
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: 100%;
|
|
143
|
+
object-fit: cover;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.duration {
|
|
147
|
+
position: absolute;
|
|
148
|
+
right: 0.4rem;
|
|
149
|
+
bottom: 0.4rem;
|
|
150
|
+
padding: 0 0.3rem;
|
|
151
|
+
border-radius: 0.3rem;
|
|
152
|
+
background: var(--bg-badge);
|
|
153
|
+
color: var(--text-on-media);
|
|
154
|
+
font-size: 1rem;
|
|
155
|
+
font-weight: 500;
|
|
156
|
+
line-height: 1.5rem;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.video-title {
|
|
160
|
+
font-size: 1.1rem;
|
|
161
|
+
font-weight: 500;
|
|
162
|
+
line-height: 1.5rem;
|
|
163
|
+
display: -webkit-box;
|
|
164
|
+
-webkit-line-clamp: 2;
|
|
165
|
+
-webkit-box-orient: vertical;
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.video-age {
|
|
170
|
+
font-size: 1rem;
|
|
171
|
+
color: var(--text-secondary);
|
|
172
|
+
overflow: hidden;
|
|
173
|
+
text-overflow: ellipsis;
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.skeleton-bar {
|
|
178
|
+
height: 1.2rem;
|
|
179
|
+
border-radius: 0.3rem;
|
|
180
|
+
background: var(--bg-elevated);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.skeleton-bar.short {
|
|
184
|
+
width: 65%;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.note {
|
|
188
|
+
margin: 0;
|
|
189
|
+
padding: 0 1.4rem 1.4rem;
|
|
190
|
+
font-size: 1.2rem;
|
|
191
|
+
color: var(--text-secondary);
|
|
192
|
+
}
|
|
193
|
+
`,Wr=(e,t)=>{let n=t.getBoundingClientRect(),{clientWidth:r,clientHeight:i}=document.documentElement,a=e.offsetWidth,o=e.offsetHeight,s=r-n.right-Br-Vr,c=n.left-Br-Vr,l=s>=a||s>=c?Math.min(n.right+Br,r-a-Vr):Math.max(Vr,n.left-a-Br),u=Math.max(Vr,Math.min(n.top-12,i-o-Vr));e.style.left=`${Math.max(Vr,l)}px`,e.style.top=`${u}px`},Gr=({channel:e,anchor:t,onPointerEnter:n,onPointerLeave:r,onNavigate:i})=>{let a=L(null),[{data:o,error:s,fetching:c}]=_t({query:zr,variables:{id:e.id}});ce(()=>{let e=a.current;if(!e)return;let n=()=>Wr(e,t);n(),window.addEventListener(`scroll`,n,{capture:!0,passive:!0}),window.addEventListener(`resize`,n);let r=new ResizeObserver(n);return r.observe(e),()=>{window.removeEventListener(`scroll`,n,{capture:!0}),window.removeEventListener(`resize`,n),r.disconnect()}},[t]);let l=o?.channel.channel,u=l?.avatar??e.avatar,d=l?.name??e.name,f=[l?.handle?l.handle.startsWith(`@`)?l.handle:`@${l.handle}`:void 0,l?.subscriberCountText,l?.videoCountText].filter(e=>!!e).join(` • `),p=(o?.channel.videos.items??[]).slice(0,Hr);return y(z(`div`,{ref:a,css:Ur,role:`region`,"aria-label":`${d} preview`,"data-channel-preview":e.id,onPointerEnter:n,onPointerLeave:r,children:[l?.banner?U(`img`,{className:`banner`,src:l.banner,alt:``,referrerpolicy:`no-referrer`}):void 0,z(`div`,{className:`head`,children:[u?U(`img`,{className:`avatar`,src:u,alt:``,referrerpolicy:`no-referrer`}):U(`span`,{className:`avatar fallback`,"aria-hidden":`true`,children:d.slice(0,1).toUpperCase()}),z(`div`,{className:`identity`,children:[z(K,{href:`/channel/${e.id}`,className:`name`,onClick:i,children:[U(`span`,{className:`name-text`,children:d}),l?U(qn,{channel:l,size:14}):void 0]}),f?U(`div`,{className:`meta`,children:f}):void 0]})]}),l?.description?U(`p`,{className:`description`,children:l.description}):void 0,c&&!o?U(`div`,{className:`videos`,"aria-hidden":`true`,children:[0,1,2].map(e=>z(`div`,{className:`video`,children:[U(`div`,{className:`thumb`}),U(`div`,{className:`skeleton-bar`}),U(`div`,{className:`skeleton-bar short`})]},e))}):s&&!o?U(`p`,{className:`note`,children:`Could not load preview`}):p.length>0?U(`div`,{className:`videos`,children:p.map(e=>{let t=nr(e.durationSeconds);return z(K,{href:Pn(e.id),className:`video`,onClick:i,children:[z(`div`,{className:`thumb`,children:[e.thumbnail?U(jn,{src:e.thumbnail}):void 0,t?U(`span`,{className:`duration`,children:t}):void 0]}),U(`span`,{className:`video-title`,children:e.title}),e.publishedText?U(`span`,{className:`video-age`,children:e.publishedText}):void 0]},e.id)})}):U(`p`,{className:`note`,children:`No videos yet`})]}),document.body)};M(),I();var Kr=ft(`
|
|
194
|
+
query GroupSubscriptions {
|
|
195
|
+
subscribedChannels(all: true) {
|
|
196
|
+
id
|
|
197
|
+
name
|
|
198
|
+
avatar
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
`),qr=[Sr,`⭐`,`🎵`,`🎮`,`💻`,`🎬`,`📚`,`🍳`,`⚽`,`🏀`,`🚗`,`✈️`,`🔬`,`🎨`,`📰`,`💼`,`😂`,`🐶`,`🌱`,`🏋️`,`🎧`,`🎤`,`📷`,`🛠️`],Jr=V`
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
gap: 1.6rem;
|
|
205
|
+
|
|
206
|
+
.field {
|
|
207
|
+
display: flex;
|
|
208
|
+
flex-direction: column;
|
|
209
|
+
gap: 0.6rem;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.field-label {
|
|
213
|
+
font-size: 1.2rem;
|
|
214
|
+
color: var(--text-secondary);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.text {
|
|
218
|
+
height: 4rem;
|
|
219
|
+
padding: 0 1.2rem;
|
|
220
|
+
border: 1px solid var(--border-strong);
|
|
221
|
+
border-radius: 0.8rem;
|
|
222
|
+
background: var(--bg-input);
|
|
223
|
+
color: var(--text-primary);
|
|
224
|
+
font-size: 1.4rem;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.text:focus {
|
|
228
|
+
outline: none;
|
|
229
|
+
border-color: var(--accent-focus);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.emoji-row {
|
|
233
|
+
display: flex;
|
|
234
|
+
flex-wrap: wrap;
|
|
235
|
+
gap: 0.4rem;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.emoji {
|
|
239
|
+
width: 3.6rem;
|
|
240
|
+
height: 3.6rem;
|
|
241
|
+
border: 1px solid transparent;
|
|
242
|
+
border-radius: 0.8rem;
|
|
243
|
+
background: transparent;
|
|
244
|
+
font-size: 2rem;
|
|
245
|
+
line-height: 1;
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.emoji:hover {
|
|
250
|
+
background: var(--bg-hover);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.emoji[aria-checked='true'] {
|
|
254
|
+
border-color: var(--text-primary);
|
|
255
|
+
background: var(--bg-selected);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.select-all {
|
|
259
|
+
display: flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
gap: 1.2rem;
|
|
262
|
+
min-height: 3.6rem;
|
|
263
|
+
padding-bottom: 0.4rem;
|
|
264
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
265
|
+
font-size: 1.3rem;
|
|
266
|
+
font-weight: 500;
|
|
267
|
+
color: var(--text-secondary);
|
|
268
|
+
cursor: pointer;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.select-all input {
|
|
272
|
+
flex: none;
|
|
273
|
+
width: 1.8rem;
|
|
274
|
+
height: 1.8rem;
|
|
275
|
+
margin: 0;
|
|
276
|
+
accent-color: var(--accent);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.channels {
|
|
280
|
+
display: flex;
|
|
281
|
+
flex-direction: column;
|
|
282
|
+
max-height: 24rem;
|
|
283
|
+
overflow-y: auto;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.channel {
|
|
287
|
+
display: flex;
|
|
288
|
+
align-items: center;
|
|
289
|
+
gap: 1.2rem;
|
|
290
|
+
min-height: 4rem;
|
|
291
|
+
font-size: 1.4rem;
|
|
292
|
+
color: var(--text-primary);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.channel input {
|
|
296
|
+
flex: none;
|
|
297
|
+
width: 1.8rem;
|
|
298
|
+
height: 1.8rem;
|
|
299
|
+
margin: 0;
|
|
300
|
+
accent-color: var(--accent);
|
|
301
|
+
cursor: pointer;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.channel-link {
|
|
305
|
+
flex: 1;
|
|
306
|
+
min-width: 0;
|
|
307
|
+
display: flex;
|
|
308
|
+
align-items: center;
|
|
309
|
+
gap: 1.2rem;
|
|
310
|
+
padding: 0.4rem 0.6rem;
|
|
311
|
+
margin-left: -0.6rem;
|
|
312
|
+
border-radius: 0.8rem;
|
|
313
|
+
color: inherit;
|
|
314
|
+
transition: background 0.15s ease;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.channel-link:hover {
|
|
318
|
+
background: var(--bg-hover);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.avatar {
|
|
322
|
+
flex: none;
|
|
323
|
+
width: 2.4rem;
|
|
324
|
+
height: 2.4rem;
|
|
325
|
+
border-radius: 50%;
|
|
326
|
+
object-fit: cover;
|
|
327
|
+
background: var(--bg-chip);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.avatar.fallback {
|
|
331
|
+
display: flex;
|
|
332
|
+
align-items: center;
|
|
333
|
+
justify-content: center;
|
|
334
|
+
font-size: 1.2rem;
|
|
335
|
+
font-weight: 500;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.channel-name {
|
|
339
|
+
flex: 1;
|
|
340
|
+
min-width: 0;
|
|
341
|
+
overflow: hidden;
|
|
342
|
+
text-overflow: ellipsis;
|
|
343
|
+
white-space: nowrap;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.remove {
|
|
347
|
+
flex: none;
|
|
348
|
+
width: 3.2rem;
|
|
349
|
+
height: 3.2rem;
|
|
350
|
+
display: flex;
|
|
351
|
+
align-items: center;
|
|
352
|
+
justify-content: center;
|
|
353
|
+
border: none;
|
|
354
|
+
border-radius: 50%;
|
|
355
|
+
background: transparent;
|
|
356
|
+
color: var(--text-primary);
|
|
357
|
+
cursor: pointer;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.remove:hover {
|
|
361
|
+
background: var(--bg-hover);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.status {
|
|
365
|
+
font-size: 1.4rem;
|
|
366
|
+
color: var(--text-secondary);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
[role='alert'] {
|
|
370
|
+
margin: 0;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.row {
|
|
374
|
+
display: flex;
|
|
375
|
+
justify-content: flex-end;
|
|
376
|
+
gap: 0.8rem;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.cancel,
|
|
380
|
+
.save {
|
|
381
|
+
height: 3.6rem;
|
|
382
|
+
padding: 0 1.6rem;
|
|
383
|
+
border: none;
|
|
384
|
+
border-radius: 1.8rem;
|
|
385
|
+
font-size: 1.4rem;
|
|
386
|
+
font-weight: 500;
|
|
387
|
+
cursor: pointer;
|
|
388
|
+
transition: background 0.15s ease;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.cancel {
|
|
392
|
+
background: transparent;
|
|
393
|
+
color: var(--accent);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.cancel:hover {
|
|
397
|
+
background: var(--accent-hover);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.save {
|
|
401
|
+
background: var(--bg-inverse);
|
|
402
|
+
color: var(--text-inverse);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.save:not(:disabled):hover {
|
|
406
|
+
background: var(--bg-inverse-hover);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.save:disabled {
|
|
410
|
+
opacity: 0.5;
|
|
411
|
+
cursor: default;
|
|
412
|
+
}
|
|
413
|
+
`,Yr=250,Xr=150,Zr=({channel:e})=>e.avatar?U(`img`,{className:`avatar`,src:e.avatar,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`}):U(`span`,{className:`avatar fallback`,"aria-hidden":`true`,children:e.name.slice(0,1).toUpperCase()}),Qr=({channel:e,preview:t})=>z(K,{href:`/channel/${e.id}`,className:`channel-link`,onClick:t.onNavigate,onPointerEnter:n=>{n.pointerType===`mouse`&&t.onEnter(e,n.currentTarget)},onPointerLeave:t.onLeave,children:[U(Zr,{channel:e}),U(`span`,{className:`channel-name`,children:e.name})]}),$r=({chosen:e,onToggle:t,onToggleMany:n,preview:r})=>{let[i,a]=F(``),[{data:o,error:s,fetching:c},l]=_t({query:Kr}),u=i.trim().toLowerCase(),d=(o?.subscribedChannels??[]).filter(e=>e.name.toLowerCase().includes(u)).map(e=>({id:e.id,name:e.name,avatar:e.avatar??void 0})),f=new Set(e.map(e=>e.id)),p=d.filter(e=>f.has(e.id)).length,m=d.length>0&&p===d.length,h=p>0&&p<d.length,g=L(null);return P(()=>{g.current&&(g.current.indeterminate=h)},[h]),z(`div`,{className:`field`,children:[U(`span`,{className:`field-label`,children:`Your subscriptions`}),U(`input`,{className:`text`,type:`search`,value:i,placeholder:`Filter`,"aria-label":`Filter subscriptions`,onInput:e=>a(e.currentTarget.value)}),c?U(`p`,{className:`status`,children:`Loading…`}):void 0,s&&!c?U(cn,{error:s,reexecute:l}):void 0,!c&&d.length>0?z(`label`,{className:`select-all`,children:[U(`input`,{ref:g,type:`checkbox`,checked:m,onChange:()=>n(d,!m)}),U(`span`,{children:u?`Select all (${d.length})`:`Select all`})]}):void 0,U(`div`,{className:`channels`,children:d.map(e=>{let n=f.has(e.id);return z(`div`,{className:`channel`,children:[U(`input`,{type:`checkbox`,checked:n,"aria-label":e.name,onChange:()=>t(e,!n)}),U(Qr,{channel:e,preview:r})]},e.id)})})]})},ei=({group:e,parentId:t,channels:n=[],onClose:r,onSaved:i})=>{let{signedIn:a}=lt(),o=Rr(),s=we(),c=L(r);c.current=r;let l=N(()=>c.current(),[]),[u,d]=F(e?.name??``),[f,p]=F(e?.emoji??`📁`),[m,h]=F(e?.parentId??t??``),[g,_]=F(e?.channels??n),[v]=F(()=>qr.includes(f)?qr:[f,...qr]),[b,x]=F(void 0),S=L(void 0),C=kr(o).filter(({group:t})=>!e||!Or(o,t.id,e.id));P(()=>()=>clearTimeout(S.current),[]);let w={onEnter:(e,t)=>{clearTimeout(S.current),S.current=setTimeout(()=>x({channel:e,anchor:t}),Yr)},onLeave:()=>{clearTimeout(S.current),S.current=setTimeout(()=>x(void 0),Xr)},onNavigate:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||(clearTimeout(S.current),x(void 0),l())}},T=(e,t)=>_(n=>t?[...n.filter(t=>t.id!==e.id),e]:n.filter(t=>t.id!==e.id));return y(z(B,{children:[U(Vt,{title:e?`Edit group`:`New group`,onClose:l,children:z(`form`,{css:Jr,onSubmit:t=>{if(t.preventDefault(),u.trim().length===0)return;let n={name:u,emoji:f,channels:g,parentId:m||void 0},r;e?(Lr.updateGroup(e.id,n),r=Lr.getGroups().find(t=>t.id===e.id)):r=Lr.createGroup(n),l(),r&&i?.(r)},children:[z(`label`,{className:`field`,children:[U(`span`,{className:`field-label`,children:`Name`}),U(`input`,{className:`text`,type:`text`,value:u,maxLength:100,onInput:e=>d(e.currentTarget.value)})]}),C.length>0?z(`label`,{className:`field`,children:[U(`span`,{className:`field-label`,children:`Parent folder`}),z(`select`,{className:`text`,value:m,onChange:e=>h(e.currentTarget.value),children:[U(`option`,{value:``,children:`None (top level)`}),C.map(({group:e,depth:t})=>U(`option`,{value:e.id,children:`${`\xA0\xA0`.repeat(t)}${e.emoji} ${e.name}`},e.id))]})]}):void 0,z(`div`,{className:`field`,children:[U(`span`,{className:`field-label`,id:s,children:`Icon`}),U(`div`,{className:`emoji-row`,role:`radiogroup`,"aria-labelledby":s,children:v.map(e=>U(`button`,{type:`button`,className:`emoji`,role:`radio`,"aria-checked":e===f,"aria-label":e,onClick:()=>p(e),children:e},e))})]}),z(`div`,{className:`field`,children:[U(`span`,{className:`field-label`,children:`Channels`}),g.length===0?U(`p`,{className:`status`,children:`No channels`}):void 0,U(`div`,{className:`channels`,children:g.map(e=>z(`div`,{className:`channel`,children:[U(Qr,{channel:e,preview:w}),U(`button`,{type:`button`,className:`remove`,"aria-label":`Remove ${e.name}`,onClick:()=>T(e,!1),children:U(ye,{size:18,strokeWidth:1.5})})]},e.id))})]}),a?U($r,{chosen:g,onToggle:T,onToggleMany:(e,t)=>_(n=>{let r=new Set(e.map(e=>e.id)),i=n.filter(e=>!r.has(e.id));return t?[...i,...e]:i}),preview:w}):void 0,z(`div`,{className:`row`,children:[U(`button`,{type:`button`,className:`cancel`,onClick:l,children:`Cancel`}),U(`button`,{type:`submit`,className:`save`,disabled:u.trim().length===0,children:e?`Save`:`Create`})]})]})}),b?U(Gr,{channel:b.channel,anchor:b.anchor,onPointerEnter:()=>clearTimeout(S.current),onPointerLeave:w.onLeave,onNavigate:w.onNavigate}):void 0]}),document.body)};I();var ti=V`
|
|
414
|
+
position: relative;
|
|
415
|
+
|
|
416
|
+
.avatar-button {
|
|
417
|
+
display: block;
|
|
418
|
+
width: 3.2rem;
|
|
419
|
+
height: 3.2rem;
|
|
420
|
+
padding: 0;
|
|
421
|
+
border: none;
|
|
422
|
+
border-radius: 50%;
|
|
423
|
+
overflow: hidden;
|
|
424
|
+
background: transparent;
|
|
425
|
+
cursor: pointer;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.avatar {
|
|
429
|
+
width: 100%;
|
|
430
|
+
height: 100%;
|
|
431
|
+
border-radius: 50%;
|
|
432
|
+
object-fit: cover;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.initial {
|
|
436
|
+
width: 100%;
|
|
437
|
+
height: 100%;
|
|
438
|
+
display: flex;
|
|
439
|
+
align-items: center;
|
|
440
|
+
justify-content: center;
|
|
441
|
+
border-radius: 50%;
|
|
442
|
+
background: var(--accent);
|
|
443
|
+
color: var(--text-inverse);
|
|
444
|
+
font-size: 1.6rem;
|
|
445
|
+
font-weight: 500;
|
|
446
|
+
text-transform: uppercase;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.menu {
|
|
450
|
+
position: absolute;
|
|
451
|
+
top: calc(100% + 0.8rem);
|
|
452
|
+
right: 0;
|
|
453
|
+
min-width: 26rem;
|
|
454
|
+
padding: 0.8rem 0;
|
|
455
|
+
border-radius: 1.2rem;
|
|
456
|
+
background: var(--bg-menu);
|
|
457
|
+
box-shadow: var(--shadow-menu);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.account {
|
|
461
|
+
display: flex;
|
|
462
|
+
align-items: center;
|
|
463
|
+
gap: 1.6rem;
|
|
464
|
+
padding: 0.8rem 1.6rem 1.6rem;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.account .avatar,
|
|
468
|
+
.account .initial {
|
|
469
|
+
flex: none;
|
|
470
|
+
width: 4rem;
|
|
471
|
+
height: 4rem;
|
|
472
|
+
font-size: 2rem;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.identity {
|
|
476
|
+
min-width: 0;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.name {
|
|
480
|
+
font-size: 1.6rem;
|
|
481
|
+
font-weight: 400;
|
|
482
|
+
color: var(--text-primary);
|
|
483
|
+
white-space: nowrap;
|
|
484
|
+
overflow: hidden;
|
|
485
|
+
text-overflow: ellipsis;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.handle {
|
|
489
|
+
font-size: 1.4rem;
|
|
490
|
+
color: var(--text-secondary);
|
|
491
|
+
white-space: nowrap;
|
|
492
|
+
overflow: hidden;
|
|
493
|
+
text-overflow: ellipsis;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.divider {
|
|
497
|
+
height: 1px;
|
|
498
|
+
margin: 0 0 0.8rem;
|
|
499
|
+
background: var(--border-subtle);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.sign-out {
|
|
503
|
+
width: 100%;
|
|
504
|
+
height: 4rem;
|
|
505
|
+
display: flex;
|
|
506
|
+
align-items: center;
|
|
507
|
+
gap: 1.6rem;
|
|
508
|
+
padding: 0 1.6rem;
|
|
509
|
+
border: none;
|
|
510
|
+
background: transparent;
|
|
511
|
+
color: var(--text-primary);
|
|
512
|
+
font-size: 1.4rem;
|
|
513
|
+
text-align: left;
|
|
514
|
+
cursor: pointer;
|
|
515
|
+
transition: background 0.15s ease;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.sign-out:hover:not(:disabled) {
|
|
519
|
+
background: var(--bg-hover);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.sign-out:disabled {
|
|
523
|
+
opacity: 0.5;
|
|
524
|
+
cursor: default;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.sign-out-error {
|
|
528
|
+
margin: 0.4rem 1.6rem 0;
|
|
529
|
+
font-size: 1.2rem;
|
|
530
|
+
color: var(--danger);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.row {
|
|
534
|
+
width: 100%;
|
|
535
|
+
min-height: 4rem;
|
|
536
|
+
display: flex;
|
|
537
|
+
align-items: center;
|
|
538
|
+
gap: 1.6rem;
|
|
539
|
+
padding: 0.6rem 1.6rem;
|
|
540
|
+
border: none;
|
|
541
|
+
background: transparent;
|
|
542
|
+
color: var(--text-primary);
|
|
543
|
+
font: inherit;
|
|
544
|
+
font-size: 1.4rem;
|
|
545
|
+
text-align: left;
|
|
546
|
+
text-decoration: none;
|
|
547
|
+
cursor: pointer;
|
|
548
|
+
transition: background 0.15s ease;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.row:hover:not(:disabled) { background: var(--bg-hover); }
|
|
552
|
+
.row:disabled { opacity: 0.5; cursor: default; }
|
|
553
|
+
|
|
554
|
+
.row .avatar,
|
|
555
|
+
.row .initial {
|
|
556
|
+
flex: none;
|
|
557
|
+
width: 2.4rem;
|
|
558
|
+
height: 2.4rem;
|
|
559
|
+
font-size: 1.2rem;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.row .label {
|
|
563
|
+
min-width: 0;
|
|
564
|
+
flex: 1;
|
|
565
|
+
white-space: nowrap;
|
|
566
|
+
overflow: hidden;
|
|
567
|
+
text-overflow: ellipsis;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.row .channel {
|
|
571
|
+
display: flex;
|
|
572
|
+
flex-direction: column;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.channel > span {
|
|
576
|
+
overflow: hidden;
|
|
577
|
+
text-overflow: ellipsis;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.channel-handle {
|
|
581
|
+
font-size: 1.2rem;
|
|
582
|
+
color: var(--text-secondary);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.section-title {
|
|
586
|
+
padding: 0.8rem 1.6rem 0.4rem;
|
|
587
|
+
font-size: 1.2rem;
|
|
588
|
+
color: var(--text-secondary);
|
|
589
|
+
}
|
|
590
|
+
`,ni=({name:e,avatar:t})=>t?U(`img`,{className:`avatar`,src:t,alt:``,referrerpolicy:`no-referrer`}):U(`span`,{className:`initial`,"aria-hidden":`true`,children:e?.trim().charAt(0)||`?`}),ri=({name:e,avatar:t,handle:n,accounts:r=[]})=>{let[i,a]=F(!1),[o,s]=F(!1),[c,l]=F(),[u,d]=F(!1),f=L(null),p=L(null),m=N(()=>a(!1),[]);on({open:i,onClose:m,rootRef:f,triggerRef:p});let h=async()=>{if(!o){s(!0),d(!1);try{await bt()}catch{s(!1),d(!0)}}},_=o||c!==void 0,v=r.filter(e=>!e.selected),y=e=>{_||(l(Et(e)),wt(e.brandPageId))};return z(`div`,{css:ti,ref:f,children:[U(`button`,{ref:p,type:`button`,className:`avatar-button`,"aria-label":`Account menu`,"aria-haspopup":`menu`,"aria-expanded":i,onClick:()=>a(e=>!e),children:U(ni,{name:e,avatar:t})}),i?z(`div`,{className:`menu`,role:`menu`,"aria-label":`Account`,children:[z(`div`,{className:`account`,role:`presentation`,children:[U(ni,{name:e,avatar:t}),z(`div`,{className:`identity`,children:[U(`div`,{className:`name`,children:e}),n?U(`div`,{className:`handle`,children:vt(n)}):void 0]})]}),U(`div`,{className:`divider`,role:`presentation`}),n?z(K,{className:`row`,role:`menuitem`,href:`/channel/${vt(n)}`,onClick:m,children:[U(g,{size:20,strokeWidth:1.5}),U(`span`,{className:`label`,children:`Your channel`})]}):void 0,z(K,{className:`row`,role:`menuitem`,href:`/account`,onClick:m,children:[U(ge,{size:20,strokeWidth:1.5}),U(`span`,{className:`label`,children:`Manage account`})]}),v.length?z(B,{children:[U(`div`,{className:`divider`,role:`presentation`}),U(`div`,{className:`section-title`,role:`presentation`,children:`Switch account`}),v.map((e,t)=>z(`button`,{type:`button`,className:`row`,role:`menuitem`,disabled:_,onClick:()=>y(e),children:[U(ni,{name:e.name,avatar:e.avatar}),z(`span`,{className:`label channel`,children:[U(`span`,{children:e.name??`Account ${t+1}`}),e.handle?U(`span`,{className:`channel-handle`,children:vt(e.handle)}):void 0]}),c===Et(e)?U(w,{size:16,strokeWidth:1.5}):void 0]},Et(e)))]}):void 0,U(`div`,{className:`divider`,role:`presentation`}),z(`button`,{type:`button`,className:`sign-out`,role:`menuitem`,disabled:_,onClick:h,children:[U(ne,{size:20,strokeWidth:1.5}),o?`Signing out…`:`Sign out`]}),u?U(`p`,{className:`sign-out-error`,children:`Couldn’t clear the session. Try again.`}):void 0]}):void 0]})};I();var ii=`https://www.fkn.app/#why`,ai=`FKN_WEB_EXTENSION_MAIN_WORLD_CONTENT_SCRIPT_ENABLED_EVENT_KEY`,oi=()=>document.documentElement.dataset.fknExtension===`true`,si=1e3,ci=()=>{let[e,t]=F(()=>oi()||Z().extensionSeen);return P(()=>{let e=()=>{let e=oi();t(e),Z().extensionSeen!==e&&J({extensionSeen:e})};document.addEventListener(ai,e),oi()&&e();let n=setTimeout(e,si);return()=>{clearTimeout(n),document.removeEventListener(ai,e)}},[]),e},li=V`
|
|
591
|
+
position: relative;
|
|
592
|
+
display: flex;
|
|
593
|
+
align-items: center;
|
|
594
|
+
flex: none;
|
|
595
|
+
|
|
596
|
+
.pill {
|
|
597
|
+
display: flex;
|
|
598
|
+
align-items: center;
|
|
599
|
+
gap: 0.6rem;
|
|
600
|
+
height: 3.2rem;
|
|
601
|
+
padding: 0 1.2rem;
|
|
602
|
+
border: none;
|
|
603
|
+
border-radius: 1.6rem;
|
|
604
|
+
background: var(--bg-chip);
|
|
605
|
+
color: var(--text-primary);
|
|
606
|
+
font-size: 1.3rem;
|
|
607
|
+
font-weight: 500;
|
|
608
|
+
white-space: nowrap;
|
|
609
|
+
cursor: pointer;
|
|
610
|
+
transition: background 0.15s ease;
|
|
611
|
+
/* Arrives a beat after the page rather than with it: appearing in the same
|
|
612
|
+
frame as the header reads as a banner, appearing after it reads as an
|
|
613
|
+
aside. */
|
|
614
|
+
animation: notice-in 0.25s ease both;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.pill:hover,
|
|
618
|
+
.pill[aria-expanded='true'] {
|
|
619
|
+
background: var(--bg-chip-hover);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.pill svg {
|
|
623
|
+
flex: none;
|
|
624
|
+
color: var(--accent);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
@keyframes notice-in {
|
|
628
|
+
from {
|
|
629
|
+
opacity: 0;
|
|
630
|
+
transform: translateY(-0.4rem);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.panel {
|
|
635
|
+
position: absolute;
|
|
636
|
+
top: calc(100% + 0.8rem);
|
|
637
|
+
right: 0;
|
|
638
|
+
z-index: var(--z-popup);
|
|
639
|
+
/* Wide enough for both actions to sit on one row without either label
|
|
640
|
+
wrapping. */
|
|
641
|
+
width: 36rem;
|
|
642
|
+
max-width: calc(100vw - 3.2rem);
|
|
643
|
+
padding: 1.6rem;
|
|
644
|
+
border-radius: 1.2rem;
|
|
645
|
+
background: var(--bg-menu);
|
|
646
|
+
box-shadow: var(--shadow-menu);
|
|
647
|
+
animation: notice-in 0.15s ease both;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.title {
|
|
651
|
+
margin: 0 0 1.6rem;
|
|
652
|
+
font-size: 1.5rem;
|
|
653
|
+
font-weight: 500;
|
|
654
|
+
color: var(--text-primary);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.actions {
|
|
658
|
+
display: flex;
|
|
659
|
+
align-items: center;
|
|
660
|
+
gap: 0.8rem;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.install {
|
|
664
|
+
display: flex;
|
|
665
|
+
align-items: center;
|
|
666
|
+
gap: 0.6rem;
|
|
667
|
+
height: 3.6rem;
|
|
668
|
+
padding: 0 1.6rem;
|
|
669
|
+
border: none;
|
|
670
|
+
border-radius: 1.8rem;
|
|
671
|
+
/* Paired the way the app pairs every filled control: both tokens flip with
|
|
672
|
+
the theme together, so the label keeps its contrast. The inverse accent
|
|
673
|
+
here would be the accent meant for the OPPOSITE background, which in
|
|
674
|
+
light mode is pale blue and would carry white text at 2:1. */
|
|
675
|
+
background: var(--accent);
|
|
676
|
+
color: var(--text-inverse);
|
|
677
|
+
font-size: 1.4rem;
|
|
678
|
+
font-weight: 500;
|
|
679
|
+
white-space: nowrap;
|
|
680
|
+
cursor: pointer;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.install:hover {
|
|
684
|
+
filter: brightness(1.1);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.never {
|
|
688
|
+
height: 3.6rem;
|
|
689
|
+
padding: 0 1.2rem;
|
|
690
|
+
border: none;
|
|
691
|
+
border-radius: 1.8rem;
|
|
692
|
+
background: transparent;
|
|
693
|
+
color: var(--text-secondary);
|
|
694
|
+
font-size: 1.3rem;
|
|
695
|
+
white-space: nowrap;
|
|
696
|
+
cursor: pointer;
|
|
697
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.never:hover {
|
|
701
|
+
background: var(--bg-hover);
|
|
702
|
+
color: var(--text-primary);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/* Icon only below this width: with the label, the header's end (355px
|
|
706
|
+
signed out, measured 2026-11-02) outgrows its 1fr track and pushes the
|
|
707
|
+
search box off the page's centre line. */
|
|
708
|
+
@media (max-width: 1500px) {
|
|
709
|
+
.pill .label {
|
|
710
|
+
display: none;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.pill {
|
|
714
|
+
width: 3.6rem;
|
|
715
|
+
height: 3.6rem;
|
|
716
|
+
padding: 0;
|
|
717
|
+
justify-content: center;
|
|
718
|
+
border-radius: 50%;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/* The header's narrow row (guide, logo, search icon, this offer, More, Sign
|
|
723
|
+
in) is 440px wide signed out, measured 2026-11-09, so below that the offer
|
|
724
|
+
makes way for the Sign in button. */
|
|
725
|
+
@media (max-width: 439px) {
|
|
726
|
+
display: none;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/* the pill sits mid-row in the narrow header, so a panel anchored to it would
|
|
730
|
+
run off the left edge */
|
|
731
|
+
@media (max-width: 656px) {
|
|
732
|
+
.panel {
|
|
733
|
+
position: fixed;
|
|
734
|
+
top: var(--header-height);
|
|
735
|
+
right: 1.6rem;
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
`,ui=()=>{let e=ci(),[t,n]=F(()=>Z().suggestExtension),[r,i]=F(!1),a=L(null),o=L(null);P(()=>Yn(e=>n(e.suggestExtension)),[]);let s=N(()=>i(!1),[]);on({open:r,onClose:s,rootRef:a,triggerRef:o});let c=N(()=>{i(!1),document.documentElement.dataset.extensionPrompt=`open`;let e=()=>{delete document.documentElement.dataset.extensionPrompt};yt().then(e,t=>{e(),console.warn(`[yt-client] the FKN install prompt could not be shown`,t),window.open(ii,`_blank`,`noreferrer`)})},[]);return e!==!1||!t?null:z(`div`,{css:li,ref:a,children:[z(`button`,{type:`button`,className:`pill`,ref:o,"aria-label":`Faster with the extension`,"aria-haspopup":`dialog`,"aria-expanded":r,onClick:()=>i(e=>!e),children:[U(De,{size:16,strokeWidth:2}),U(`span`,{className:`label`,children:`Faster with the extension`})]}),r?z(`div`,{className:`panel`,role:`dialog`,"aria-label":`Faster with the FKN extension`,children:[U(`p`,{className:`title`,children:`Faster with the FKN extension`}),z(`div`,{className:`actions`,children:[z(`button`,{type:`button`,className:`install`,onClick:c,children:[U(De,{size:16,strokeWidth:2}),`Get the extension`]}),U(`button`,{type:`button`,className:`never`,onClick:()=>{J({suggestExtension:!1}),i(!1)},children:`Don't show this again`})]})]}):void 0]})},di=`fkn:e2e-stale-epoch: this file is encrypted under a previous key you reset`,fi=`fkn:e2e-retired-format: stored data is in a format this version no longer opens`,pi=`FKN_STORAGE_NOT_FOUND`,mi=`FKN_ACCOUNT_CHANGED`,hi=`FKN_ACCOUNT_PIN_UNSUPPORTED`,gi=`groups/v1/groups.json`,_i=`groups/v2/groups.json`,vi={groups:[],deleted:{}},yi=(e,t)=>{let n={...e.deleted};for(let[e,r]of Object.entries(t.deleted))n[e]=Math.max(n[e]??0,r);let r=new Map;for(let n of[...e.groups,...t.groups]){let e=r.get(n.id);(!e||n.updatedAt>e.updatedAt)&&r.set(n.id,n)}let i=e=>!(e.id in n)||e.updatedAt>n[e.id];return{groups:[...r.values()].filter(i),deleted:n}},bi=()=>Error(`groups: the account file is not one this build reads`),xi=e=>{let t;try{t=JSON.parse(e)}catch{throw bi()}if(typeof t?.file!=`string`||!t.file)throw bi();return{file:t.file,groups:Nr(t.groups),deleted:Pr({deleted:t.deleted}).deleted}},Si=[di,fi].map(e=>e.split(`: `)[0]),Ci=e=>e instanceof Error&&Si.some(t=>e.message.startsWith(t)),wi=(e,t,n)=>new Promise((r,i)=>{let a=setTimeout(()=>n?r(n()):i(Error(`groups: FKN did not answer`)),e);new Promise(e=>e(t())).then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),n?r(n()):i(e)})}),Ti=8e3,Ei=(e,t)=>JSON.stringify(e)===JSON.stringify(t),Di=({store:e,cloud:t,onAccountChange:n,lock:r,newId:i=()=>crypto.randomUUID(),boundMs:a=Ti})=>{let o=0,s,c=async()=>{let n=o,r=()=>o===n&&e.persists();if(!r())return;let c=await wi(a,t.availability,()=>`unknown`);if(c===`unknown`||!r())return;let l=e.snapshot();if(c===`disconnected`){(l.file||Object.keys(l.deleted).length>0)&&e.settle(l.file?[]:l.groups,{deleted:{}});return}if(!await wi(a,t.unlocked,()=>!1)||!r())return;let d=null,f=!1,p=!1;try{if(d=await wi(a,()=>t.read(_i)),d===null){let e=await wi(a,()=>t.read(gi));e!==null&&(d=e,p=!0)}}catch(e){if(!Ci(e))throw e;f=!0}let m=d===null?void 0:xi(d),h=s?.generation===n,g=l.file&&l.file!==m?.file&&!h?vi:l,_=yi(m??vi,g),v=m?.file??i(),y=f||p||(m?!Ei({file:v,..._},m):_.groups.length>0||Object.keys(_.deleted).length>0),b=m!==void 0;if(y){if(f&&!await wi(a,t.unlocked,()=>!1)||!r())return;await wi(a,()=>t.write(_i,JSON.stringify({file:v,..._}))),b||(s={file:v,generation:n}),b=!0}if(!r())return;if(!Ei(e.snapshot(),l)){u();return}let x=b?{file:v,deleted:_.deleted}:{deleted:_.deleted};e.settle(_.groups,x)},l,u=()=>l??=r(()=>(l=void 0,c())).catch(e=>console.warn(`groups: FKN account sync`,e));return e.onEdit(()=>void u()),n(e=>{e?.switched!==!1&&(o+=1),u()}),{check:u}},Oi=async()=>{await pt();let[e,t]=await Promise.all([s(()=>import(`./assets/account-By94iboj.js`),__vite__mapDeps([0,1,2,3,4])),s(()=>import(`./assets/fs-CjRTQ7Nu.js`),__vite__mapDeps([5,6,2,3,4,7]))]);return{account:e,fs:t}},ki=async e=>{let t=await e.fs.availability();if(t===`unknown`)return;let n=t===`connected`?await wi(Ti,()=>e.fs.encryption(),()=>void 0):void 0;return{lib:e,signedIn:t===`connected`,locked:!!n&&!n.unlocked&&n.enrolled}},Ai=18e4,ji,Mi=()=>ji??=Oi().then(({account:e,fs:t})=>{if(!(`locks`in navigator))throw Error(`groups: no navigator.locks, so no FKN account sync`);let n=Di({store:Lr,cloud:{availability:()=>t.availability(),unlocked:async()=>(await t.encryption()).unlocked,read:e=>t.promises.readFile(e,{encoding:`utf8`}).then(e=>typeof e==`string`?e:new TextDecoder().decode(e),e=>{if(t.isNotFound(e))return null;throw e}),write:(e,n)=>t.promises.writeFile(e,n)},onAccountChange:e.onChange,lock:e=>navigator.locks.request(`yt-client:groups`,e)});return document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&n.check()}),window.addEventListener(`online`,()=>void n.check()),setInterval(()=>{document.visibilityState===`visible`&&n.check()},Ai),n.check(),n},e=>{throw ji=void 0,e}),Ni=()=>Mi().then(e=>e.check()),Pi=[{title:`Playback`,rows:[[`Toggle play/pause`,`k`],[`Rewind 10 seconds`,`j`],[`Fast forward 10 seconds`,`l`],[`Previous frame (while paused)`,`,`],[`Next frame (while paused)`,`.`],[`Decrease playback rate`,`<`],[`Increase playback rate`,`>`],[`Seek to a point in the video`,`0 to 9`],[`Seek to previous chapter`,`Ctrl+←`],[`Seek to next chapter`,`Ctrl+→`],[`Seek backward 5 seconds`,`←`],[`Seek forward 5 seconds`,`→`],[`Increase volume 5%`,`↑`],[`Decrease volume 5%`,`↓`],[`Toggle mute`,`m`],[`Previous video`,`Shift+P`],[`Next video`,`Shift+N`]]},{title:`General`,rows:[[`Toggle full screen`,`f`],[`Toggle theater mode`,`t`],[`Toggle miniplayer`,`i`],[`Go to search box`,`/`],[`Show keyboard shortcuts`,`Shift+?`]]},{title:`Subtitles and closed captions`,rows:[[`Toggle subtitles`,`c`],[`Rotate through font sizes (increasing)`,`+`],[`Rotate through font sizes (decreasing)`,`-`]]}],Fi=V`
|
|
739
|
+
.section + .section {
|
|
740
|
+
margin-top: 2.4rem;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.section-title {
|
|
744
|
+
margin: 0 0 0.8rem;
|
|
745
|
+
font-size: 1.6rem;
|
|
746
|
+
font-weight: 500;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.row {
|
|
750
|
+
display: flex;
|
|
751
|
+
align-items: center;
|
|
752
|
+
justify-content: space-between;
|
|
753
|
+
gap: 1.6rem;
|
|
754
|
+
padding: 0.6rem 0;
|
|
755
|
+
font-size: 1.4rem;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
kbd {
|
|
759
|
+
flex: none;
|
|
760
|
+
font: inherit;
|
|
761
|
+
font-weight: 500;
|
|
762
|
+
}
|
|
763
|
+
`,Ii=({onClose:e})=>U(Vt,{title:`Keyboard shortcuts`,onClose:e,children:U(`div`,{css:Fi,children:Pi.map(e=>z(`section`,{className:`section`,children:[U(`h3`,{className:`section-title`,children:e.title}),e.rows.map(([e,t])=>z(`div`,{className:`row`,children:[U(`span`,{children:e}),U(`kbd`,{children:t})]},e))]},e.title))})});M(),I();var Li={device:`Device theme`,dark:`Dark theme`,light:`Light theme`},Ri=[`device`,`dark`,`light`],zi=V`
|
|
764
|
+
min-width: 28rem;
|
|
765
|
+
`,Bi=({size:e=20})=>U(`span`,{style:{display:`block`,width:`${e}px`,height:`${e}px`},"aria-hidden":`true`}),Vi=()=>{let[e,t]=F();return P(()=>{let e=!0;return Oi().then(ki).then(n=>{n&&e&&t(n)},()=>{}),()=>{e=!1}},[]),e},Hi=()=>void Ni().catch(()=>{}),Ui=({fkn:{lib:e,signedIn:t,locked:n}})=>t?z(B,{children:[n?U(Y,{icon:D,label:`Unlock FKN storage`,onSelect:()=>void e.fs.unlock().then(Hi,()=>{})}):void 0,U(Y,{icon:ne,label:`Sign out of FKN`,onSelect:()=>void wi(Ti,()=>e.account.logout()).then(Hi,()=>ot(`Could not sign out of FKN. Try again.`))})]}):U(Y,{icon:te,label:`Sign in to FKN`,onSelect:()=>void e.account.login().then(Hi,()=>{})}),Wi=({onShortcuts:e})=>{let[,t]=Re(),[n,r]=F(`root`),[i,a]=F(()=>Z().theme),o=Vi(),s=L(null),c=L(n);return ce(()=>{c.current!==n&&(c.current=n,s.current?.querySelector(`[role="menuitem"]`)?.focus())},[n]),n===`appearance`?z(`div`,{css:zi,role:`presentation`,ref:s,children:[U(Y,{icon:C,label:`Appearance`,closeOnSelect:!1,onSelect:()=>r(`root`)}),U(Hn,{}),Ri.map(e=>U(Y,{icon:e===i?w:Bi,label:Li[e],closeOnSelect:!1,onSelect:()=>{a(e),J({theme:e})}},e))]}):z(`div`,{css:zi,role:`presentation`,ref:s,children:[U(Y,{icon:f,label:`Appearance: ${Li[i]}`,trailingIcon:d,closeOnSelect:!1,onSelect:()=>r(`appearance`)}),U(Y,{icon:ae,label:`Keyboard shortcuts`,onSelect:e}),U(Y,{icon:Te,label:`Watch together`,onSelect:()=>t(`/party`)}),U(Hn,{}),U(Y,{icon:je,label:`Settings`,onSelect:()=>t(`/settings`)}),o?z(B,{children:[U(Hn,{}),U(Ui,{fkn:o})]}):void 0]})},Gi=()=>{let[e,t]=F(!1),n=N(()=>t(!1),[]);return z(B,{children:[U(Ot,{label:`More`,trigger:U(`button`,{type:`button`,className:`icon-button`,"aria-label":`More`,children:U(Ne,{size:24,strokeWidth:1.5})}),children:U(Wi,{onShortcuts:()=>t(!0)})}),e?y(U(Ii,{onClose:n}),document.body):void 0]})};I();var Ki=ft(`
|
|
766
|
+
query Notifications($cursor: String) {
|
|
767
|
+
notifications(cursor: $cursor) {
|
|
768
|
+
items {
|
|
769
|
+
id
|
|
770
|
+
message
|
|
771
|
+
sentText
|
|
772
|
+
avatar
|
|
773
|
+
thumbnail
|
|
774
|
+
videoId
|
|
775
|
+
read
|
|
776
|
+
}
|
|
777
|
+
cursor
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
`),qi=ft(`
|
|
781
|
+
query UnseenNotificationCount {
|
|
782
|
+
unseenNotificationCount
|
|
783
|
+
}
|
|
784
|
+
`),Ji=ft(`
|
|
785
|
+
mutation MarkNotificationRead($id: ID!) {
|
|
786
|
+
markNotificationRead(id: $id)
|
|
787
|
+
}
|
|
788
|
+
`),Yi=3e5,Xi=V`
|
|
789
|
+
.bell {
|
|
790
|
+
position: relative;
|
|
791
|
+
display: flex;
|
|
792
|
+
align-items: center;
|
|
793
|
+
justify-content: center;
|
|
794
|
+
width: 4rem;
|
|
795
|
+
height: 4rem;
|
|
796
|
+
border: none;
|
|
797
|
+
border-radius: 50%;
|
|
798
|
+
background: transparent;
|
|
799
|
+
color: var(--text-primary);
|
|
800
|
+
cursor: pointer;
|
|
801
|
+
transition: background 0.15s ease;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
.bell:hover {
|
|
805
|
+
background: var(--bg-hover);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
.badge {
|
|
809
|
+
position: absolute;
|
|
810
|
+
top: 0.4rem;
|
|
811
|
+
right: 0.4rem;
|
|
812
|
+
min-width: 1.6rem;
|
|
813
|
+
height: 1.6rem;
|
|
814
|
+
padding: 0 0.4rem;
|
|
815
|
+
border-radius: 0.8rem;
|
|
816
|
+
background: var(--brand-red);
|
|
817
|
+
color: #fff;
|
|
818
|
+
font-size: 1.1rem;
|
|
819
|
+
line-height: 1.6rem;
|
|
820
|
+
text-align: center;
|
|
821
|
+
}
|
|
822
|
+
`,Zi=V`
|
|
823
|
+
width: 40rem;
|
|
824
|
+
max-width: 90vw;
|
|
825
|
+
max-height: 70vh;
|
|
826
|
+
overflow-y: auto;
|
|
827
|
+
|
|
828
|
+
.row {
|
|
829
|
+
display: flex;
|
|
830
|
+
gap: 1.2rem;
|
|
831
|
+
width: 100%;
|
|
832
|
+
text-align: left;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.row-avatar {
|
|
836
|
+
flex: none;
|
|
837
|
+
width: 4rem;
|
|
838
|
+
height: 4rem;
|
|
839
|
+
border-radius: 50%;
|
|
840
|
+
object-fit: cover;
|
|
841
|
+
background: var(--bg-chip);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.row-body {
|
|
845
|
+
flex: 1;
|
|
846
|
+
min-width: 0;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.row-message {
|
|
850
|
+
font-size: 1.3rem;
|
|
851
|
+
line-height: 1.8rem;
|
|
852
|
+
color: var(--text-primary);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.row-time {
|
|
856
|
+
margin-top: 0.2rem;
|
|
857
|
+
font-size: 1.2rem;
|
|
858
|
+
color: var(--text-secondary);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
.row-thumb {
|
|
862
|
+
flex: none;
|
|
863
|
+
width: 8rem;
|
|
864
|
+
aspect-ratio: 16 / 9;
|
|
865
|
+
border-radius: 0.4rem;
|
|
866
|
+
object-fit: cover;
|
|
867
|
+
background: var(--bg-chip);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
/* An unread row is marked by a dot rather than a background wash: the panel
|
|
871
|
+
is a menu, and a filled row would fight the focus highlight. */
|
|
872
|
+
.unread {
|
|
873
|
+
position: relative;
|
|
874
|
+
padding-left: 1rem;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.unread::before {
|
|
878
|
+
content: '';
|
|
879
|
+
position: absolute;
|
|
880
|
+
left: 0;
|
|
881
|
+
top: 1.6rem;
|
|
882
|
+
width: 0.6rem;
|
|
883
|
+
height: 0.6rem;
|
|
884
|
+
border-radius: 50%;
|
|
885
|
+
background: var(--accent);
|
|
886
|
+
}
|
|
887
|
+
`,Qi=()=>{let[,e]=Re(),{ready:t,signedIn:n}=lt(),[r,i]=F(!1),[a,o]=F([]),[,s]=Ye(Ji),[{data:c},l]=_t({query:qi,pause:!t||!n});P(()=>{if(!t||!n)return;let e=()=>{document.hidden||l({requestPolicy:`network-only`})},r=setInterval(e,Yi);return document.addEventListener(`visibilitychange`,e),()=>{clearInterval(r),document.removeEventListener(`visibilitychange`,e)}},[t,n,l]);let[{data:u,error:d,fetching:f},p]=_t({query:Ki,variables:{cursor:a[a.length-1]?.cursor},pause:!r||!t||!n}),m=u?.notifications,{items:h,cursor:g}=Mn({pages:m?[...a,m]:a,key:e=>e.id});if(t&&!n)return null;let _=c?.unseenNotificationCount??0,v=(t,n)=>{s({id:t}).then(e=>{e.error&&ot(un(e.error))}),n&&e(Pn(n))};return U(`div`,{css:Xi,children:z(Ot,{label:`Notifications`,align:`end`,panelClass:Zi.name,onOpenChange:i,trigger:z(`button`,{type:`button`,className:`bell`,"aria-label":`Notifications`,children:[U(x,{size:24,strokeWidth:1.5}),_>0?U(`span`,{className:`badge`,children:_>99?`99+`:_}):void 0]}),children:[f&&h.length===0?U(Y,{label:`Loading…`,disabled:!0}):void 0,!f&&!d&&h.length===0?U(Y,{label:`No notifications`,disabled:!0}):void 0,h.map(e=>U(Y,{onSelect:()=>v(e.id,e.videoId),ariaLabel:e.message,label:z(`span`,{className:e.read?`row`:`row unread`,children:[e.avatar?U(`img`,{className:`row-avatar`,src:e.avatar,alt:``,loading:`lazy`}):U(`span`,{className:`row-avatar`,"aria-hidden":`true`}),z(`span`,{className:`row-body`,children:[U(`span`,{className:`row-message`,children:e.message}),e.sentText?U(`span`,{className:`row-time`,children:e.sentText}):void 0]}),e.thumbnail?U(`img`,{className:`row-thumb`,src:e.thumbnail,alt:``,loading:`lazy`}):void 0]})},e.id)),d&&!f?U(sn,{error:d,reexecute:p}):void 0,g&&!f&&!d?U(Y,{label:`Show more`,closeOnSelect:!1,onSelect:()=>o(a[a.length-1]===m?a:[...a,m])}):void 0]})})},$i=1e4,ea=(e,t,n)=>({rtt:n-e,offset:t-(e+n)/2}),ta=e=>{let t;for(let n of e)Number.isFinite(n.rtt)&&Number.isFinite(n.offset)&&(n.rtt<0||n.rtt>=1e4||(!t||n.rtt<t.rtt)&&(t=n));return t},na=(e,t)=>e-t,ra=15e3,ia=(e,t)=>Math.abs(e-t)<.01,aa=(e,t,n=!1)=>{if(e.paused)return e.time;let r=Math.max(0,t-e.at),i=n?r:Math.min(r,ra);return e.time+i/1e3*e.rate},oa=(e,t,n)=>{if(e.paused)return{...e,at:n};let r=Math.max(0,n-t);return{...e,time:e.time+r/1e3*e.rate,at:n}},sa=(e,t,n,r=!1)=>{let i=aa(t,n,r),a={};return Math.abs(i-e.time)>1.5&&(a.seekTo=i),e.paused!==t.paused&&(a.paused=t.paused),ia(e.rate,t.rate)||(a.rate=t.rate),Object.keys(a).length>0?a:void 0},ca=`/party`,la=`[A-Za-z0-9_-]{43}`,ua=`[a-z0-9][a-z0-9._-]{0,63}`,da=RegExp(`^${la}\\.[\\x21-\\x7e]{1,256}\\/${ua}$`),fa=RegExp(`^${la}\\.${ua}$`),pa=(e,t)=>{let n=t.indexOf(`.`),r=t.slice(n+1),i=r.lastIndexOf(`/`);return i>0&&r.slice(0,i)===e?`${t.slice(0,n)}.${r.slice(i+1)}`:t},ma=(e,t)=>`${e}${ca}#${pa(e,t)}`,ha=(e,t)=>{let n=e.startsWith(`#`)?e.slice(1):e,r;try{r=decodeURIComponent(n).trim()}catch{return}if(da.test(r))return r;if(!fa.test(r))return;let i=r.indexOf(`.`),a=`${r.slice(0,i)}.${t}/${r.slice(i+1)}`;return da.test(a)?a:void 0},ga=new Set([`nav`,`playback`,`state`,`pong`]),_a=16,va=e=>ga.has(e.t),ya=e=>{if(typeof e!=`string`||e.length===0||e.length>1024||!e.startsWith(`/`)||e.startsWith(`//`)||e.includes(`\\`))return;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return}let t=e.split(/[?#]/,1)[0]??``;if(!(t===`/party`||t.startsWith(`/party/`)))return e},ba=(e,t)=>{let n=t.startsWith(`?`)?t.slice(1):t;if(e===`/watch`){let t=new URLSearchParams(n);t.delete(`t`);let r=t.toString();return ya(r?`${e}?${r}`:e)}return ya(n?`${e}?${n}`:e)},xa=e=>{if(!e)return;let t=e.indexOf(`?`);if((t===-1?e:e.slice(0,t))===`/watch`&&t!==-1)return new URLSearchParams(e.slice(t+1)).get(`v`)||void 0},Sa=e=>{if(typeof e==`string`)return e.replace(/\s+/g,` `).trim().slice(0,32).trim()||void 0},Ca=e=>{if(typeof e==`string`)return e.replace(/\s+/g,` `).trim().slice(0,500).trim()||void 0},wa=e=>typeof e==`number`&&Number.isFinite(e),Ta=e=>{if(!e||typeof e!=`object`)return;let t=e;if(typeof t.paused==`boolean`&&!(!wa(t.time)||t.time<0)&&!(!wa(t.rate)||t.rate<=0||t.rate>_a)&&!(!wa(t.at)||t.at<0))return{paused:t.paused,time:t.time,rate:t.rate,at:t.at}},Ea=e=>JSON.stringify(e),Da=e=>{let t;try{t=JSON.parse(e)}catch{return}if(!t||typeof t!=`object`)return;let n=t;switch(n.t){case`nav`:{let e=ya(n.path);return e?{t:`nav`,path:e}:void 0}case`playback`:{let e=Ta(n.s);return e?{t:`playback`,s:e}:void 0}case`state`:{let e=ya(n.path);if(!e)return;if(n.s===void 0)return{t:`state`,path:e};let t=Ta(n.s);return t?{t:`state`,path:e,s:t}:void 0}case`chat`:{let e=Ca(n.text);return e?{t:`chat`,text:e}:void 0}case`name`:{let e=Sa(n.name);return e?{t:`name`,name:e}:void 0}case`social`:return typeof n.p==`string`&&n.p.length>0&&n.p.length<=3500?{t:`social`,p:n.p}:void 0;case`ping`:return!Number.isInteger(n.n)||!wa(n.at)||n.at<0?void 0:{t:`ping`,n:n.n,at:n.at};case`pong`:return!Number.isInteger(n.n)||!wa(n.at)||n.at<0||!wa(n.host)||n.host<0?void 0:{t:`pong`,n:n.n,at:n.at,host:n.host};default:return}},Oa=`yt-client:party-invite`,ka=`yt-client:party-name`,Aa=1e4,ja=3e4,Ma=6e4,Na=64,Pa=()=>{try{return globalThis.sessionStorage}catch{return}},Fa=e=>e instanceof Error&&typeof e.code==`string`,Q=((e,t=Pa(),n)=>{let r={status:`idle`},i,a,o,s,c=[],l=0,u=`/`,d,f,p,m,h,g=new Set,_=new Set,v=new Set,y=new Map,b,x=new Map,S=[],C=1,w=!0,T,E,D=new Map,O=1,k=(()=>{try{return Sa(t?.getItem(`yt-client:party-name`)??void 0)}catch{return}})(),A=e=>{r=e;for(let e of Array.from(g))e(r)},j=()=>{r.status===`active`&&A({...r})},ee=()=>{for(let e of Array.from(v))e()},te=e=>{let t=o?.of(e);return t?.identity?t:void 0},ne=e=>{let t=te(e),n=t?.identity;if(n){if(t.status===`friend`&&n.nickname?.trim())return n.nickname.trim();if(n.displayName.trim())return n.displayName.trim();if(n.name)return n.name}return x.get(e)},M=e=>{try{t?.setItem(Oa,e)}catch{}},re=()=>{try{t?.removeItem(Oa)}catch{}},ie=()=>{try{return t?.getItem(`yt-client:party-invite`)??void 0}catch{return}},N=(e,t)=>{for(let n of Array.from(_))n(e,t)},ae=e=>{i&&r.status===`active`&&(va(e)&&r.role!==`host`||i.send(Ea(e)).catch(()=>{}))},oe=()=>({t:`state`,path:u,...d?{s:oa(d,f??Date.now(),Date.now())}:{}}),se=async e=>{let t=await e.members().catch(()=>void 0);i===e&&r.status===`active`&&t&&A({...r,members:t.length})},ce=()=>{if(!i||r.status!==`active`||r.role!==`guest`)return;let e=i,t=[];E=t;for(let n=0;n<5;n++)setTimeout(()=>{if(E!==t||i!==e)return;let n=Date.now(),r=O++;D.set(r,n),setTimeout(()=>D.delete(r),$i),ae({t:`ping`,n:r,at:n})},n*400);setTimeout(()=>{if(E!==t||i!==e)return;E=void 0;let n=ta(t);n&&(T=n)},2e3+$i)},le=()=>{clearInterval(p),clearInterval(m),clearInterval(h),p=void 0,m=void 0,h=void 0,E=void 0,T=void 0,D.clear(),y.clear(),b=void 0,x.clear(),S.length=0,w=!0;let e=a;a=void 0,i=void 0,e?.(),s?.(),s=void 0;let t=o;o=void 0,c=[],t&&(t.detach().catch(()=>{}),ee())},ue=async e=>{let t=i;le(),re(),A({status:`ended`,reason:e}),await t?.leave().catch(()=>{})},de=async(e,t)=>{if(t!==l){await e.leave().catch(()=>{});return}i=e;let u=e.owner===e.self.id?`host`:`guest`;M(e.invite),A({status:`active`,role:u,invite:e.invite,roomId:e.id,self:e.self.id,owner:e.owner,members:1});let d=await e.on(t=>{if(i!==e||r.status!==`active`)return;if(t.type===`joined`){o?.memberJoined(t.member.id),se(e),u===`host`&&ae(oe()),k&&ae({t:`name`,name:k});return}if(t.type===`left`){if(o?.memberLeft(t.id),u===`guest`&&t.id===e.owner){ue(`host-left`);return}x.delete(t.id),se(e);return}if(t.type!==`message`)return;let{from:n,text:a}=t.message,s=Da(a);if(!s||va(s)&&n!==e.owner)return;let l=n===e.self.id;if(s.t===`social`){o?o.ingest(n,s.p,t.message.at,t.message.seq):c.length<Na&&c.push({from:n,frame:s.p,at:t.message.at,seq:t.message.seq});return}if(s.t===`name`){x.set(n,s.name),j();return}if(s.t===`ping`){u===`host`&&!l&&ae({t:`pong`,n:s.n,at:s.at,host:Date.now()});return}if(s.t===`pong`){let e=D.get(s.n);if(e===void 0)return;D.delete(s.n);let t=ea(e,s.host,Date.now());t.rtt>=0&&t.rtt<1e4&&(E?.push(t),(!T||t.rtt<T.rtt)&&(T=t));return}if(s.t===`chat`&&(S.push({id:C++,from:n,self:l,name:l?k:x.get(n),text:s.text,at:Date.now()}),S.length>200&&S.splice(0,S.length-200),j()),s.t===`nav`)y.set(`nav`,s),y.delete(`playback`),b?.path!==s.path&&(b=void 0);else if(s.t===`state`)y.set(`state`,s),b=s.s?{path:s.path,state:s.s}:void 0;else if(s.t===`playback`){y.set(`playback`,s);let e=fe();e&&(b={path:e,state:s.s})}N(s,{from:n,self:l,replayed:t.replayed})});if(t!==l||i!==e){d(),await e.leave().catch(()=>{});return}if(a=d,se(e),e.closed.then(t=>{if(i!==e)return;le(),re();let n=t.reason===`removed`||t.reason===`blocked`||t.reason===`left`?t.reason:`closed`;A({status:`ended`,reason:n})}),k&&(x.set(e.self.id,k),ae({t:`name`,name:k})),m=setInterval(()=>{k&&ae({t:`name`,name:k})},ja),u===`host`?(ae(oe()),p=setInterval(()=>ae(oe()),Aa)):(ce(),h=setInterval(ce,Ma)),n){c=[];let t=e;n.attach({roomId:e.id,selfMemberId:e.self.id,send:e=>ae({t:`social`,p:e})}).then(async n=>{if(i!==t){await n.detach().catch(()=>{});return}o=n,s=n.on(()=>ee());let r=await e.members().catch(()=>[]);if(i===t&&o===n){for(let t of r)t.id!==e.self.id&&n.memberJoined(t.id);for(let e of c.splice(0))n.ingest(e.from,e.frame,e.at,e.seq);ee()}},()=>{})}},P=async(t,n,r=!1)=>{let a=++l;if(i){let e=i;le(),re(),await e.leave().catch(()=>{})}if(a===l){A({status:`joining`,invite:t??``});try{let t=await e();if(a!==l)return;let r=await n(t);await de(r,a)}catch(e){if(a!==l)return;if(re(),r){A({status:`idle`});return}A({status:`failed`,code:Fa(e)?e.code:`unknown`})}}},fe=()=>{if(r.status===`active`&&r.role===`host`)return u;let e=y.get(`nav`);if(e?.t===`nav`)return e.path;let t=y.get(`state`);return t?.t===`state`?t.path:void 0};return{getState:()=>r,subscribe:e=>(g.add(e),()=>{g.delete(e)}),onMessage:e=>(_.add(e),()=>{_.delete(e)}),onPresence:e=>(v.add(e),()=>{v.delete(e)}),create:()=>P(void 0,e=>e.create()),join:e=>P(e,t=>t.join(e)),resume:async()=>{let e=ie();e&&!i&&r.status!==`joining`&&await P(e,t=>t.join(e),!0)},leave:async()=>{l+=1,i?await ue(`left`):r.status===`joining`&&(re(),A({status:`idle`}))},dismiss:()=>{(r.status===`ended`||r.status===`failed`)&&A({status:`idle`})},send:ae,setLocation:e=>{u=e},setPlayback:e=>{d=e,f=e?Date.now():void 0},hostPath:fe,hostPlayback:()=>b,hostClock:()=>T,following:()=>w,setFollowing:e=>{w!==e&&(w=e,j())},replay:()=>{if(i){w||(w=!0,j());for(let e of[`state`,`nav`,`playback`]){let t=y.get(e);t&&N(t,{from:i.owner,self:!1,replayed:!0})}}},chat:()=>S.map(e=>({...e,name:e.self?ne(e.from)??k??e.name:ne(e.from)??e.name})),name:()=>k,setName:e=>{k=Sa(e);try{k?t?.setItem(ka,k):t?.removeItem(ka)}catch{}i&&r.status===`active`&&(k?(x.set(i.self.id,k),ae({t:`name`,name:k})):x.delete(i.self.id),j())},nameOf:e=>ne(e),identityOf:e=>te(e),roster:async()=>{if(!i)return[];let e=i;return(await e.members().catch(()=>[])).map(t=>({id:t.id,name:ne(t.id),identity:te(t.id),host:t.id===e.owner,self:t.id===e.self.id}))},kick:async e=>{i&&r.status===`active`&&r.role===`host`&&await i.remove(e)},ban:async e=>{i&&r.status===`active`&&r.role===`host`&&await i.block(e)}}})(async()=>(await pt(),s(()=>import(`./assets/rooms-B91zuirR.js`),__vite__mapDeps([8,9,2,3,7]))),void 0,{attach:async e=>{await pt();let{social:t}=await s(async()=>{let{social:e}=await import(`./assets/social-bXt3vmd4.js`);return{social:e}},__vite__mapDeps([10,11,3,2,7]));return t.attach(e)}});I();var Ia=()=>{let[e,t]=F(()=>Q.getState());return P(()=>{let e=Q.subscribe(t);return t(Q.getState()),e},[]),e},La=()=>{let[e,t]=F(0);return P(()=>Q.onPresence(()=>t(e=>e+1)),[]),e},Ra=e=>{let t=L(e);t.current=e,P(()=>Q.onMessage((e,n)=>t.current(e,n)),[])};I();var za=V`
|
|
888
|
+
display: inline-flex;
|
|
889
|
+
align-items: center;
|
|
890
|
+
justify-content: center;
|
|
891
|
+
flex: none;
|
|
892
|
+
border-radius: 50%;
|
|
893
|
+
overflow: hidden;
|
|
894
|
+
border: 1px solid var(--border-strong);
|
|
895
|
+
background: var(--bg-chip);
|
|
896
|
+
color: var(--text-primary);
|
|
897
|
+
font-weight: 700;
|
|
898
|
+
line-height: 1;
|
|
899
|
+
user-select: none;
|
|
900
|
+
|
|
901
|
+
&[data-status='friend'] {
|
|
902
|
+
border-color: var(--membership);
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
&[data-status='rekeyed'] {
|
|
906
|
+
border-color: var(--danger);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
img {
|
|
910
|
+
width: 100%;
|
|
911
|
+
height: 100%;
|
|
912
|
+
object-fit: cover;
|
|
913
|
+
display: block;
|
|
914
|
+
}
|
|
915
|
+
`,Ba=typeof Intl<`u`&&`Segmenter`in Intl?new Intl.Segmenter(void 0,{granularity:`grapheme`}):void 0,Va=e=>{let t=(e.displayName.trim()||e.name).normalize(`NFC`);return((Ba?Ba.segment(t)[Symbol.iterator]().next().value?.segment:t.slice(0,1))||`?`).toUpperCase()},Ha=({participant:e,size:t=24})=>{let n=e?.identity??null,r=n?.avatar??n?.identicon??null,i=n?.avatar&&n?.identicon?n.identicon:null,[a,o]=F(!1),[s,c]=F(!1);if(P(()=>{o(!1),c(!1)},[r,i]),!e||!n)return null;let l=a?s?null:i:r,u=`${t/10}rem`;return U(`span`,{css:za,className:`party-avatar`,"data-status":e.status,style:{width:u,height:u,fontSize:`${Math.max(.9,t/22)}rem`},"aria-hidden":`true`,children:l?U(`img`,{src:l,alt:``,referrerPolicy:`no-referrer`,onError:()=>{a?c(!0):o(!0)}}):U(`span`,{children:Va(n)})})};I();var Ua=V`
|
|
916
|
+
position: relative;
|
|
917
|
+
display: flex;
|
|
918
|
+
align-items: center;
|
|
919
|
+
flex: none;
|
|
920
|
+
|
|
921
|
+
&.idle {
|
|
922
|
+
@media (max-width: 656px) {
|
|
923
|
+
display: none;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
`,Wa=V`
|
|
927
|
+
display: inline-flex;
|
|
928
|
+
align-items: center;
|
|
929
|
+
gap: 0.6rem;
|
|
930
|
+
height: 3.6rem;
|
|
931
|
+
padding: 0 1.2rem;
|
|
932
|
+
border: 1px solid var(--border-strong);
|
|
933
|
+
border-radius: 1.8rem;
|
|
934
|
+
background: transparent;
|
|
935
|
+
color: var(--text-primary);
|
|
936
|
+
font-size: 1.3rem;
|
|
937
|
+
font-weight: 500;
|
|
938
|
+
white-space: nowrap;
|
|
939
|
+
cursor: pointer;
|
|
940
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
941
|
+
|
|
942
|
+
&:hover,
|
|
943
|
+
&[aria-expanded='true'] {
|
|
944
|
+
background: var(--bg-hover);
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
&.live {
|
|
948
|
+
border-color: var(--membership);
|
|
949
|
+
color: var(--membership);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
&.ended {
|
|
953
|
+
border-color: var(--danger);
|
|
954
|
+
color: var(--danger);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
.count {
|
|
958
|
+
opacity: 0.85;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
@media (max-width: 1359px) {
|
|
962
|
+
padding: 0 1rem;
|
|
963
|
+
|
|
964
|
+
.label {
|
|
965
|
+
position: absolute;
|
|
966
|
+
width: 1px;
|
|
967
|
+
height: 1px;
|
|
968
|
+
overflow: hidden;
|
|
969
|
+
clip-path: inset(50%);
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
`,Ga=V`
|
|
973
|
+
width: 30rem;
|
|
974
|
+
padding: 1.4rem;
|
|
975
|
+
color: var(--text-primary);
|
|
976
|
+
font-size: 1.3rem;
|
|
977
|
+
|
|
978
|
+
.head {
|
|
979
|
+
display: flex;
|
|
980
|
+
align-items: center;
|
|
981
|
+
justify-content: space-between;
|
|
982
|
+
gap: 0.8rem;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
.title {
|
|
986
|
+
font-size: 1.4rem;
|
|
987
|
+
font-weight: 600;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
.meta {
|
|
991
|
+
color: var(--text-secondary);
|
|
992
|
+
font-size: 1.2rem;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
.avatars {
|
|
996
|
+
display: flex;
|
|
997
|
+
align-items: center;
|
|
998
|
+
gap: 0.4rem;
|
|
999
|
+
margin-top: 1rem;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
.avatars-member {
|
|
1003
|
+
display: inline-flex;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.avatars-more {
|
|
1007
|
+
font-size: 1.15rem;
|
|
1008
|
+
font-weight: 600;
|
|
1009
|
+
color: var(--text-secondary);
|
|
1010
|
+
padding-left: 0.2rem;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.message {
|
|
1014
|
+
margin-top: 0.6rem;
|
|
1015
|
+
color: var(--text-secondary);
|
|
1016
|
+
line-height: 1.4;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
.link-row {
|
|
1020
|
+
display: flex;
|
|
1021
|
+
align-items: center;
|
|
1022
|
+
gap: 0.6rem;
|
|
1023
|
+
margin-top: 1rem;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
.link-row input {
|
|
1027
|
+
flex: 1;
|
|
1028
|
+
min-width: 0;
|
|
1029
|
+
height: 3.4rem;
|
|
1030
|
+
padding: 0 1rem;
|
|
1031
|
+
border: 1px solid var(--border);
|
|
1032
|
+
border-radius: 0.8rem;
|
|
1033
|
+
background: var(--bg-input);
|
|
1034
|
+
color: var(--text-primary);
|
|
1035
|
+
font-size: 1.2rem;
|
|
1036
|
+
outline: none;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
.follow {
|
|
1040
|
+
display: flex;
|
|
1041
|
+
align-items: center;
|
|
1042
|
+
justify-content: space-between;
|
|
1043
|
+
gap: 0.8rem;
|
|
1044
|
+
margin-top: 1rem;
|
|
1045
|
+
cursor: pointer;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.follow input {
|
|
1049
|
+
width: 1.6rem;
|
|
1050
|
+
height: 1.6rem;
|
|
1051
|
+
accent-color: var(--accent);
|
|
1052
|
+
cursor: pointer;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.actions {
|
|
1056
|
+
display: flex;
|
|
1057
|
+
flex-wrap: wrap;
|
|
1058
|
+
gap: 0.8rem;
|
|
1059
|
+
margin-top: 1.2rem;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
button {
|
|
1063
|
+
display: inline-flex;
|
|
1064
|
+
align-items: center;
|
|
1065
|
+
gap: 0.5rem;
|
|
1066
|
+
height: 3.4rem;
|
|
1067
|
+
padding: 0 1.2rem;
|
|
1068
|
+
border: 1px solid var(--border-strong);
|
|
1069
|
+
border-radius: 1.7rem;
|
|
1070
|
+
background: var(--bg-chip);
|
|
1071
|
+
color: var(--text-primary);
|
|
1072
|
+
font-size: 1.3rem;
|
|
1073
|
+
font-weight: 500;
|
|
1074
|
+
cursor: pointer;
|
|
1075
|
+
transition: background 0.15s ease;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
button:hover {
|
|
1079
|
+
background: var(--bg-chip-hover);
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
button.danger {
|
|
1083
|
+
color: var(--danger);
|
|
1084
|
+
}
|
|
1085
|
+
`,Ka=e=>{switch(e){case`host-left`:return`Host ended the party.`;case`removed`:return`You were removed from the party.`;case`blocked`:return`You were blocked from this party.`;case`left`:return`You left the party.`;default:return`The party ended.`}},qa=e=>{switch(e){case`not-found`:return`That party has ended.`;case`full`:return`That party is full.`;case`blocked`:return`You are blocked from this party.`;case`invalid`:return`That invite link is invalid.`;case`unavailable`:return`Watch together is unavailable right now.`;default:return`Could not connect to the party.`}},Ja=()=>{let e=Ia(),t=La(),[,n]=Re(),[r,i]=F(!1),[a,o]=F([]),[s,c]=F(!1),l=L(null),d=L(null),f=L(null),p=L(void 0),m=N(()=>i(!1),[]);on({open:r,onClose:m,rootRef:l,panelRef:d,triggerRef:f}),P(()=>()=>clearTimeout(p.current),[]),P(()=>{e.status===`idle`&&i(!1)},[e.status]);let h=e.status===`active`?e.invite:void 0,g=h?ma(window.location.origin,h):``,_=async()=>{if(g)try{await navigator.clipboard.writeText(g),c(!0),clearTimeout(p.current),p.current=setTimeout(()=>c(!1),2e3)}catch{}},v=()=>{if(e.status===`idle`){i(!0),Q.create();return}i(e=>!e)},y=e.status===`active`,b=y?e.members:0;P(()=>{if(!r||!y){o([]);return}let e=!1;return Q.roster().then(t=>{e||o(t)}),()=>{e=!0}},[r,y,b,t]);let x=a.filter(e=>e.identity?.identity),C=()=>{if(!x.length)return;let e=x.slice(0,6),t=x.length-e.length;return z(`div`,{className:`avatars`,children:[e.map(e=>U(`span`,{className:`avatars-member`,title:e.name??e.id,children:U(Ha,{participant:e.identity,size:24})},e.id)),t>0?z(`span`,{className:`avatars-more`,children:[`+`,t]}):void 0]})},T=e.status===`ended`||e.status===`failed`,E=y?e.role===`host`?`Hosting`:`Following`:e.status===`joining`?`Joining…`:T?`Party ended`:`Watch together`;return z(`div`,{css:Ua,className:e.status===`idle`?`idle`:void 0,ref:l,children:[z(`button`,{ref:f,type:`button`,css:Wa,className:y?`live`:T?`ended`:void 0,"aria-haspopup":`dialog`,"aria-expanded":r,onClick:v,children:[U(y?u:Te,{size:18,strokeWidth:1.75}),U(`span`,{className:`label`,children:E}),y?U(`span`,{className:`count`,children:e.members}):void 0]}),r?U(nn,{label:`Watch together`,align:`end`,anchor:f,panelRef:d,children:U(`div`,{css:Ga,children:e.status===`joining`?z(B,{children:[U(`div`,{className:`title`,children:`Connecting…`}),U(`div`,{className:`actions`,children:U(`button`,{type:`button`,onClick:()=>{Q.leave(),m()},children:`Cancel`})})]}):y?z(B,{children:[z(`div`,{className:`head`,children:[U(`span`,{className:`title`,children:e.role===`host`?`Hosting`:`Following`}),U(`span`,{className:`meta`,children:e.members===1?`1 viewer`:`${e.members} viewers`})]}),C(),z(`div`,{className:`link-row`,children:[U(`input`,{readOnly:!0,value:g,"aria-label":`Invite link`,onFocus:e=>e.currentTarget.select()}),z(`button`,{type:`button`,onClick:()=>void _(),children:[U(s?w:k,{size:16,strokeWidth:1.75}),s?`Copied`:`Copy`]})]}),e.role===`guest`?z(`label`,{className:`follow`,children:[U(`span`,{children:`Follow host`}),U(`input`,{type:`checkbox`,checked:Q.following(),onChange:e=>Q.setFollowing(e.currentTarget.checked)})]}):void 0,z(`div`,{className:`actions`,children:[e.role===`guest`?z(`button`,{type:`button`,onClick:()=>{Q.replay(),m()},children:[U(S,{size:14,strokeWidth:1.75}),`Catch up`]}):void 0,U(`button`,{type:`button`,onClick:()=>{m(),n(ca)},children:`Manage`}),z(`button`,{type:`button`,className:`danger`,onClick:()=>{Q.leave(),m()},children:[U(ne,{size:14,strokeWidth:1.75}),e.role===`host`?`End`:`Leave`]})]})]}):T?z(B,{children:[U(`div`,{className:`title`,children:`Watch together`}),U(`div`,{className:`message`,children:e.status===`ended`?Ka(e.reason):qa(e.code)}),z(`div`,{className:`actions`,children:[U(`button`,{type:`button`,onClick:()=>{Q.dismiss(),Q.create()},children:`Start new`}),U(`button`,{type:`button`,onClick:()=>{Q.dismiss(),m()},children:`Dismiss`})]})]}):void 0})}):void 0]})},Ya=(e,t)=>{let n=e.trimStart().toLowerCase();return n.length===0||!t.toLowerCase().startsWith(n)?{typed:``,completion:t}:{typed:t.slice(0,n.length),completion:t.slice(n.length)}};I();var Xa=ft(`
|
|
1086
|
+
query SearchSuggestions($query: String!) {
|
|
1087
|
+
searchSuggestions(query: $query) { query name description photo channelId }
|
|
1088
|
+
}
|
|
1089
|
+
`),Za=60,Qa=V`
|
|
1090
|
+
display: flex;
|
|
1091
|
+
align-items: center;
|
|
1092
|
+
gap: 0.5rem;
|
|
1093
|
+
color: var(--text-primary);
|
|
1094
|
+
|
|
1095
|
+
.mark {
|
|
1096
|
+
display: block;
|
|
1097
|
+
flex: none;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.wordmark {
|
|
1101
|
+
font-size: 2rem;
|
|
1102
|
+
font-weight: 700;
|
|
1103
|
+
letter-spacing: -0.04em;
|
|
1104
|
+
line-height: 2.2rem;
|
|
1105
|
+
white-space: nowrap;
|
|
1106
|
+
}
|
|
1107
|
+
`,$a=()=>z(K,{href:`/`,css:Qa,"aria-label":`FTube home`,children:[z(`svg`,{className:`mark`,width:`30`,height:`21`,viewBox:`0 0 30 21`,"aria-hidden":`true`,children:[U(`path`,{d:`M29.37 3.28A3.77 3.77 0 0 0 26.72.62C24.38 0 15 0 15 0S5.62 0 3.28.62A3.77 3.77 0 0 0 .63 3.28C0 5.63 0 10.5 0 10.5s0 4.87.63 7.22a3.77 3.77 0 0 0 2.65 2.66C5.62 21 15 21 15 21s9.38 0 11.72-.62a3.77 3.77 0 0 0 2.65-2.66C30 15.37 30 10.5 30 10.5s0-4.87-.63-7.22Z`,fill:`#ff0000`}),U(`path`,{d:`M10.4 14.85V6.15L17.9 10.5l-7.5 4.35Z`,fill:`#ffffff`}),U(`path`,{d:`M18.6 6.75l3.2 3.75-3.2 3.75`,fill:`none`,stroke:`#ffffff`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:`0.9`})]}),U(`span`,{className:`wordmark`,children:`FTube`})]}),eo=V`
|
|
1108
|
+
position: fixed;
|
|
1109
|
+
top: 0;
|
|
1110
|
+
left: 0;
|
|
1111
|
+
right: 0;
|
|
1112
|
+
height: var(--header-height);
|
|
1113
|
+
z-index: var(--z-header);
|
|
1114
|
+
/* Two equal outer tracks keep the search box on the page's centre line, which
|
|
1115
|
+
a flex row cannot do once the two ends differ in width. */
|
|
1116
|
+
display: grid;
|
|
1117
|
+
grid-template-columns: 1fr minmax(0, 73.2rem) 1fr;
|
|
1118
|
+
align-items: center;
|
|
1119
|
+
padding: 0 1.6rem;
|
|
1120
|
+
background: var(--bg-base);
|
|
1121
|
+
|
|
1122
|
+
.start {
|
|
1123
|
+
position: relative;
|
|
1124
|
+
justify-self: start;
|
|
1125
|
+
display: flex;
|
|
1126
|
+
align-items: center;
|
|
1127
|
+
gap: 1.6rem;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
/* youtube.com's, measured on 2026-11-10: off the page until focused, then a 40 px pill 6 px after the logo and 12 px
|
|
1131
|
+
from the top, over whatever is there */
|
|
1132
|
+
.skip {
|
|
1133
|
+
position: absolute;
|
|
1134
|
+
top: -1000px;
|
|
1135
|
+
left: calc(100% + 0.6rem);
|
|
1136
|
+
z-index: 1;
|
|
1137
|
+
height: 4rem;
|
|
1138
|
+
padding: 0 1.4rem;
|
|
1139
|
+
border: 2px solid var(--text-primary);
|
|
1140
|
+
border-radius: 2rem;
|
|
1141
|
+
background: var(--bg-base);
|
|
1142
|
+
color: var(--text-primary);
|
|
1143
|
+
font-size: 1.4rem;
|
|
1144
|
+
font-weight: 500;
|
|
1145
|
+
white-space: nowrap;
|
|
1146
|
+
outline: none;
|
|
1147
|
+
cursor: pointer;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
.skip:focus {
|
|
1151
|
+
top: 0.4rem;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
.icon-button {
|
|
1155
|
+
flex: none;
|
|
1156
|
+
width: 4rem;
|
|
1157
|
+
height: 4rem;
|
|
1158
|
+
display: flex;
|
|
1159
|
+
align-items: center;
|
|
1160
|
+
justify-content: center;
|
|
1161
|
+
border: none;
|
|
1162
|
+
border-radius: 50%;
|
|
1163
|
+
background: transparent;
|
|
1164
|
+
color: var(--text-primary);
|
|
1165
|
+
cursor: pointer;
|
|
1166
|
+
transition: background 0.15s ease;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
.icon-button:hover {
|
|
1170
|
+
background: var(--bg-hover);
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.back,
|
|
1174
|
+
.open-search {
|
|
1175
|
+
display: none;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
.search {
|
|
1179
|
+
display: flex;
|
|
1180
|
+
align-items: center;
|
|
1181
|
+
margin: 0 4rem;
|
|
1182
|
+
min-width: 0;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
.search-box {
|
|
1186
|
+
flex: 1;
|
|
1187
|
+
/* Anchors the suggestion list, which hangs below the box rather than
|
|
1188
|
+
participating in the header's own row layout. */
|
|
1189
|
+
position: relative;
|
|
1190
|
+
display: flex;
|
|
1191
|
+
align-items: center;
|
|
1192
|
+
min-width: 0;
|
|
1193
|
+
height: 4rem;
|
|
1194
|
+
background: var(--bg-input);
|
|
1195
|
+
border: 1px solid var(--border);
|
|
1196
|
+
border-radius: 4rem 0 0 4rem;
|
|
1197
|
+
padding-left: 1.6rem;
|
|
1198
|
+
transition: border-color 0.15s ease;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.search-icon {
|
|
1202
|
+
display: none;
|
|
1203
|
+
flex: none;
|
|
1204
|
+
margin-right: 1.2rem;
|
|
1205
|
+
color: var(--text-primary);
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
.search-box:focus-within .search-icon {
|
|
1209
|
+
display: block;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
.clear {
|
|
1213
|
+
flex: none;
|
|
1214
|
+
width: 4rem;
|
|
1215
|
+
height: 3.8rem;
|
|
1216
|
+
display: flex;
|
|
1217
|
+
align-items: center;
|
|
1218
|
+
justify-content: center;
|
|
1219
|
+
border: none;
|
|
1220
|
+
border-radius: 50%;
|
|
1221
|
+
background: transparent;
|
|
1222
|
+
color: var(--text-primary);
|
|
1223
|
+
cursor: pointer;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
.clear:hover {
|
|
1227
|
+
background: var(--bg-hover);
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
.search-box input:placeholder-shown ~ .clear {
|
|
1231
|
+
display: none;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
.suggestions {
|
|
1235
|
+
position: absolute;
|
|
1236
|
+
top: calc(100% + 0.4rem);
|
|
1237
|
+
left: -1px;
|
|
1238
|
+
right: -1px;
|
|
1239
|
+
z-index: var(--z-popup);
|
|
1240
|
+
margin: 0;
|
|
1241
|
+
padding: 0.8rem 0;
|
|
1242
|
+
list-style: none;
|
|
1243
|
+
border-radius: 1.2rem;
|
|
1244
|
+
background: var(--bg-menu);
|
|
1245
|
+
box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
|
|
1246
|
+
max-height: 60vh;
|
|
1247
|
+
overflow-y: auto;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
.suggestion {
|
|
1251
|
+
display: flex;
|
|
1252
|
+
align-items: center;
|
|
1253
|
+
gap: 1.2rem;
|
|
1254
|
+
padding: 0.6rem 1.6rem;
|
|
1255
|
+
color: var(--text-primary);
|
|
1256
|
+
font-size: 1.6rem;
|
|
1257
|
+
cursor: pointer;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
.suggestion:hover,
|
|
1261
|
+
.suggestion.active {
|
|
1262
|
+
background: var(--bg-hover);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
.entity {
|
|
1266
|
+
display: flex;
|
|
1267
|
+
flex-direction: column;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
.entity-description {
|
|
1271
|
+
font-size: 1.2rem;
|
|
1272
|
+
line-height: 1.8rem;
|
|
1273
|
+
color: var(--text-secondary);
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
/* youtube.com's, measured on 2026-11-10: 30 px, its right edge 48 px in from the list's, a channel's round and any
|
|
1277
|
+
other's with 4 px corners */
|
|
1278
|
+
.entity-photo {
|
|
1279
|
+
flex: none;
|
|
1280
|
+
width: 3rem;
|
|
1281
|
+
height: 3rem;
|
|
1282
|
+
margin: 0 3.2rem 0 auto;
|
|
1283
|
+
border-radius: 0.4rem;
|
|
1284
|
+
object-fit: cover;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
.entity-photo.channel {
|
|
1288
|
+
border-radius: 50%;
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
.search-box:focus-within {
|
|
1292
|
+
border-color: var(--accent-focus);
|
|
1293
|
+
box-shadow: inset 0 0.1rem 0.2rem rgba(0, 0, 0, 0.3);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
.search-box input {
|
|
1297
|
+
flex: 1;
|
|
1298
|
+
min-width: 0;
|
|
1299
|
+
background: transparent;
|
|
1300
|
+
border: none;
|
|
1301
|
+
outline: none;
|
|
1302
|
+
color: var(--text-primary);
|
|
1303
|
+
font-size: 1.6rem;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
.search-box input::placeholder {
|
|
1307
|
+
color: var(--text-placeholder);
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
.search-button {
|
|
1311
|
+
flex: none;
|
|
1312
|
+
width: 6.4rem;
|
|
1313
|
+
height: 4rem;
|
|
1314
|
+
display: flex;
|
|
1315
|
+
align-items: center;
|
|
1316
|
+
justify-content: center;
|
|
1317
|
+
background: var(--bg-input-button);
|
|
1318
|
+
border: 1px solid var(--border);
|
|
1319
|
+
border-left: none;
|
|
1320
|
+
border-radius: 0 4rem 4rem 0;
|
|
1321
|
+
color: var(--text-primary);
|
|
1322
|
+
cursor: pointer;
|
|
1323
|
+
transition: background 0.15s ease;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
.search-button:hover {
|
|
1327
|
+
background: var(--bg-chip-hover);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
.end {
|
|
1331
|
+
display: flex;
|
|
1332
|
+
align-items: center;
|
|
1333
|
+
justify-content: flex-end;
|
|
1334
|
+
gap: 0.8rem;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
.sign-in {
|
|
1338
|
+
display: flex;
|
|
1339
|
+
align-items: center;
|
|
1340
|
+
gap: 0.8rem;
|
|
1341
|
+
height: 3.6rem;
|
|
1342
|
+
padding: 0 1.5rem;
|
|
1343
|
+
border: 1px solid var(--border-strong);
|
|
1344
|
+
border-radius: 1.8rem;
|
|
1345
|
+
background: transparent;
|
|
1346
|
+
color: var(--accent);
|
|
1347
|
+
font-size: 1.4rem;
|
|
1348
|
+
font-weight: 500;
|
|
1349
|
+
white-space: nowrap;
|
|
1350
|
+
cursor: pointer;
|
|
1351
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
.sign-in:hover {
|
|
1355
|
+
background: var(--accent-hover);
|
|
1356
|
+
border-color: transparent;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
.pending-bell,
|
|
1360
|
+
.pending-avatar {
|
|
1361
|
+
flex: none;
|
|
1362
|
+
width: 3.2rem;
|
|
1363
|
+
height: 3.2rem;
|
|
1364
|
+
border-radius: 50%;
|
|
1365
|
+
background: var(--bg-chip);
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
/* the bell's button is 4rem wide */
|
|
1369
|
+
.pending-bell {
|
|
1370
|
+
margin: 0 0.4rem;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
@media (max-width: 792px) {
|
|
1374
|
+
.search {
|
|
1375
|
+
margin: 0 1.6rem;
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
/* youtube.com's narrow masthead, from the same width (measured 2026-11-09):
|
|
1380
|
+
the box gives way to a search icon that opens it across the whole row,
|
|
1381
|
+
behind a back button. */
|
|
1382
|
+
@media (max-width: 656px) {
|
|
1383
|
+
display: flex;
|
|
1384
|
+
padding: 0 0.8rem;
|
|
1385
|
+
|
|
1386
|
+
.search {
|
|
1387
|
+
display: none;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
.open-search {
|
|
1391
|
+
display: flex;
|
|
1392
|
+
margin-left: auto;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
&.search-open .start,
|
|
1396
|
+
&.search-open .end,
|
|
1397
|
+
&.search-open .open-search {
|
|
1398
|
+
display: none;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
&.search-open .back {
|
|
1402
|
+
display: flex;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
&.search-open .search {
|
|
1406
|
+
display: flex;
|
|
1407
|
+
flex: 1;
|
|
1408
|
+
margin: 0 0 0 4rem;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
/* The narrow row needs 395px signed out (measured 2026-11-10), and youtube.com
|
|
1413
|
+
keeps Sign in whole at 360px, the most common phone width. */
|
|
1414
|
+
@media (max-width: 399px) {
|
|
1415
|
+
.start {
|
|
1416
|
+
gap: 0.8rem;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
.end {
|
|
1420
|
+
gap: 0;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
`,to=()=>{let e=lt();return e.ready?e.signedIn?z(B,{children:[U(Qi,{}),U(ri,{name:e.name,avatar:e.avatar,handle:e.handle,accounts:e.accounts})]}):z(`button`,{type:`button`,className:`sign-in`,onClick:W,children:[U(m,{size:24,strokeWidth:1.5}),`Sign in`]}):z(B,{children:[U(`span`,{className:`pending-bell`,"aria-hidden":`true`}),U(`span`,{className:`pending-avatar`,"aria-hidden":`true`})]})},no=({onMenu:e,onSkip:t})=>{let[,n]=Re(),r=$e(),i=L(null),[a,o]=F(void 0),[s,c]=F(``),[l,u]=F(!1),[d,f]=F(-1),[p,m]=F(!1),[g,_]=F(()=>document.documentElement.dataset.engine===`ready`);P(()=>{if(g)return;let e=()=>{document.documentElement.dataset.engine===`ready`&&(_(!0),t.disconnect())},t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-engine`]}),e(),()=>t.disconnect()},[g]),P(()=>{let e=e=>{if(e.key!==`/`||e.defaultPrevented)return;let t=e.target;(!t||t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`&&!t.isContentEditable)&&(e.preventDefault(),i.current?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),P(()=>{p&&i.current?.focus()},[p]),P(()=>{let e=window.matchMedia(`(max-width: 656px)`),t=()=>{e.matches||m(!1)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),P(()=>{if(a===void 0)return;let e=setTimeout(()=>c(a.trim()),Za);return()=>clearTimeout(e)},[a]);let[{data:v}]=_t({query:Xa,variables:{query:s},pause:!g||s.length===0||!l}),y=l&&s.length>0?v?.searchSuggestions??[]:[],b=new URLSearchParams(r).get(`search_query`)??void 0,x=e=>{let t=e.trim();t&&(u(!1),f(-1),o(void 0),n(`/results?search_query=${encodeURIComponent(t)}`))};return z(`header`,{css:eo,className:p?`search-open`:void 0,children:[z(`div`,{className:`start`,children:[U(`button`,{type:`button`,className:`icon-button`,"aria-label":`Guide`,onClick:e,children:U(Ce,{size:24,strokeWidth:1.5})}),U($a,{}),U(`button`,{type:`button`,className:`skip`,onClick:t,children:`Skip navigation`})]}),U(`button`,{type:`button`,className:`icon-button back`,"aria-label":`Back`,onClick:()=>m(!1),children:U(ee,{size:24,strokeWidth:1.5})}),z(`form`,{className:`search`,role:`search`,onSubmit:e=>{e.preventDefault(),x(i.current?.value??``)},children:[z(`div`,{className:`search-box`,children:[U(h,{className:`search-icon`,size:20,strokeWidth:1.5,"aria-hidden":`true`}),U(`input`,{ref:i,name:`search_query`,type:`text`,placeholder:`Search`,"aria-label":`Search`,defaultValue:b,autoComplete:`off`,role:`combobox`,"aria-expanded":y.length>0,"aria-controls":`search-suggestions`,"aria-autocomplete":`list`,"aria-activedescendant":d===-1?void 0:`suggestion-${d}`,onInput:e=>{o(e.currentTarget.value),u(!0),f(-1)},onFocus:()=>u(!0),onBlur:()=>setTimeout(()=>u(!1),120),onKeyDown:e=>{if(y.length!==0){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1,n=d+t,r=n<-1?y.length-1:n>=y.length?-1:n;f(r),i.current&&(i.current.value=r===-1?a??``:y[r]?.query??``);return}if(e.key===`Escape`&&d!==-1){e.preventDefault(),f(-1),i.current&&(i.current.value=a??``);return}e.key===`Escape`&&u(!1)}}},b??``),U(`button`,{type:`button`,className:`clear`,"aria-label":`Clear search query`,onClick:()=>{let e=i.current;e&&(e.value=``,o(``),f(-1),e.focus())},children:U(ye,{size:24,strokeWidth:1.5})}),y.length>0?U(`ul`,{className:`suggestions`,id:`search-suggestions`,role:`listbox`,children:y.map((e,t)=>{let n=Ya(a??s,e.query);return z(`li`,{id:`suggestion-${t}`,role:`option`,"aria-label":e.query,"aria-selected":t===d,className:t===d?`suggestion active`:`suggestion`,onPointerDown:t=>{t.preventDefault(),x(e.query)},children:[U(h,{size:16,strokeWidth:1.5}),e.name?z(`span`,{className:`entity`,children:[U(`b`,{children:e.name}),e.description?U(`span`,{className:`entity-description`,children:e.description}):void 0]}):z(`span`,{children:[n.typed,U(`b`,{children:n.completion})]}),e.photo?U(`img`,{className:e.channelId?`entity-photo channel`:`entity-photo`,src:e.photo,alt:``,referrerpolicy:`no-referrer`}):void 0]},e.query)})}):void 0]}),U(`button`,{type:`submit`,className:`search-button`,"aria-label":`Search`,children:U(h,{size:24,strokeWidth:1.5})})]}),U(`button`,{type:`button`,className:`icon-button open-search`,"aria-label":`Search`,onClick:()=>m(!0),children:U(h,{size:24,strokeWidth:1.5})}),z(`div`,{className:`end`,children:[U(ui,{}),U(Ja,{}),U(Gi,{}),U(to,{})]})]})};I();var ro=ft(`
|
|
1424
|
+
query GuideSubscriptions {
|
|
1425
|
+
subscribedChannels {
|
|
1426
|
+
id
|
|
1427
|
+
name
|
|
1428
|
+
avatar
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
`),io=[{label:`Home`,href:`/`,Icon:Ee,match:`/`},{label:`Shorts`,href:`/shorts`,Icon:j},{label:`Subscriptions`,href:`/feed/subscriptions`,Icon:l,match:`/feed/subscriptions`}],ao={label:`You`,href:`/feed/you`,Icon:m,match:`/feed/you`},oo={label:`History`,href:`/feed/history`,Icon:se,match:`/feed/history`},so={label:`Downloads`,href:`/downloads`,Icon:oe,match:`/downloads`},co=[ao,oo,so],lo=[oo,{label:`Playlists`,href:`/feed/playlists`,Icon:fe,match:`/feed/playlists`},{label:`Watch later`,href:Wt(`WL`),Icon:Me,match:Wt(`WL`)},so,{label:`Liked videos`,href:Wt(`LL`),Icon:le,match:Wt(`LL`)}],uo=(e,t,n)=>({label:e,href:`/channel/${t}`,Icon:n,match:`/channel/${t}`}),fo=[uo(`Music`,`UC-9-kyTW8ZkZNDHQJ6FgpwQ`,Pe),uo(`Live`,`UC4R8DWoMoI7CAwX8_LjQHig`,u),uo(`Gaming`,`UCOpNcN46UbXVtpKMrmU4Abg`,Se),uo(`News`,`UCYfdidRxbB8Qhf0Nx7ioOYw`,O),uo(`Sports`,`UCEgdi0XIXXZ-qJOFPf4JSKw`,Oe)],po=[...io,ao],mo=(e,t,n)=>{if(e===void 0)return!1;let r=n.startsWith(`?`)?n.slice(1):n,i=e.includes(`?`)&&r?`${t}?${r}`:t;return i===e||i.startsWith(`${e}/`)},ho=({entry:e})=>{let[t]=Re(),n=$e(),r=mo(e.match,t,n);return z(K,{href:e.href,className:r?`item active`:`item`,"aria-current":r?`page`:void 0,onPointerDown:e.href===`/shorts`?()=>{Tn().catch(()=>{})}:void 0,children:[U(e.Icon,{size:24,strokeWidth:1.5}),U(`span`,{className:`label`,children:e.label})]})},go=()=>{let{signedIn:e}=lt(),[t]=Re(),[{data:n}]=_t({query:ro,pause:!e}),r=n?.subscribedChannels??[];if(!e||r.length===0)return null;let i=mo(`/feed/channels`,t,``);return z(`div`,{className:`section`,children:[z(K,{href:`/feed/channels`,className:i?`section-title section-link active`:`section-title section-link`,"aria-current":i?`page`:void 0,children:[`Subscriptions`,U(d,{size:20,strokeWidth:1.5})]}),r.map(e=>{let n=`/channel/${e.id}`,r=mo(n,t,``);return z(K,{href:n,className:r?`item active`:`item`,"aria-current":r?`page`:void 0,children:[e.avatar?U(`img`,{className:`avatar`,src:e.avatar,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`}):U(`span`,{className:`avatar fallback`,"aria-hidden":`true`,children:e.name.slice(0,1).toUpperCase()}),U(`span`,{className:`label channel-name`,children:e.name})]},e.id)})]})},_o=()=>{let e=Rr(),[t,n]=Re(),[r,i]=F(!1),[a,o]=F([]),s=new Set(a),c=kr(e),l=[],u;for(let e of c){if(u!==void 0){if(e.depth>u)continue;u=void 0}l.push(e),e.hasChildren&&s.has(e.group.id)&&(u=e.depth)}let f=e=>{o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])};return z(`div`,{className:`section`,children:[z(K,{href:`/feed/groups`,className:`section-title section-link`,children:[`Groups`,U(d,{size:20,strokeWidth:1.5})]}),l.map(({group:e,depth:n,hasChildren:r})=>{let i=xr(e.id),a=t===i,o=s.has(e.id);return z(`div`,{className:n>0?`group-row nested`:`group-row`,"data-depth":n,style:n>0?{paddingLeft:`${Math.min(n,4)*1.6}rem`}:void 0,children:[z(K,{href:i,className:a?`item active`:`item`,"aria-current":a?`page`:void 0,children:[U(`span`,{className:`emoji`,"aria-hidden":`true`,children:e.emoji}),U(`span`,{className:`label channel-name`,children:e.name})]}),r?U(`button`,{type:`button`,className:`folder-toggle`,"aria-label":o?`Expand ${e.name}`:`Collapse ${e.name}`,"aria-expanded":!o,onClick:()=>f(e.id),children:U(o?d:me,{size:16,strokeWidth:1.5})}):void 0]},e.id)}),e.length===0?z(`button`,{type:`button`,className:`item`,onClick:()=>i(!0),children:[U(pe,{size:24,strokeWidth:1.5}),U(`span`,{className:`label`,children:`New group`})]}):void 0,r?U(ei,{onClose:()=>i(!1),onSaved:e=>n(xr(e.id))}):void 0]})},vo=()=>{let[e]=Re(),t=mo(ao.match,e,``);return z(K,{href:ao.href,className:t?`section-title section-link active`:`section-title section-link`,"aria-current":t?`page`:void 0,children:[`You`,U(d,{size:20,strokeWidth:1.5})]})},yo=V`
|
|
1432
|
+
.section {
|
|
1433
|
+
padding-bottom: 1.2rem;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
.section + .section {
|
|
1437
|
+
border-top: 1px solid var(--border-subtle);
|
|
1438
|
+
margin-top: 1.2rem;
|
|
1439
|
+
padding-top: 1.2rem;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
.section-title {
|
|
1443
|
+
padding: 0.6rem 1.2rem;
|
|
1444
|
+
font-size: 1.6rem;
|
|
1445
|
+
font-weight: 500;
|
|
1446
|
+
color: var(--text-primary);
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
.section-link {
|
|
1450
|
+
display: flex;
|
|
1451
|
+
align-items: center;
|
|
1452
|
+
gap: 0.8rem;
|
|
1453
|
+
width: fit-content;
|
|
1454
|
+
border-radius: 1rem;
|
|
1455
|
+
transition: background 0.15s ease;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
.section-link:hover {
|
|
1459
|
+
background: var(--bg-hover);
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
.section-link.active {
|
|
1463
|
+
background: var(--bg-selected);
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
.item {
|
|
1467
|
+
display: flex;
|
|
1468
|
+
align-items: center;
|
|
1469
|
+
gap: 2.4rem;
|
|
1470
|
+
height: 4rem;
|
|
1471
|
+
padding: 0 1.2rem;
|
|
1472
|
+
border-radius: 1rem;
|
|
1473
|
+
color: var(--text-primary);
|
|
1474
|
+
font-size: 1.4rem;
|
|
1475
|
+
font-weight: 400;
|
|
1476
|
+
white-space: nowrap;
|
|
1477
|
+
transition: background 0.15s ease;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
button.item {
|
|
1481
|
+
width: 100%;
|
|
1482
|
+
border: none;
|
|
1483
|
+
background: transparent;
|
|
1484
|
+
font-family: inherit;
|
|
1485
|
+
text-align: left;
|
|
1486
|
+
cursor: pointer;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
.item svg {
|
|
1490
|
+
flex: none;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
.emoji {
|
|
1494
|
+
flex: none;
|
|
1495
|
+
width: 2.4rem;
|
|
1496
|
+
font-size: 2rem;
|
|
1497
|
+
line-height: 2.4rem;
|
|
1498
|
+
text-align: center;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
.item:hover {
|
|
1502
|
+
background: var(--bg-hover);
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
.item.active {
|
|
1506
|
+
background: var(--bg-selected);
|
|
1507
|
+
font-weight: 500;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
.group-row {
|
|
1511
|
+
display: flex;
|
|
1512
|
+
align-items: center;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
.group-row .item {
|
|
1516
|
+
flex: 1;
|
|
1517
|
+
min-width: 0;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
.group-row.nested .item {
|
|
1521
|
+
gap: 1.2rem;
|
|
1522
|
+
height: 3.6rem;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
.folder-toggle {
|
|
1526
|
+
flex: none;
|
|
1527
|
+
width: 2.8rem;
|
|
1528
|
+
height: 2.8rem;
|
|
1529
|
+
display: flex;
|
|
1530
|
+
align-items: center;
|
|
1531
|
+
justify-content: center;
|
|
1532
|
+
border: none;
|
|
1533
|
+
border-radius: 50%;
|
|
1534
|
+
background: transparent;
|
|
1535
|
+
color: var(--text-secondary);
|
|
1536
|
+
cursor: pointer;
|
|
1537
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
.folder-toggle:hover {
|
|
1541
|
+
background: var(--bg-hover);
|
|
1542
|
+
color: var(--text-primary);
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
.avatar {
|
|
1546
|
+
flex: none;
|
|
1547
|
+
width: 2.4rem;
|
|
1548
|
+
height: 2.4rem;
|
|
1549
|
+
border-radius: 50%;
|
|
1550
|
+
object-fit: cover;
|
|
1551
|
+
background: var(--bg-chip);
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
.avatar.fallback {
|
|
1555
|
+
display: flex;
|
|
1556
|
+
align-items: center;
|
|
1557
|
+
justify-content: center;
|
|
1558
|
+
font-size: 1.2rem;
|
|
1559
|
+
font-weight: 500;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
.channel-name {
|
|
1563
|
+
min-width: 0;
|
|
1564
|
+
overflow: hidden;
|
|
1565
|
+
text-overflow: ellipsis;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
.sign-in-note {
|
|
1569
|
+
margin: 0 1.2rem 1.2rem;
|
|
1570
|
+
font-size: 1.4rem;
|
|
1571
|
+
line-height: 2rem;
|
|
1572
|
+
color: var(--text-primary);
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
.sign-in {
|
|
1576
|
+
display: flex;
|
|
1577
|
+
align-items: center;
|
|
1578
|
+
gap: 0.8rem;
|
|
1579
|
+
height: 3.6rem;
|
|
1580
|
+
margin: 0 1.2rem;
|
|
1581
|
+
padding: 0 1.5rem;
|
|
1582
|
+
border: 1px solid var(--border-strong);
|
|
1583
|
+
border-radius: 1.8rem;
|
|
1584
|
+
background: transparent;
|
|
1585
|
+
color: var(--accent);
|
|
1586
|
+
font-family: inherit;
|
|
1587
|
+
font-size: 1.4rem;
|
|
1588
|
+
font-weight: 500;
|
|
1589
|
+
white-space: nowrap;
|
|
1590
|
+
cursor: pointer;
|
|
1591
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
.sign-in:hover {
|
|
1595
|
+
background: var(--accent-hover);
|
|
1596
|
+
border-color: transparent;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
.footer {
|
|
1600
|
+
border-top: 1px solid var(--border-subtle);
|
|
1601
|
+
margin-top: 1.2rem;
|
|
1602
|
+
padding: 1.6rem 1.2rem;
|
|
1603
|
+
color: var(--text-secondary);
|
|
1604
|
+
font-size: 1.2rem;
|
|
1605
|
+
line-height: 1.8rem;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
.footer-links {
|
|
1609
|
+
display: flex;
|
|
1610
|
+
flex-wrap: wrap;
|
|
1611
|
+
gap: 0.2rem 0.8rem;
|
|
1612
|
+
font-weight: 500;
|
|
1613
|
+
margin-bottom: 1.2rem;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
.copyright {
|
|
1617
|
+
color: var(--text-tertiary);
|
|
1618
|
+
}
|
|
1619
|
+
`,bo=()=>{let{ready:e,signedIn:t}=lt(),n=In(`hideShorts`)?io.filter(e=>e.href!==`/shorts`):io,r=e&&!t;return z(`div`,{css:yo,children:[z(`div`,{className:`section`,children:[n.map(e=>U(ho,{entry:e},e.label)),r?co.map(e=>U(ho,{entry:e},e.label)):void 0]}),r?z(`div`,{className:`section`,children:[U(`p`,{className:`sign-in-note`,children:`Sign in to like videos, comment, and subscribe.`}),z(`button`,{type:`button`,className:`sign-in`,onClick:W,children:[U(m,{size:24,strokeWidth:1.5}),`Sign in`]})]}):void 0,U(_o,{}),r?void 0:z(`div`,{className:`section`,children:[U(vo,{}),lo.map(e=>U(ho,{entry:e},e.label))]}),z(`div`,{className:`section`,children:[U(`div`,{className:`section-title`,children:`Explore`}),fo.map(e=>U(ho,{entry:e},e.label))]}),U(go,{}),z(`div`,{className:`footer`,children:[U(`div`,{className:`footer-links`,children:U(K,{href:`/privacy`,children:`Privacy`})}),U(`div`,{className:`copyright`,children:`© 2026 FTube`})]})]})},xo=V`
|
|
1620
|
+
position: fixed;
|
|
1621
|
+
top: var(--header-height);
|
|
1622
|
+
bottom: 0;
|
|
1623
|
+
left: 0;
|
|
1624
|
+
width: var(--guide-width);
|
|
1625
|
+
padding: 1.2rem;
|
|
1626
|
+
overflow-y: auto;
|
|
1627
|
+
background: var(--bg-base);
|
|
1628
|
+
z-index: var(--z-guide);
|
|
1629
|
+
`,So=V`
|
|
1630
|
+
position: fixed;
|
|
1631
|
+
top: var(--header-height);
|
|
1632
|
+
bottom: 0;
|
|
1633
|
+
left: 0;
|
|
1634
|
+
width: var(--guide-mini-width);
|
|
1635
|
+
padding: 0 0.4rem;
|
|
1636
|
+
overflow-y: auto;
|
|
1637
|
+
background: var(--bg-base);
|
|
1638
|
+
z-index: var(--z-guide);
|
|
1639
|
+
|
|
1640
|
+
.item {
|
|
1641
|
+
display: flex;
|
|
1642
|
+
flex-direction: column;
|
|
1643
|
+
align-items: center;
|
|
1644
|
+
gap: 0.6rem;
|
|
1645
|
+
padding: 1.6rem 0;
|
|
1646
|
+
border-radius: 1rem;
|
|
1647
|
+
color: var(--text-primary);
|
|
1648
|
+
transition: background 0.15s ease;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
.item:hover {
|
|
1652
|
+
background: var(--bg-hover);
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
.item .label {
|
|
1656
|
+
font-size: 1rem;
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
.item.active .label {
|
|
1660
|
+
font-weight: 500;
|
|
1661
|
+
}
|
|
1662
|
+
`,Co=V`
|
|
1663
|
+
position: fixed;
|
|
1664
|
+
inset: 0;
|
|
1665
|
+
z-index: var(--z-drawer);
|
|
1666
|
+
|
|
1667
|
+
.scrim {
|
|
1668
|
+
position: absolute;
|
|
1669
|
+
inset: 0;
|
|
1670
|
+
background: var(--bg-scrim);
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
.panel {
|
|
1674
|
+
position: absolute;
|
|
1675
|
+
top: 0;
|
|
1676
|
+
left: 0;
|
|
1677
|
+
bottom: 0;
|
|
1678
|
+
width: var(--guide-width);
|
|
1679
|
+
overflow-y: auto;
|
|
1680
|
+
background: var(--bg-base);
|
|
1681
|
+
animation: guide-slide-in 0.2s ease;
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
@keyframes guide-slide-in {
|
|
1685
|
+
from {
|
|
1686
|
+
transform: translateX(-100%);
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
to {
|
|
1690
|
+
transform: translateX(0);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
.panel-header {
|
|
1695
|
+
position: sticky;
|
|
1696
|
+
top: 0;
|
|
1697
|
+
display: flex;
|
|
1698
|
+
align-items: center;
|
|
1699
|
+
gap: 1.6rem;
|
|
1700
|
+
height: var(--header-height);
|
|
1701
|
+
padding: 0 1.6rem;
|
|
1702
|
+
background: var(--bg-base);
|
|
1703
|
+
z-index: 1;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
.icon-button {
|
|
1707
|
+
flex: none;
|
|
1708
|
+
width: 4rem;
|
|
1709
|
+
height: 4rem;
|
|
1710
|
+
display: flex;
|
|
1711
|
+
align-items: center;
|
|
1712
|
+
justify-content: center;
|
|
1713
|
+
border: none;
|
|
1714
|
+
border-radius: 50%;
|
|
1715
|
+
background: transparent;
|
|
1716
|
+
color: var(--text-primary);
|
|
1717
|
+
cursor: pointer;
|
|
1718
|
+
transition: background 0.15s ease;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
.icon-button:hover {
|
|
1722
|
+
background: var(--bg-hover);
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
.panel-sections {
|
|
1726
|
+
padding: 1.2rem;
|
|
1727
|
+
}
|
|
1728
|
+
`,wo=({variant:e,onClose:t})=>{let n=In(`hideShorts`)?po.filter(e=>e.href!==`/shorts`):po;return P(()=>{if(e!==`drawer`)return;let n=e=>{e.key===`Escape`&&t?.()},r=document.body.style.overflow;return document.body.style.overflow=`hidden`,window.addEventListener(`keydown`,n),()=>{document.body.style.overflow=r,window.removeEventListener(`keydown`,n)}},[e,t]),e===`mini`?U(`nav`,{css:So,"aria-label":`Guide`,children:n.map(e=>U(ho,{entry:e},e.label))}):e===`drawer`?z(`div`,{css:Co,children:[U(`div`,{className:`scrim`,onClick:t}),z(`nav`,{className:`panel`,role:`dialog`,"aria-modal":`true`,"aria-label":`Guide`,children:[z(`div`,{className:`panel-header`,children:[U(`button`,{type:`button`,className:`icon-button`,"aria-label":`Close guide`,onClick:t,children:U(Ce,{size:24,strokeWidth:1.5})}),U($a,{})]}),U(`div`,{className:`panel-sections`,children:U(bo,{})})]})]}):U(`nav`,{css:xo,"aria-label":`Guide`,children:U(bo,{})})};I();var To=V`
|
|
1729
|
+
position: fixed;
|
|
1730
|
+
left: 2rem;
|
|
1731
|
+
bottom: 2rem;
|
|
1732
|
+
z-index: var(--z-popup);
|
|
1733
|
+
display: flex;
|
|
1734
|
+
flex-direction: column;
|
|
1735
|
+
align-items: flex-start;
|
|
1736
|
+
gap: 1rem;
|
|
1737
|
+
|
|
1738
|
+
.toggle {
|
|
1739
|
+
position: relative;
|
|
1740
|
+
display: flex;
|
|
1741
|
+
align-items: center;
|
|
1742
|
+
justify-content: center;
|
|
1743
|
+
width: 4.8rem;
|
|
1744
|
+
height: 4.8rem;
|
|
1745
|
+
border: 1px solid var(--border-strong);
|
|
1746
|
+
border-radius: 50%;
|
|
1747
|
+
background: var(--bg-menu);
|
|
1748
|
+
color: var(--text-primary);
|
|
1749
|
+
cursor: pointer;
|
|
1750
|
+
box-shadow: var(--shadow-menu);
|
|
1751
|
+
transition: background 0.15s ease;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
.toggle:hover {
|
|
1755
|
+
background: var(--bg-chip-hover);
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
.unread {
|
|
1759
|
+
position: absolute;
|
|
1760
|
+
top: -0.3rem;
|
|
1761
|
+
right: -0.3rem;
|
|
1762
|
+
min-width: 1.8rem;
|
|
1763
|
+
height: 1.8rem;
|
|
1764
|
+
padding: 0 0.5rem;
|
|
1765
|
+
border-radius: 0.9rem;
|
|
1766
|
+
background: var(--membership);
|
|
1767
|
+
color: #ffffff;
|
|
1768
|
+
font-size: 1.1rem;
|
|
1769
|
+
font-weight: 700;
|
|
1770
|
+
line-height: 1.8rem;
|
|
1771
|
+
text-align: center;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
.panel {
|
|
1775
|
+
display: flex;
|
|
1776
|
+
flex-direction: column;
|
|
1777
|
+
width: min(32rem, calc(100vw - 4rem));
|
|
1778
|
+
height: min(38rem, calc(100vh - 12rem));
|
|
1779
|
+
border: 1px solid var(--border);
|
|
1780
|
+
border-radius: 1.2rem;
|
|
1781
|
+
background: var(--bg-menu);
|
|
1782
|
+
color: var(--text-primary);
|
|
1783
|
+
box-shadow: var(--shadow-menu);
|
|
1784
|
+
overflow: hidden;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
.head {
|
|
1788
|
+
display: flex;
|
|
1789
|
+
align-items: center;
|
|
1790
|
+
justify-content: space-between;
|
|
1791
|
+
padding: 1rem 1.4rem;
|
|
1792
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
1793
|
+
font-size: 1.4rem;
|
|
1794
|
+
font-weight: 600;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
.head button {
|
|
1798
|
+
display: flex;
|
|
1799
|
+
border: none;
|
|
1800
|
+
background: transparent;
|
|
1801
|
+
color: var(--text-secondary);
|
|
1802
|
+
cursor: pointer;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
.head button:hover {
|
|
1806
|
+
color: var(--text-primary);
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
.lines {
|
|
1810
|
+
flex: 1;
|
|
1811
|
+
min-height: 0;
|
|
1812
|
+
overflow-y: auto;
|
|
1813
|
+
padding: 1rem 1.4rem;
|
|
1814
|
+
display: flex;
|
|
1815
|
+
flex-direction: column;
|
|
1816
|
+
gap: 0.8rem;
|
|
1817
|
+
font-size: 1.3rem;
|
|
1818
|
+
line-height: 1.4;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
.line {
|
|
1822
|
+
display: flex;
|
|
1823
|
+
flex-direction: column;
|
|
1824
|
+
gap: 0.1rem;
|
|
1825
|
+
overflow-wrap: anywhere;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
.line .who {
|
|
1829
|
+
display: inline-flex;
|
|
1830
|
+
align-items: center;
|
|
1831
|
+
gap: 0.5rem;
|
|
1832
|
+
font-size: 1.1rem;
|
|
1833
|
+
color: var(--text-secondary);
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
.line.self .who {
|
|
1837
|
+
color: var(--membership);
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
.empty {
|
|
1841
|
+
color: var(--text-secondary);
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
form {
|
|
1845
|
+
display: flex;
|
|
1846
|
+
gap: 0.6rem;
|
|
1847
|
+
padding: 0.8rem;
|
|
1848
|
+
border-top: 1px solid var(--border-subtle);
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
form input {
|
|
1852
|
+
flex: 1;
|
|
1853
|
+
min-width: 0;
|
|
1854
|
+
height: 3.6rem;
|
|
1855
|
+
padding: 0 1.2rem;
|
|
1856
|
+
border: 1px solid var(--border);
|
|
1857
|
+
border-radius: 1.8rem;
|
|
1858
|
+
background: var(--bg-input);
|
|
1859
|
+
color: var(--text-primary);
|
|
1860
|
+
font-size: 1.3rem;
|
|
1861
|
+
outline: none;
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
form input:focus {
|
|
1865
|
+
border-color: var(--accent-focus);
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
form button {
|
|
1869
|
+
flex: none;
|
|
1870
|
+
display: flex;
|
|
1871
|
+
align-items: center;
|
|
1872
|
+
justify-content: center;
|
|
1873
|
+
width: 3.6rem;
|
|
1874
|
+
height: 3.6rem;
|
|
1875
|
+
border: none;
|
|
1876
|
+
border-radius: 50%;
|
|
1877
|
+
background: var(--bg-chip);
|
|
1878
|
+
color: var(--text-primary);
|
|
1879
|
+
cursor: pointer;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
form button:hover {
|
|
1883
|
+
background: var(--bg-chip-hover);
|
|
1884
|
+
}
|
|
1885
|
+
`,Eo=(e,t)=>e.self?`You`:Q.nameOf(e.from)??e.name??(e.from===t?`Host`:e.from.slice(0,6)),Do=()=>{let e=Ia();La();let[t,n]=F(!1),[r,i]=F(0),[a,o]=F(``),s=L(null),c=L(t);c.current=t;let l=e.status===`active`,u=l?e.invite:void 0,d=l?Q.chat():[];return P(()=>{n(!1),i(0),o(``)},[u]),Ra((e,{self:t})=>{e.t===`chat`&&!t&&!c.current&&i(e=>e+1)}),P(()=>{if(!t)return;i(0);let e=s.current;e&&(e.scrollTop=e.scrollHeight)},[t,d.length]),l?z(`div`,{css:To,children:[t?z(`section`,{className:`panel`,"aria-label":`Party chat`,children:[z(`div`,{className:`head`,children:[U(`span`,{children:`Party chat`}),U(`button`,{type:`button`,"aria-label":`Close chat`,onClick:()=>n(!1),children:U(ye,{size:18,strokeWidth:1.75})})]}),U(`div`,{className:`lines`,ref:s,children:d.length===0?U(`span`,{className:`empty`,children:`No messages yet.`}):d.map(t=>z(`div`,{className:t.self?`line self`:`line`,children:[z(`span`,{className:`who`,children:[U(Ha,{participant:Q.identityOf(t.from),size:18}),U(`span`,{children:Eo(t,e.owner)})]}),U(`span`,{children:t.text})]},t.id))}),z(`form`,{onSubmit:e=>{e.preventDefault();let t=Ca(a);t&&(Q.send({t:`chat`,text:t}),o(``))},children:[U(`input`,{value:a,maxLength:500,placeholder:`Message`,"aria-label":`Party message`,onInput:e=>o(e.currentTarget.value)}),U(`button`,{type:`submit`,"aria-label":`Send message`,children:U(A,{size:16,strokeWidth:1.75})})]})]}):void 0,z(`button`,{type:`button`,className:`toggle`,"aria-label":`Party chat`,"aria-expanded":t,onClick:()=>n(e=>!e),children:[U(v,{size:22,strokeWidth:1.75}),!t&&r>0?U(`span`,{className:`unread`,children:r>99?`99+`:r}):void 0]})]}):null};I();var Oo=()=>{let[e,t]=Re(),n=$e(),r=Ia(),i=ba(e,n),a=L(i);a.current=i;let o=r.status===`active`?r.role:void 0,s=r.status===`active`?r.invite:void 0,c=L(void 0),l=L(!1);return P(()=>{Q.resume()},[]),P(()=>{l.current=!1,c.current=void 0},[s]),P(()=>{i&&(Q.setLocation(i),o===`host`&&c.current!==i&&(c.current=i,Q.send({t:`nav`,path:i})))},[i,o,s]),Ra((e,{replayed:n})=>{if(o===`guest`){if(e.t===`nav`){if(!Q.following()&&!n)return;l.current=!0,e.path!==a.current&&t(e.path);return}e.t===`state`&&(!l.current||n)&&(l.current=!0,e.path!==a.current&&t(e.path))}}),null};I();var ko=32,Ao=18,jo=100,Mo=.72,No=.88,Po=.28,Fo=28,Io=36,Lo=.2,Ro=({enabled:e,fullscreen:t,docked:n,reducedMotion:r})=>e&&!t&&!n&&!r?Mo:0,zo=({enabled:e,fullscreen:t,docked:n,reducedMotion:r,hasFrame:i,blocked:a})=>e&&!t&&!n&&!r&&i&&!a?No:0,Bo=(e,t,n)=>{let r=Math.max(0,t),i=Math.max(0,n);if(r===0||i===0||e.length<r*i*4)return{x:0,y:0,w:r,h:i};let a=t=>{for(let n=0;n<i;n+=1){let i=(n*r+t)*4;if(Math.max(e[i]??0,e[i+1]??0,e[i+2]??0)>Fo)return!1}return!0},o=t=>{let n=t*r;for(let t=0;t<r;t+=1){let r=(n+t)*4;if(Math.max(e[r]??0,e[r+1]??0,e[r+2]??0)>Fo)return!1}return!0},s=0;for(;s<r&&a(s);)s+=1;let c=0;for(;c<r&&a(r-1-c);)c+=1;let l=0;for(;l<i&&o(l);)l+=1;let u=0;for(;u<i&&o(i-1-u);)u+=1;let d=Math.min(s,c,Math.floor(r*Lo)),f=Math.min(l,u,Math.floor(i*Lo)),p=d,m=f,h=r-d*2,g=i-f*2;if(h<=0||g<=0)return{x:0,y:0,w:r,h:i};let _=!1;for(let t=m;t<m+g&&!_;t+=1)for(let n=p;n<p+h;n+=1){let i=(t*r+n)*4;if(Math.max(e[i]??0,e[i+1]??0,e[i+2]??0)>Io){_=!0;break}}return _?{x:p,y:m,w:h,h:g}:{x:0,y:0,w:r,h:i}},Vo=new WeakMap,Ho=e=>{let t=document.createElement(`canvas`);t.width=ko,t.height=Ao;let n=t.getContext(`2d`,{willReadFrequently:!0}),r=new Set,i={x:0,y:0,w:ko,h:Ao},a=!1,o=0,s=0,c=(e,n)=>{if(!a)return;let r=e.canvas.getContext(`2d`);if(!r)return;let o=r.globalAlpha;r.globalAlpha=n||!e.seeded?1:Po,r.drawImage(t,i.x,i.y,i.w,i.h,0,0,ko,Ao),r.globalAlpha=o,e.seeded=!0},l=t=>{if(!(!n||e.readyState<2||e.videoWidth===0||e.videoHeight===0))try{n.drawImage(e,0,0,ko,Ao);let o={x:0,y:0,w:ko,h:Ao};try{let e=n.getImageData(0,0,ko,Ao).data;o=Bo(e,ko,Ao)}catch{}i=o,a=!0;for(let e of r)c(e,t)}catch{}},u=()=>{o!==0&&(cancelAnimationFrame(o),o=0)},d=t=>{o=0,!(e.paused||e.ended||document.visibilityState!==`visible`)&&(t-s>=jo&&(l(!1),s=t),o=requestAnimationFrame(d))},f=()=>{l(!0),u(),!e.paused&&!e.ended&&document.visibilityState===`visible`&&(s=performance.now(),o=requestAnimationFrame(d))},p=()=>l(!0);return e.addEventListener(`loadeddata`,f),e.addEventListener(`playing`,f),e.addEventListener(`seeked`,p),e.addEventListener(`play`,f),e.addEventListener(`pause`,f),document.addEventListener(`visibilitychange`,f),f(),{targets:r,sample:l,drawTarget:c,destroy:()=>{u(),e.removeEventListener(`loadeddata`,f),e.removeEventListener(`playing`,f),e.removeEventListener(`seeked`,p),e.removeEventListener(`play`,f),e.removeEventListener(`pause`,f),document.removeEventListener(`visibilitychange`,f)}}},Uo=(e,t)=>{let n=Vo.get(e);n||(n=Ho(e),Vo.set(e,n));let r={canvas:t,seeded:!1};return n.targets.add(r),n.sample(!0),n.drawTarget(r,!0),()=>{n.targets.delete(r),n.targets.size===0&&(n.destroy(),Vo.get(e)===n&&Vo.delete(e))}},Wo=e=>{let t=e?.getContext(`2d`);t&&e&&t.clearRect(0,0,e.width,e.height)},Go=V`
|
|
1886
|
+
position: absolute;
|
|
1887
|
+
inset: -4.8rem -6.4rem -11.2rem;
|
|
1888
|
+
z-index: -1;
|
|
1889
|
+
pointer-events: none;
|
|
1890
|
+
opacity: var(--ambient-opacity, 0);
|
|
1891
|
+
transition: opacity 0.4s ease;
|
|
1892
|
+
mask-image: radial-gradient(ellipse 50% 50% at 50% 45%, rgba(0, 0, 0, 1) 76%, rgba(0, 0, 0, 0.75) 87%, transparent 100%);
|
|
1893
|
+
-webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 45%, rgba(0, 0, 0, 1) 76%, rgba(0, 0, 0, 0.75) 87%, transparent 100%);
|
|
1894
|
+
|
|
1895
|
+
:root[data-theme='light'] & {
|
|
1896
|
+
opacity: calc(var(--ambient-opacity, 0) * 0.35);
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
canvas {
|
|
1900
|
+
display: block;
|
|
1901
|
+
width: 100%;
|
|
1902
|
+
height: 100%;
|
|
1903
|
+
filter: blur(5.2rem) saturate(1.65) brightness(1.08);
|
|
1904
|
+
transform: scale(1.12) translateZ(0);
|
|
1905
|
+
}
|
|
1906
|
+
`,Ko=V`
|
|
1907
|
+
position: absolute;
|
|
1908
|
+
inset: 0;
|
|
1909
|
+
overflow: hidden;
|
|
1910
|
+
pointer-events: none;
|
|
1911
|
+
transition: opacity 0.4s ease;
|
|
1912
|
+
mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 1) 14%, rgba(0, 0, 0, 1) 86%, rgba(0, 0, 0, 0.72) 100%);
|
|
1913
|
+
-webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 1) 14%, rgba(0, 0, 0, 1) 86%, rgba(0, 0, 0, 0.72) 100%);
|
|
1914
|
+
|
|
1915
|
+
canvas {
|
|
1916
|
+
display: block;
|
|
1917
|
+
width: 100%;
|
|
1918
|
+
height: 100%;
|
|
1919
|
+
filter: blur(3.6rem) saturate(1.55) brightness(0.92);
|
|
1920
|
+
transform: scale(1.18) translateZ(0);
|
|
1921
|
+
}
|
|
1922
|
+
`,qo=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,Jo=()=>{let[e,t]=F(qo);return P(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(`(prefers-reduced-motion: reduce)`),n=()=>t(e.matches);return n(),e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e},Yo=({video:e,enabled:t,fullscreen:n,docked:r})=>{let i=L(null),a=Ro({enabled:t,fullscreen:n,docked:r,reducedMotion:Jo()}),o=a>0;return P(()=>{Wo(i.current)},[e]),P(()=>{let t=i.current;if(!e){Wo(t);return}if(!o||!t)return;let n=Uo(e,t);return()=>{n()}},[o,e]),r||n?null:U(`div`,{css:Go,"data-ambient-glow":``,"data-active":o?`true`:`false`,style:{"--ambient-opacity":String(a)},"aria-hidden":`true`,children:U(`canvas`,{ref:i,width:ko,height:Ao})})},Xo=({video:e,enabled:t,fullscreen:n,docked:r,hasFrame:i,blocked:a})=>{let o=L(null),s=zo({enabled:t,fullscreen:n,docked:r,reducedMotion:Jo(),hasFrame:i,blocked:a}),c=s>0;return P(()=>{let t=o.current;if(c&&e&&t)return Uo(e,t)},[c,e]),r||n?null:U(`div`,{css:Ko,"data-ambient-bars":``,"data-active":c?`true`:`false`,style:{opacity:s},"aria-hidden":`true`,children:U(`canvas`,{ref:o,width:ko,height:Ao})})};I();var Zo=`https://sponsor.ajay.app`,Qo=`https://sponsor.ajay.app/api/skipSegments/`,$o=[],es=.001,ts=async e=>{let t=new Uint8Array(await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(e)));return Array.from(t.subarray(0,2),e=>e.toString(16).padStart(2,`0`)).join(``)},ns=(e,t)=>{if(!Array.isArray(e))return[];let n=e.find(e=>e?.videoID===t);return Array.isArray(n?.segments)?n.segments.flatMap(e=>{if(e?.category!==`sponsor`||e.actionType!==`skip`||!Array.isArray(e.segment))return[];let[t,n]=e.segment;return typeof t==`number`&&typeof n==`number`&&t>=0&&n>t&&Number.isFinite(n)?[{start:t,end:n}]:[]}).sort((e,t)=>e.start-t.start):[]},rs=(e,t,n)=>{let r;for(let i of e){let e=r??t;i.start<=e&&e<i.end-.001&&!n.has(i)&&(r=i.end)}return r},is=e=>{let[t,n]=F(()=>Z().skipSponsors),[r,i]=F($o);return P(()=>Yn(e=>n(e.skipSponsors)),[]),P(()=>{if(i($o),!e||!t)return;let n=new AbortController;return(async()=>{let t=await ts(e),r=ns(await(await fetch(`${Qo}${t}?categories=["sponsor"]&actionTypes=["skip"]`,{signal:n.signal})).json(),e);n.signal.aborted||i(r)})().catch(()=>{}),()=>n.abort()},[e,t]),r},as=e=>e instanceof Error&&e.message.startsWith(`youtube:`)&&!e.message.startsWith(`youtube: live `),os=e=>e instanceof Error&&e.message.startsWith(`youtube: stream refused`),ss=[5e3,15e3,45e3],cs=(e=3,t=30)=>{let n=0,r=0,i=0,a;return{get used(){return n},spend:()=>(n+=1,i=0,a=void 0,n<=e),refused:()=>(i=0,a=void 0,ss[r++]),reset:()=>{n=0,r=0},progress:e=>{let o=a===void 0?0:e-a;a=e,!(o<=0||o>=1.5)&&(i+=o,!(i<t)&&(n=0,r=0))}}},ls=(e=3e4)=>{let t,n=0;return(r,i,a)=>!i||r!==t?(t=r,n=a,!1):a-n<e?!1:(n=a,!0)};I();var us=5e3,ds=e=>({paused:e.paused,time:Number.isFinite(e.currentTime)?Math.max(0,e.currentTime):0,rate:Number.isFinite(e.playbackRate)&&e.playbackRate>0?e.playbackRate:1,at:Date.now()}),fs=({video:e,videoId:t,active:n})=>{let r=Ia(),i=r.status===`active`?r.role:void 0,a=r.status===`active`?r.invite:void 0,o=Q.following(),s=L(void 0);P(()=>{s.current=void 0},[t,a]),P(()=>{if(i!==`host`||!n){Q.setPlayback(void 0);return}let t=()=>{if(e.readyState<1)return;let t=ds(e);Q.setPlayback(t),Q.send({t:`playback`,s:t})};t();let r=[`play`,`pause`,`seeked`,`ratechange`,`loadedmetadata`];for(let n of r)e.addEventListener(n,t);let a=setInterval(()=>{e.paused||t()},us);return()=>{clearInterval(a);for(let n of r)e.removeEventListener(n,t);Q.setPlayback(void 0)}},[i,n,e,t,a]);let c=(t,r)=>{if(!n||!r&&!Q.following())return;let i=sa({paused:e.paused,time:e.currentTime,rate:e.playbackRate},t,Date.now(),!0);if(i){if(i.rate!==void 0&&(e.playbackRate=i.rate),i.seekTo!==void 0&&e.readyState>=1){let t=Number.isFinite(e.duration)&&e.duration>0?e.duration:i.seekTo;e.currentTime=Math.max(0,Math.min(i.seekTo,t))}i.paused===!0&&!e.paused&&e.pause(),i.paused===!1&&e.paused&&e.play().catch(()=>{e.muted||(e.muted=!0,e.play().catch(()=>{}))})}};return P(()=>{if(i!==`guest`||!n)return;let r=()=>{if(s.current)return;let e=Q.hostPlayback();if(!e||xa(e.path)!==t)return;let n=Q.hostClock(),r=n?{...e.state,at:na(e.state.at,n.offset)}:e.state,i=Date.now();s.current={...r,time:aa(r,i,!!n),at:i}},a=()=>{r(),s.current&&Q.following()&&c(s.current,!1)};return a(),e.addEventListener(`loadedmetadata`,a),e.addEventListener(`loadeddata`,a),e.addEventListener(`canplay`,a),()=>{e.removeEventListener(`loadedmetadata`,a),e.removeEventListener(`loadeddata`,a),e.removeEventListener(`canplay`,a)}},[i,n,e,t,o]),Ra((e,{replayed:r})=>{if(i!==`guest`||!n)return;let a=e.t===`playback`||e.t===`state`?e.s:void 0;if(!a||xa(e.t===`state`?e.path:Q.hostPath())!==t)return;let o=Q.hostClock(),l=o?{...a,at:na(a.at,o.offset)}:a,u=Date.now(),d={...l,time:aa(l,u,!!o),at:u};s.current=d,c(d,r)}),null},ps=(e=typeof navigator>`u`?``:navigator.userAgent)=>/firefox/i.test(e)?`Click the autoplay icon in the address bar and allow Audio and Video.`:/safari/i.test(e)&&!/(chrome|chromium|crios|edg|opr|fxios)/i.test(e)?`Open Safari > Settings for This Website and set Auto-Play to Allow All Auto-Play.`:`Click the site settings icon in the address bar and set Sound to Allow.`;I();var ms=V`
|
|
1923
|
+
position: absolute;
|
|
1924
|
+
z-index: 3;
|
|
1925
|
+
padding: 1.2rem 1.4rem;
|
|
1926
|
+
border: 1px solid rgba(255, 255, 255, 0.16);
|
|
1927
|
+
border-radius: 1.2rem;
|
|
1928
|
+
background: rgba(15, 15, 15, 0.86);
|
|
1929
|
+
backdrop-filter: blur(16px);
|
|
1930
|
+
box-shadow: 0 0.8rem 2.4rem rgba(0, 0, 0, 0.45);
|
|
1931
|
+
color: #ffffff;
|
|
1932
|
+
font-family: 'Roboto', Arial, sans-serif;
|
|
1933
|
+
cursor: auto;
|
|
1934
|
+
animation: audio-prompt-in 0.18s ease;
|
|
1935
|
+
|
|
1936
|
+
&.video {
|
|
1937
|
+
top: 1.6rem;
|
|
1938
|
+
left: 1.6rem;
|
|
1939
|
+
max-width: min(34rem, calc(100% - 3.2rem));
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
&.shorts {
|
|
1943
|
+
top: 7.2rem;
|
|
1944
|
+
left: 1.2rem;
|
|
1945
|
+
right: 1.2rem;
|
|
1946
|
+
max-width: none;
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
@keyframes audio-prompt-in {
|
|
1950
|
+
from {
|
|
1951
|
+
opacity: 0;
|
|
1952
|
+
transform: translateY(-0.4rem);
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
to {
|
|
1956
|
+
opacity: 1;
|
|
1957
|
+
transform: translateY(0);
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1962
|
+
animation: none;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
.head {
|
|
1966
|
+
display: flex;
|
|
1967
|
+
align-items: flex-start;
|
|
1968
|
+
gap: 0.8rem;
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
.title-row {
|
|
1972
|
+
display: flex;
|
|
1973
|
+
align-items: center;
|
|
1974
|
+
gap: 0.8rem;
|
|
1975
|
+
flex: 1;
|
|
1976
|
+
min-width: 0;
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
.title-icon {
|
|
1980
|
+
flex: none;
|
|
1981
|
+
color: #ffffff;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
.heading {
|
|
1985
|
+
margin: 0;
|
|
1986
|
+
font-size: 1.4rem;
|
|
1987
|
+
font-weight: 600;
|
|
1988
|
+
line-height: 1.9rem;
|
|
1989
|
+
color: #ffffff;
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
.close {
|
|
1993
|
+
flex: none;
|
|
1994
|
+
display: grid;
|
|
1995
|
+
place-items: center;
|
|
1996
|
+
width: 2.8rem;
|
|
1997
|
+
height: 2.8rem;
|
|
1998
|
+
margin: -0.4rem -0.4rem 0 0;
|
|
1999
|
+
padding: 0;
|
|
2000
|
+
border: none;
|
|
2001
|
+
border-radius: 50%;
|
|
2002
|
+
background: transparent;
|
|
2003
|
+
color: rgba(255, 255, 255, 0.78);
|
|
2004
|
+
cursor: pointer;
|
|
2005
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
.close:hover {
|
|
2009
|
+
background: rgba(255, 255, 255, 0.14);
|
|
2010
|
+
color: #ffffff;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
.body {
|
|
2014
|
+
margin: 0.6rem 0 0;
|
|
2015
|
+
font-size: 1.25rem;
|
|
2016
|
+
line-height: 1.75rem;
|
|
2017
|
+
color: rgba(255, 255, 255, 0.88);
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
.tip {
|
|
2021
|
+
margin: 0.4rem 0 0;
|
|
2022
|
+
font-size: 1.2rem;
|
|
2023
|
+
line-height: 1.65rem;
|
|
2024
|
+
color: rgba(255, 255, 255, 0.7);
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.actions {
|
|
2028
|
+
margin-top: 1rem;
|
|
2029
|
+
display: flex;
|
|
2030
|
+
align-items: center;
|
|
2031
|
+
gap: 0.8rem;
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
.unmute {
|
|
2035
|
+
display: inline-flex;
|
|
2036
|
+
align-items: center;
|
|
2037
|
+
gap: 0.6rem;
|
|
2038
|
+
height: 3.2rem;
|
|
2039
|
+
padding: 0 1.4rem;
|
|
2040
|
+
border: none;
|
|
2041
|
+
border-radius: 1.6rem;
|
|
2042
|
+
background: #ffffff;
|
|
2043
|
+
color: #0f0f0f;
|
|
2044
|
+
font-size: 1.3rem;
|
|
2045
|
+
font-weight: 600;
|
|
2046
|
+
cursor: pointer;
|
|
2047
|
+
transition: background 0.15s ease;
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
.unmute:hover {
|
|
2051
|
+
background: #e5e5e5;
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
.unmute:focus-visible,
|
|
2055
|
+
.close:focus-visible {
|
|
2056
|
+
outline: 2px solid var(--accent);
|
|
2057
|
+
outline-offset: 2px;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
@container player (max-width: 480px) {
|
|
2061
|
+
&.video {
|
|
2062
|
+
top: 1.2rem;
|
|
2063
|
+
left: 1.2rem;
|
|
2064
|
+
max-width: calc(100% - 2.4rem);
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
`,hs=({video:e,onDismiss:t,placement:n=`video`})=>{let r=_e(()=>ps(),[]);return P(()=>{if(!e.muted&&e.volume>0){t();return}let n=()=>{!e.muted&&e.volume>0&&t()};return e.addEventListener(`volumechange`,n),()=>e.removeEventListener(`volumechange`,n)},[e,t]),z(`div`,{css:ms,className:n,role:`region`,"aria-label":`Audio permission`,"data-audio-prompt":!0,onClick:e=>e.stopPropagation(),onDblClick:e=>e.stopPropagation(),children:[z(`div`,{className:`head`,children:[z(`div`,{className:`title-row`,children:[U(de,{className:`title-icon`,size:18,strokeWidth:2,"aria-hidden":`true`}),U(`p`,{className:`heading`,children:`Sound is muted by your browser`})]}),U(`button`,{type:`button`,className:`close`,"aria-label":`Dismiss audio prompt`,onClick:e=>{e.stopPropagation(),t()},children:U(ye,{size:16,strokeWidth:2,"aria-hidden":`true`})})]}),U(`p`,{className:`body`,children:`Unmute now, or allow audio for this site so videos play with sound by default.`}),U(`p`,{className:`tip`,children:r}),U(`div`,{className:`actions`,children:z(`button`,{type:`button`,className:`unmute`,onClick:n=>{n.stopPropagation();let r=Z(),i=r.volume>0?r.volume:1;e.volume=i,e.muted=!1,e.play().catch(()=>{}),(r.muted||r.volume<=0)&&J({muted:!1,volume:i}),t()},children:[U(ie,{size:16,strokeWidth:2,"aria-hidden":`true`}),`Enable sound`]})})]})},gs={play:S,pause:b,volume:ie,mute:de,speed:ue,link:be,code:p},_s=V`
|
|
2068
|
+
position: absolute;
|
|
2069
|
+
inset: 0;
|
|
2070
|
+
pointer-events: none;
|
|
2071
|
+
color: #ffffff;
|
|
2072
|
+
|
|
2073
|
+
.bezel-icon {
|
|
2074
|
+
position: absolute;
|
|
2075
|
+
top: 50%;
|
|
2076
|
+
left: 50%;
|
|
2077
|
+
display: grid;
|
|
2078
|
+
place-items: center;
|
|
2079
|
+
width: 5.2rem;
|
|
2080
|
+
height: 5.2rem;
|
|
2081
|
+
margin: -2.6rem 0 0 -2.6rem;
|
|
2082
|
+
border-radius: 50%;
|
|
2083
|
+
background: rgba(0, 0, 0, 0.5);
|
|
2084
|
+
animation: bezel-fade 0.5s linear forwards;
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
.bezel-text {
|
|
2088
|
+
position: absolute;
|
|
2089
|
+
top: 10%;
|
|
2090
|
+
left: 50%;
|
|
2091
|
+
padding: 1rem 2rem;
|
|
2092
|
+
border-radius: 0.4rem;
|
|
2093
|
+
background: rgba(0, 0, 0, 0.5);
|
|
2094
|
+
font-size: 1.8rem;
|
|
2095
|
+
font-weight: 500;
|
|
2096
|
+
transform: translateX(-50%);
|
|
2097
|
+
animation: bezel-text 1s ease-in forwards;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
.bezel-seek {
|
|
2101
|
+
position: absolute;
|
|
2102
|
+
top: 50%;
|
|
2103
|
+
display: flex;
|
|
2104
|
+
align-items: center;
|
|
2105
|
+
gap: 1.2rem;
|
|
2106
|
+
font-size: 2.2rem;
|
|
2107
|
+
font-weight: 700;
|
|
2108
|
+
text-shadow: 0 0 0.4rem rgba(0, 0, 0, 0.5);
|
|
2109
|
+
transform: translateY(-50%);
|
|
2110
|
+
animation: bezel-text 1s ease-in forwards;
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
.bezel-seek.forward {
|
|
2114
|
+
right: 4.8rem;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
.bezel-seek.back {
|
|
2118
|
+
left: 4.8rem;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
@keyframes bezel-fade {
|
|
2122
|
+
from {
|
|
2123
|
+
opacity: 1;
|
|
2124
|
+
transform: scale(1);
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
to {
|
|
2128
|
+
opacity: 0;
|
|
2129
|
+
transform: scale(2);
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
@keyframes bezel-text {
|
|
2134
|
+
0%,
|
|
2135
|
+
60% {
|
|
2136
|
+
opacity: 1;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
100% {
|
|
2140
|
+
opacity: 0;
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
`,vs=({cue:e})=>{if(e.icon===`forward`||e.icon===`back`)return U(`div`,{css:_s,"data-bezel":e.icon,"aria-hidden":`true`,children:e.icon===`forward`?z(`div`,{className:`bezel-seek forward`,children:[z(`span`,{children:[`+ `,e.text]}),U(d,{size:28,strokeWidth:2.5})]}):z(`div`,{className:`bezel-seek back`,children:[U(C,{size:28,strokeWidth:2.5}),z(`span`,{children:[`−`,` `,e.text]})]})});let t=gs[e.icon];return z(`div`,{css:_s,"data-bezel":e.icon,"aria-hidden":`true`,children:[e.text?U(`div`,{className:`bezel-text`,children:e.text}):void 0,U(`div`,{className:`bezel-icon`,children:U(t,{size:26,fill:e.icon===`play`||e.icon===`pause`?`currentColor`:`none`,strokeWidth:e.icon===`play`||e.icon===`pause`?0:2})})]})},ys={x:.5,y:1},bs=(e,t,n)=>Math.min(n,Math.max(t,e)),xs=({clientX:e,clientY:t,grabOffsetX:n,grabOffsetY:r,layerRect:i,windowRect:a})=>{let o=e-n-i.left,s=t-r-i.top,c=i.width-a.width,l=i.height-a.height;return{x:c>0?bs(o/c,0,1):ys.x,y:l>0?bs(s/l,0,1):ys.y}},Ss=e=>{if(e.nodeType===3)return e.textContent??``;if(e.nodeType===1&&e.tagName===`BR`)return`
|
|
2144
|
+
`;let t=``;for(let n of e.childNodes)t+=Ss(n);return t},Cs=e=>{let t=e;return typeof t.getCueAsHTML==`function`?Ss(t.getCueAsHTML()):t.text??``},ws=e=>{let t=[];for(let n of e)if(n.mode===`showing`&&n.activeCues)for(let e of n.activeCues)for(let n of Cs(e).split(/\r?\n/)){let e=n.replace(/\r$/,``);e.trim().length>0&&t.push(e)}return t};I();var Ts=2,Es=V`
|
|
2145
|
+
position: absolute;
|
|
2146
|
+
top: 1.2rem;
|
|
2147
|
+
right: 1.2rem;
|
|
2148
|
+
bottom: 1.2rem;
|
|
2149
|
+
left: 1.2rem;
|
|
2150
|
+
overflow: hidden;
|
|
2151
|
+
pointer-events: none;
|
|
2152
|
+
transition: bottom 0.2s ease;
|
|
2153
|
+
|
|
2154
|
+
&.controls-visible {
|
|
2155
|
+
bottom: 8rem;
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
&.docked {
|
|
2159
|
+
top: 0.8rem;
|
|
2160
|
+
right: 0.8rem;
|
|
2161
|
+
bottom: 0.8rem;
|
|
2162
|
+
left: 0.8rem;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
&.dragging {
|
|
2166
|
+
transition: none;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
@container player (max-width: 600px) {
|
|
2170
|
+
&.controls-visible {
|
|
2171
|
+
bottom: 7.2rem;
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2176
|
+
transition: none;
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
.caption-window,
|
|
2180
|
+
.caption-sample {
|
|
2181
|
+
position: absolute;
|
|
2182
|
+
left: calc(var(--caption-x) * 100%);
|
|
2183
|
+
top: calc(var(--caption-y) * 100%);
|
|
2184
|
+
width: max-content;
|
|
2185
|
+
max-width: 85%;
|
|
2186
|
+
transform: translate(calc(var(--caption-x) * -100%), calc(var(--caption-y) * -100%));
|
|
2187
|
+
text-align: center;
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
.caption-window {
|
|
2191
|
+
pointer-events: auto;
|
|
2192
|
+
cursor: grab;
|
|
2193
|
+
user-select: none;
|
|
2194
|
+
touch-action: none;
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
.caption-window[data-dragging] {
|
|
2198
|
+
cursor: grabbing;
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
&.docked .caption-window {
|
|
2202
|
+
pointer-events: none;
|
|
2203
|
+
cursor: default;
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
.caption-cue {
|
|
2207
|
+
display: inline;
|
|
2208
|
+
padding: 0 0.25em;
|
|
2209
|
+
border-radius: 0.12em;
|
|
2210
|
+
line-height: 1.35;
|
|
2211
|
+
white-space: pre-wrap;
|
|
2212
|
+
box-decoration-break: clone;
|
|
2213
|
+
-webkit-box-decoration-break: clone;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
.caption-sample {
|
|
2217
|
+
white-space: nowrap;
|
|
2218
|
+
pointer-events: none;
|
|
2219
|
+
}
|
|
2220
|
+
`,Ds=e=>V`
|
|
2221
|
+
.caption-cue,
|
|
2222
|
+
.caption-sample {
|
|
2223
|
+
${e};
|
|
2224
|
+
}
|
|
2225
|
+
`,Os=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),ks=({video:e,cueStyle:t,baseSize:n,controlsVisible:r,docked:i,sample:a,onDragStart:o,onClick:s,onDblClick:c})=>{let l=In(`captionPosition`),[u,d]=F(()=>ws(e.textTracks)),[f,p]=F(void 0),[m,h]=F(!1),g=L(null),_=L(null),v=L(void 0),y=L(!1);P(()=>{let t=new Set,n=()=>{let t=ws(e.textTracks);d(e=>Os(e,t)?e:t)},r=()=>{let r=new Set;for(let i of e.textTracks)r.add(i),t.has(i)||(t.add(i),i.addEventListener(`cuechange`,n));for(let e of t)r.has(e)||(e.removeEventListener(`cuechange`,n),t.delete(e));n()};r();let i=e.textTracks;return i.addEventListener(`addtrack`,r),i.addEventListener(`removetrack`,r),i.addEventListener(`change`,n),e.addEventListener(`seeked`,n),e.addEventListener(`emptied`,n),()=>{i.removeEventListener(`addtrack`,r),i.removeEventListener(`removetrack`,r),i.removeEventListener(`change`,n),e.removeEventListener(`seeked`,n),e.removeEventListener(`emptied`,n);for(let e of t)e.removeEventListener(`cuechange`,n);t.clear()}},[e]),P(()=>{i&&(v.current=void 0,y.current=!1,h(!1),p(void 0))},[i]);let b=f??l??ys,x={"--caption-x":b.x,"--caption-y":b.y},S=e=>{if(i||e.button!==0)return;let t=_.current;if(!t)return;e.preventDefault(),y.current=!1;let n=t.getBoundingClientRect();v.current={pointerId:e.pointerId,grabOffsetX:e.clientX-n.left,grabOffsetY:e.clientY-n.top,startClientX:e.clientX,startClientY:e.clientY,windowSize:{width:n.width,height:n.height},moved:!1};try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}h(!0),o?.()},C=(e,t)=>{let n=v.current;if(n&&n.pointerId===e.pointerId){v.current=void 0,y.current=n.moved;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}h(!1),p(void 0),t&&n.moved&&n.latestPos&&J({captionPosition:n.latestPos})}},w=e=>{let t=v.current;if(!t||t.pointerId!==e.pointerId)return;if(e.pointerType===`mouse`&&e.buttons===0){C(e,!0);return}let n=g.current,r=_.current;if(!n||!r)return;if(!t.moved){if(Math.hypot(e.clientX-t.startClientX,e.clientY-t.startClientY)<=Ts)return;t.moved=!0}let i=r.getBoundingClientRect(),a=xs({clientX:e.clientX,clientY:e.clientY,grabOffsetX:t.grabOffsetX,grabOffsetY:t.grabOffsetY,layerRect:n.getBoundingClientRect(),windowRect:i.width>0&&i.height>0?i:t.windowSize});t.latestPos=a,p(a)},T=[`caption-layer`,r&&!i?`controls-visible`:void 0,i?`docked`:void 0,m?`dragging`:void 0].filter(Boolean).join(` `);return U(`div`,{ref:g,css:[Es,Ds(t)],className:T,"data-caption-overlay":``,style:{fontSize:`${n}px`},children:u.length>0||m?U(`div`,{ref:_,className:`caption-window`,"data-caption-window":``,"data-dragging":m?``:void 0,style:x,onPointerDown:S,onPointerMove:w,onPointerUp:e=>C(e,!0),onPointerCancel:e=>C(e,!1),onLostPointerCapture:e=>C(e,!0),onClick:e=>{e.stopPropagation();let t=y.current;y.current=!1,!t&&s?.()},onDblClick:e=>{e.stopPropagation(),c?.()},children:u.map((e,t)=>U(`div`,{className:`caption-line`,children:U(`span`,{className:`caption-cue`,"data-caption-cue":``,children:e})},t))}):a===void 0?void 0:U(`span`,{className:`caption-sample`,style:{...x,fontSize:`${a}px`},children:`Captions look like this`})})},As=e=>{let t=e.clientWidth,n=e.clientHeight,r=e.videoWidth>0&&e.videoHeight>0?Math.min(t/e.videoWidth,n/e.videoHeight):0,i=Math.round(r>0?e.videoWidth*r:t),a=Math.round(r>0?e.videoHeight*r:n);return{x:Math.round((t-i)/2),y:Math.round((n-a)/2),width:i,height:a}},js=(e,t)=>{let n=Math.round(e.width*t.width);return{left:Math.round(e.left*t.width),top:Math.round(e.top*t.height),width:n,height:Math.round(e.width*t.width/e.aspectRatio),radius:n>=256?12:n>=98?8:4,opensLeft:e.left+e.width/2>.5}},Ms=(e,t,n,r=0)=>!n&&t>=e.startMs-r&&t<e.endMs;I();var Ns=1e4,Ps=e=>{let[t,n]=F(()=>As(e));return P(()=>{let t=()=>n(t=>{let n=As(e);return Object.keys(n).every(e=>n[e]===t[e])?t:n}),r=new ResizeObserver(t);return r.observe(e),e.addEventListener(`resize`,t),e.addEventListener(`loadedmetadata`,t),t(),()=>{r.disconnect(),e.removeEventListener(`resize`,t),e.removeEventListener(`loadedmetadata`,t)}},[e]),t},Fs=V`
|
|
2226
|
+
position: absolute;
|
|
2227
|
+
inset: 0;
|
|
2228
|
+
pointer-events: none;
|
|
2229
|
+
font-family: Roboto, Arial, sans-serif;
|
|
2230
|
+
|
|
2231
|
+
.picture {
|
|
2232
|
+
position: absolute;
|
|
2233
|
+
container: end-screen / inline-size;
|
|
2234
|
+
font-size: 12px;
|
|
2235
|
+
line-height: 1.3em;
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
.element {
|
|
2239
|
+
position: absolute;
|
|
2240
|
+
z-index: 0;
|
|
2241
|
+
display: block;
|
|
2242
|
+
box-sizing: content-box;
|
|
2243
|
+
margin: -1px;
|
|
2244
|
+
border: 1px solid rgba(255, 255, 255, 0.4);
|
|
2245
|
+
box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
|
|
2246
|
+
color: #ffffff;
|
|
2247
|
+
text-decoration: none;
|
|
2248
|
+
cursor: pointer;
|
|
2249
|
+
opacity: 0;
|
|
2250
|
+
visibility: hidden;
|
|
2251
|
+
transition: visibility linear 0.2s, opacity 0.2s cubic-bezier(0, 0, 0.2, 1), border-color 0.2s;
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
.element.shown {
|
|
2255
|
+
opacity: 1;
|
|
2256
|
+
visibility: visible;
|
|
2257
|
+
pointer-events: auto;
|
|
2258
|
+
transition: visibility linear, opacity 0.2s cubic-bezier(0.4, 0, 1, 1), border-color 0.2s;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
.element.shown:hover {
|
|
2262
|
+
z-index: 1;
|
|
2263
|
+
border-color: #ffffff;
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
/* youtube.com's miniplayer lays its hover wash over the tiles, so a click there plays or pauses instead */
|
|
2267
|
+
&.docked .element.shown {
|
|
2268
|
+
pointer-events: none;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
.element::after {
|
|
2272
|
+
content: '';
|
|
2273
|
+
position: absolute;
|
|
2274
|
+
z-index: 3;
|
|
2275
|
+
inset: -1px;
|
|
2276
|
+
border-radius: inherit;
|
|
2277
|
+
background: #000000;
|
|
2278
|
+
opacity: 0;
|
|
2279
|
+
pointer-events: none;
|
|
2280
|
+
transition: opacity 0.2s;
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
&:has(.element.shown:hover) .element.shown:not(:hover)::after {
|
|
2284
|
+
opacity: 0.25;
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
.tile {
|
|
2288
|
+
overflow: hidden;
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
.tile > img,
|
|
2292
|
+
.tile::before {
|
|
2293
|
+
position: absolute;
|
|
2294
|
+
inset: 0;
|
|
2295
|
+
width: 100%;
|
|
2296
|
+
height: 100%;
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
.tile > img {
|
|
2300
|
+
object-fit: cover;
|
|
2301
|
+
background: #ffffff;
|
|
2302
|
+
}
|
|
2303
|
+
|
|
2304
|
+
.tile::before {
|
|
2305
|
+
content: '';
|
|
2306
|
+
z-index: 1;
|
|
2307
|
+
height: 33%;
|
|
2308
|
+
opacity: 0.8;
|
|
2309
|
+
background: linear-gradient(#000000, transparent);
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
.tile-title {
|
|
2313
|
+
position: relative;
|
|
2314
|
+
z-index: 1;
|
|
2315
|
+
display: block;
|
|
2316
|
+
max-width: 85%;
|
|
2317
|
+
margin: 6px 8px;
|
|
2318
|
+
overflow: hidden;
|
|
2319
|
+
font-size: 12px;
|
|
2320
|
+
font-weight: 500;
|
|
2321
|
+
line-height: 14px;
|
|
2322
|
+
text-overflow: ellipsis;
|
|
2323
|
+
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
|
|
2324
|
+
white-space: nowrap;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
.duration {
|
|
2328
|
+
position: absolute;
|
|
2329
|
+
z-index: 1;
|
|
2330
|
+
right: 0;
|
|
2331
|
+
bottom: 0;
|
|
2332
|
+
margin: 0 4px 4px 0;
|
|
2333
|
+
padding: 4px 6px;
|
|
2334
|
+
border-radius: 2px;
|
|
2335
|
+
background: rgba(0, 0, 0, 0.8);
|
|
2336
|
+
color: rgba(255, 255, 255, 0.8);
|
|
2337
|
+
line-height: 1.3em;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
.count {
|
|
2341
|
+
position: absolute;
|
|
2342
|
+
z-index: 1;
|
|
2343
|
+
left: 0;
|
|
2344
|
+
right: 0;
|
|
2345
|
+
bottom: 0;
|
|
2346
|
+
display: flex;
|
|
2347
|
+
align-items: center;
|
|
2348
|
+
gap: 8px;
|
|
2349
|
+
height: 24px;
|
|
2350
|
+
padding-left: 8px;
|
|
2351
|
+
background: rgba(0, 0, 0, 0.75);
|
|
2352
|
+
color: rgba(255, 255, 255, 0.8);
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
.round {
|
|
2356
|
+
border: 0;
|
|
2357
|
+
margin: 0;
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
.round.channel,
|
|
2361
|
+
.round.channel::after,
|
|
2362
|
+
.round.channel .face {
|
|
2363
|
+
border-radius: 50%;
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
.face {
|
|
2367
|
+
position: absolute;
|
|
2368
|
+
inset: 0;
|
|
2369
|
+
z-index: 1;
|
|
2370
|
+
display: block;
|
|
2371
|
+
overflow: hidden;
|
|
2372
|
+
background: #ffffff;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
.face img {
|
|
2376
|
+
display: block;
|
|
2377
|
+
width: 100%;
|
|
2378
|
+
height: 100%;
|
|
2379
|
+
object-fit: cover;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
.link-icon {
|
|
2383
|
+
position: absolute;
|
|
2384
|
+
z-index: 2;
|
|
2385
|
+
right: 2px;
|
|
2386
|
+
bottom: 2px;
|
|
2387
|
+
display: grid;
|
|
2388
|
+
place-items: center;
|
|
2389
|
+
width: 24px;
|
|
2390
|
+
height: 24px;
|
|
2391
|
+
border-radius: 2px;
|
|
2392
|
+
background: #000000;
|
|
2393
|
+
color: #ffffff;
|
|
2394
|
+
transition: opacity 0.2s;
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
.round:hover .link-icon {
|
|
2398
|
+
opacity: 0;
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
.card {
|
|
2402
|
+
position: absolute;
|
|
2403
|
+
top: 0;
|
|
2404
|
+
left: 0;
|
|
2405
|
+
height: 100%;
|
|
2406
|
+
padding-left: 100%;
|
|
2407
|
+
opacity: 0;
|
|
2408
|
+
visibility: hidden;
|
|
2409
|
+
transition: visibility linear 0.2s, opacity 0.2s cubic-bezier(0, 0, 0.2, 1);
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
.opens-left .card {
|
|
2413
|
+
left: auto;
|
|
2414
|
+
right: 0;
|
|
2415
|
+
padding: 0 100% 0 0;
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
.round:hover .card {
|
|
2419
|
+
opacity: 1;
|
|
2420
|
+
visibility: visible;
|
|
2421
|
+
transition: visibility linear, opacity 0.2s cubic-bezier(0.4, 0, 1, 1);
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
.card::before {
|
|
2425
|
+
content: '';
|
|
2426
|
+
position: absolute;
|
|
2427
|
+
inset: -8px;
|
|
2428
|
+
border-radius: var(--radius);
|
|
2429
|
+
background: #ffffff;
|
|
2430
|
+
box-shadow: 0 0 4px #000000;
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
.card-body {
|
|
2434
|
+
position: relative;
|
|
2435
|
+
display: flex;
|
|
2436
|
+
flex-direction: column;
|
|
2437
|
+
justify-content: center;
|
|
2438
|
+
width: 115px;
|
|
2439
|
+
height: 100%;
|
|
2440
|
+
margin: 0 4px 0 12px;
|
|
2441
|
+
color: #767676;
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
.opens-left .card-body {
|
|
2445
|
+
margin: 0 12px 0 4px;
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
.card-title {
|
|
2449
|
+
color: #333333;
|
|
2450
|
+
font-weight: 500;
|
|
2451
|
+
text-decoration: none;
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
a.card-title,
|
|
2455
|
+
.card-action {
|
|
2456
|
+
color: #167ac6;
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
a.card-title:hover,
|
|
2460
|
+
.card-action:hover {
|
|
2461
|
+
text-decoration: underline;
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
.card-action {
|
|
2465
|
+
margin-top: 4px;
|
|
2466
|
+
overflow: hidden;
|
|
2467
|
+
font-weight: 500;
|
|
2468
|
+
text-decoration: none;
|
|
2469
|
+
text-overflow: ellipsis;
|
|
2470
|
+
white-space: nowrap;
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
.card-metadata {
|
|
2474
|
+
margin-top: 4px;
|
|
2475
|
+
display: -webkit-box;
|
|
2476
|
+
-webkit-line-clamp: 3;
|
|
2477
|
+
-webkit-box-orient: vertical;
|
|
2478
|
+
overflow: hidden;
|
|
2479
|
+
word-break: break-word;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
.channel .card-metadata {
|
|
2483
|
+
display: none;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
.subscribe {
|
|
2487
|
+
align-self: flex-start;
|
|
2488
|
+
margin-top: 4px;
|
|
2489
|
+
padding: 0;
|
|
2490
|
+
border: 0;
|
|
2491
|
+
background: none;
|
|
2492
|
+
color: #0f0f0f;
|
|
2493
|
+
font: inherit;
|
|
2494
|
+
font-weight: 500;
|
|
2495
|
+
cursor: pointer;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
/* above the full screen title's shade, which youtube.com never draws over it, and 48 px from the top, under the info
|
|
2499
|
+
cards' "i", when the video has cards (measured 2026-11-10) */
|
|
2500
|
+
&.under-cards .hide {
|
|
2501
|
+
top: 48px;
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
.hide {
|
|
2505
|
+
position: absolute;
|
|
2506
|
+
z-index: 1;
|
|
2507
|
+
top: 12px;
|
|
2508
|
+
right: 12px;
|
|
2509
|
+
display: flex;
|
|
2510
|
+
align-items: center;
|
|
2511
|
+
gap: 4px;
|
|
2512
|
+
height: 24px;
|
|
2513
|
+
padding: 0 8px;
|
|
2514
|
+
border: 0;
|
|
2515
|
+
border-radius: 12px;
|
|
2516
|
+
background: #ffffff;
|
|
2517
|
+
color: #000000;
|
|
2518
|
+
font: 500 12px/24px Roboto, Arial, sans-serif;
|
|
2519
|
+
cursor: pointer;
|
|
2520
|
+
pointer-events: auto;
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
@container end-screen (min-width: 448px) {
|
|
2524
|
+
.tile-title {
|
|
2525
|
+
max-width: none;
|
|
2526
|
+
max-height: 28px;
|
|
2527
|
+
display: -webkit-box;
|
|
2528
|
+
-webkit-line-clamp: 2;
|
|
2529
|
+
-webkit-box-orient: vertical;
|
|
2530
|
+
white-space: normal;
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
.card-body {
|
|
2534
|
+
width: 136px;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
.card-title {
|
|
2538
|
+
font-size: 12px;
|
|
2539
|
+
line-height: 14px;
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
@container end-screen (min-width: 605px) {
|
|
2544
|
+
.tile-title {
|
|
2545
|
+
max-height: 30px;
|
|
2546
|
+
font-size: 13px;
|
|
2547
|
+
line-height: 15px;
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
.card-title {
|
|
2551
|
+
font-size: 13px;
|
|
2552
|
+
line-height: 15px;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
.card-body {
|
|
2556
|
+
margin: 0 8px 0 16px;
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
.opens-left .card-body {
|
|
2560
|
+
margin: 0 16px 0 8px;
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
@container end-screen (min-width: 746.5px) {
|
|
2565
|
+
.element {
|
|
2566
|
+
font-size: 14px;
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
.tile-title {
|
|
2570
|
+
max-height: 36px;
|
|
2571
|
+
margin: 10px 12px;
|
|
2572
|
+
font-size: 15px;
|
|
2573
|
+
line-height: 18px;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
.duration {
|
|
2577
|
+
margin: 0 6px 6px 0;
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
.count {
|
|
2581
|
+
gap: 12px;
|
|
2582
|
+
height: 32px;
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
.link-icon {
|
|
2586
|
+
right: 8px;
|
|
2587
|
+
bottom: 8px;
|
|
2588
|
+
width: 32px;
|
|
2589
|
+
height: 32px;
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
.card-body {
|
|
2593
|
+
width: 176px;
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2596
|
+
.card-title {
|
|
2597
|
+
font-size: 15px;
|
|
2598
|
+
line-height: 18px;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
.channel .card-metadata {
|
|
2602
|
+
display: -webkit-box;
|
|
2603
|
+
margin-top: 8px;
|
|
2604
|
+
padding-top: 8px;
|
|
2605
|
+
border-top: 1px solid #ebebeb;
|
|
2606
|
+
font-size: 12px;
|
|
2607
|
+
line-height: 14px;
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
@container end-screen (min-width: 1066.5px) {
|
|
2612
|
+
.element {
|
|
2613
|
+
font-size: 18px;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
.tile-title {
|
|
2617
|
+
max-height: 48px;
|
|
2618
|
+
margin: 18px 20px;
|
|
2619
|
+
font-size: 21px;
|
|
2620
|
+
line-height: 24px;
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
.duration {
|
|
2624
|
+
margin: 0 12px 12px 0;
|
|
2625
|
+
}
|
|
2626
|
+
|
|
2627
|
+
.count {
|
|
2628
|
+
gap: 14px;
|
|
2629
|
+
height: 40px;
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
.card-body {
|
|
2633
|
+
width: 264px;
|
|
2634
|
+
margin: 0 16px 0 32px;
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
.opens-left .card-body {
|
|
2638
|
+
margin: 0 32px 0 16px;
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2641
|
+
.card-title {
|
|
2642
|
+
font-size: 21px;
|
|
2643
|
+
line-height: 24px;
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
.card-action,
|
|
2647
|
+
.card-metadata {
|
|
2648
|
+
margin-top: 8px;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
.channel .card-metadata {
|
|
2652
|
+
margin-top: 12px;
|
|
2653
|
+
padding-top: 12px;
|
|
2654
|
+
font-size: 18px;
|
|
2655
|
+
line-height: 21px;
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
@container end-screen (min-width: 1600px) {
|
|
2660
|
+
.element {
|
|
2661
|
+
font-size: 28px;
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2664
|
+
.tile-title {
|
|
2665
|
+
max-height: 76px;
|
|
2666
|
+
font-size: 32px;
|
|
2667
|
+
line-height: 38px;
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
.duration {
|
|
2671
|
+
margin: 0 20px 20px 0;
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
.card-body {
|
|
2675
|
+
width: 392px;
|
|
2676
|
+
margin: 0 24px 0 48px;
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
.opens-left .card-body {
|
|
2680
|
+
margin: 0 48px 0 24px;
|
|
2681
|
+
}
|
|
2682
|
+
|
|
2683
|
+
.card-title {
|
|
2684
|
+
font-size: 32px;
|
|
2685
|
+
line-height: 38px;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
.channel .card-metadata {
|
|
2689
|
+
margin-top: 18px;
|
|
2690
|
+
padding-top: 18px;
|
|
2691
|
+
font-size: 28px;
|
|
2692
|
+
line-height: 34px;
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
`,Is=({channelId:e,subscribed:t})=>{let{signedIn:n}=lt(),{fetching:r,toggle:i}=Kt(),[a,o]=F(t===!0);return U(`button`,{type:`button`,className:`subscribe`,"aria-pressed":a,disabled:r,onClick:()=>{if(!n){W();return}i(e,a).then(e=>{e!==void 0&&o(e)})},children:a?`Subscribed`:`Subscribe`})},Ls=({element:e,picture:t,shown:n,onOpen:r})=>{let{left:i,top:a,width:o,height:s,radius:c,opensLeft:u}=js(e,t),d={left:`${i}px`,top:`${a}px`,width:`${o}px`,height:`${s}px`,"--radius":`${c}px`},f=e.image?U(`img`,{src:e.image,alt:``}):void 0;if(e.kind===`video`||e.kind===`playlist`){let t={id:e.videoId,title:e.title,thumbnail:e.image,list:e.kind===`playlist`?e.playlistId:void 0};return z(`a`,{className:`element tile${n?` shown`:``}`,style:{...d,borderRadius:`${c}px`},href:dn(t),"aria-label":`${e.title}, ${e.kind}`,onClick:r?wn(t,r):void 0,children:[f,U(`span`,{className:`tile-title`,children:e.title}),e.kind===`video`&&e.badge?U(`span`,{className:`duration`,children:e.badge}):void 0,e.kind===`playlist`?z(`span`,{className:`count`,children:[U(l,{size:`1.3em`,strokeWidth:1.5}),e.badge]}):void 0]})}let p=e.kind===`channel`?`/channel/${e.channelId}`:e.url;return z(`div`,{className:`element round ${e.kind}${u?` opens-left`:``}${n?` shown`:``}`,style:d,children:[U(`div`,{className:`card`,children:z(`div`,{className:`card-body`,children:[e.kind===`channel`?z(B,{children:[U(`a`,{className:`card-title`,href:p,target:`_blank`,rel:`noopener`,tabIndex:-1,children:e.title}),U(Is,{channelId:e.channelId,subscribed:e.subscribed})]}):U(`span`,{className:`card-title`,children:e.title}),e.metadata?U(`span`,{className:`card-metadata`,children:e.metadata}):void 0,e.kind===`website`&&e.action?U(`a`,{className:`card-action`,href:p,target:`_blank`,rel:`noopener noreferrer`,tabIndex:-1,children:e.action}):void 0]})}),U(`a`,{className:`face`,href:p,target:`_blank`,rel:e.kind===`channel`?`noopener`:`noopener noreferrer`,"aria-label":`${e.title}, ${e.kind}`,children:f}),e.kind===`website`?U(`span`,{className:`link-icon`,children:U(be,{size:`60%`,strokeWidth:2})}):void 0]})},Rs=({elements:e,video:t,time:n,ended:r,docked:i,underCards:a=!1,onOpen:o})=>{let s=Ps(t),[c,l]=F(!1),u=n*1e3,d=e.map(e=>Ms(e,u,r)),f=e.some(e=>Ms(e,u,r,Ns));return z(`div`,{css:Fs,className:[i&&`docked`,a&&`under-cards`].filter(Boolean).join(` `)||void 0,"data-end-screen":`elements`,children:[f?U(`div`,{className:`picture`,style:{left:`${s.x}px`,top:`${s.y}px`,width:`${s.width}px`,height:`${s.height}px`},children:e.map((e,t)=>U(Ls,{element:e,picture:s,shown:d[t]&&!c,onOpen:o},t))}):void 0,d.some(Boolean)&&!i?z(`button`,{type:`button`,className:`hide`,"aria-label":c?`Show endscreen cards`:`Hide endscreen cards`,"aria-pressed":c,onClick:()=>l(e=>!e),children:[U(c?re:Ae,{size:12,strokeWidth:2}),c?`Show`:`Hide`]}):void 0]})};I();var zs=530,Bs=330,Vs=2e3,Hs=1.5,Us=V`
|
|
2696
|
+
display: contents;
|
|
2697
|
+
|
|
2698
|
+
.cards-button {
|
|
2699
|
+
position: absolute;
|
|
2700
|
+
z-index: 1;
|
|
2701
|
+
top: 0.8rem;
|
|
2702
|
+
right: 1.2rem;
|
|
2703
|
+
display: grid;
|
|
2704
|
+
place-items: center;
|
|
2705
|
+
width: 3.6rem;
|
|
2706
|
+
height: 3.6rem;
|
|
2707
|
+
padding: 0;
|
|
2708
|
+
border: none;
|
|
2709
|
+
background: transparent;
|
|
2710
|
+
color: #ffffff;
|
|
2711
|
+
cursor: pointer;
|
|
2712
|
+
filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.4));
|
|
2713
|
+
opacity: 0;
|
|
2714
|
+
visibility: hidden;
|
|
2715
|
+
transition: opacity 0.1s cubic-bezier(0.4, 0, 1, 1), visibility 0s 0.1s;
|
|
2716
|
+
}
|
|
2717
|
+
|
|
2718
|
+
.cards-button.shown {
|
|
2719
|
+
opacity: 1;
|
|
2720
|
+
visibility: visible;
|
|
2721
|
+
transition: opacity 0.25s cubic-bezier(0, 0, 0.2, 1);
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
.teaser {
|
|
2725
|
+
position: absolute;
|
|
2726
|
+
z-index: 1;
|
|
2727
|
+
top: 1.65rem;
|
|
2728
|
+
right: 1.2rem;
|
|
2729
|
+
display: flex;
|
|
2730
|
+
align-items: center;
|
|
2731
|
+
max-width: calc(100% - 2.4rem);
|
|
2732
|
+
height: 3.1rem;
|
|
2733
|
+
border-radius: 1.8rem;
|
|
2734
|
+
background: rgba(0, 0, 0, 0.6);
|
|
2735
|
+
color: #ffffff;
|
|
2736
|
+
font: 500 12px/30px Roboto, Arial, sans-serif;
|
|
2737
|
+
white-space: nowrap;
|
|
2738
|
+
animation: teaser-in 0.33s cubic-bezier(0.05, 0, 0, 1) 0.2s backwards;
|
|
2739
|
+
}
|
|
2740
|
+
|
|
2741
|
+
.teaser.out {
|
|
2742
|
+
animation: teaser-out 0.33s cubic-bezier(0.05, 0, 0, 1) forwards;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
@keyframes teaser-in {
|
|
2746
|
+
from {
|
|
2747
|
+
clip-path: inset(0 0 0 100% round 1.8rem);
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
to {
|
|
2751
|
+
clip-path: inset(0 round 1.8rem);
|
|
2752
|
+
}
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2755
|
+
@keyframes teaser-out {
|
|
2756
|
+
from {
|
|
2757
|
+
clip-path: inset(0 round 1.8rem);
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2760
|
+
to {
|
|
2761
|
+
clip-path: inset(0 0 0 100% round 1.8rem);
|
|
2762
|
+
}
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
.teaser-open {
|
|
2766
|
+
display: flex;
|
|
2767
|
+
align-items: center;
|
|
2768
|
+
min-width: 0;
|
|
2769
|
+
height: 100%;
|
|
2770
|
+
padding: 0;
|
|
2771
|
+
border: none;
|
|
2772
|
+
background: transparent;
|
|
2773
|
+
color: inherit;
|
|
2774
|
+
font: inherit;
|
|
2775
|
+
cursor: pointer;
|
|
2776
|
+
}
|
|
2777
|
+
|
|
2778
|
+
.teaser-avatar {
|
|
2779
|
+
flex: none;
|
|
2780
|
+
width: 2.2rem;
|
|
2781
|
+
height: 2.2rem;
|
|
2782
|
+
margin: 0.4rem;
|
|
2783
|
+
border-radius: 50%;
|
|
2784
|
+
object-fit: cover;
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2787
|
+
.teaser-text {
|
|
2788
|
+
overflow: hidden;
|
|
2789
|
+
text-overflow: ellipsis;
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2792
|
+
.teaser-close {
|
|
2793
|
+
display: grid;
|
|
2794
|
+
flex: none;
|
|
2795
|
+
place-items: center;
|
|
2796
|
+
width: 2rem;
|
|
2797
|
+
height: 3rem;
|
|
2798
|
+
margin: 0 0.5rem;
|
|
2799
|
+
padding: 0;
|
|
2800
|
+
border: none;
|
|
2801
|
+
background: transparent;
|
|
2802
|
+
color: #717171;
|
|
2803
|
+
cursor: pointer;
|
|
2804
|
+
}
|
|
2805
|
+
`,Ws=({teasers:e,avatar:t,time:n,shown:r,ended:i,onOpen:a})=>{let[o,s]=F(void 0),[c,l]=F(!1),u=L(0);P(()=>{let t=u.current;if(u.current=n,n<t||n-t>Hs)return;let r=e.findIndex(({startMs:e})=>t<e/1e3&&e/1e3<=n);r<0||(s({index:r,out:!1}),l(!1))},[n,e]),P(()=>{if(!o||c&&!o.out)return;let t=o.out?setTimeout(()=>s(void 0),Bs):setTimeout(()=>s({...o,out:!0}),o.left?Vs:zs+(e[o.index]?.durationMs??0));return()=>clearTimeout(t)},[o,e,c]);let d=o&&!i?e[o.index]:void 0,f=()=>{s(void 0),a()};return z(`div`,{css:Us,children:[U(`button`,{type:`button`,className:r&&!d&&!i?`cards-button shown`:`cards-button`,"aria-label":`Show cards`,onClick:f,children:U(xe,{size:22,strokeWidth:2})}),d?z(`div`,{className:o.out?`teaser out`:`teaser`,onMouseEnter:()=>l(!0),onMouseLeave:()=>{l(!1),s(e=>e&&!e.out?{...e,left:!0}:e)},children:[z(`button`,{type:`button`,className:`teaser-open`,onClick:f,children:[t?U(`img`,{className:`teaser-avatar`,src:t,alt:``}):void 0,U(`span`,{className:`teaser-text`,children:d.text})]}),U(`button`,{type:`button`,className:`teaser-close`,"aria-label":`Close`,onClick:()=>s({...o,out:!0}),children:U(ye,{size:20,strokeWidth:2})})]},o.index):void 0]})},Gs=V`
|
|
2806
|
+
position: absolute;
|
|
2807
|
+
inset: 0;
|
|
2808
|
+
color: #ffffff;
|
|
2809
|
+
opacity: 0;
|
|
2810
|
+
transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
|
|
2811
|
+
/* a click between the buttons reaches the video, which plays and pauses as on youtube.com */
|
|
2812
|
+
pointer-events: none;
|
|
2813
|
+
|
|
2814
|
+
/* not :focus-within: a click leaves the focus on its button, and youtube.com hides the controls once the pointer
|
|
2815
|
+
leaves even then */
|
|
2816
|
+
[data-player-root]:hover &,
|
|
2817
|
+
&:has(:focus-visible) {
|
|
2818
|
+
opacity: 1;
|
|
2819
|
+
}
|
|
2820
|
+
|
|
2821
|
+
&.washed {
|
|
2822
|
+
background: rgba(0, 0, 0, 0.5);
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
button {
|
|
2826
|
+
position: absolute;
|
|
2827
|
+
display: grid;
|
|
2828
|
+
place-items: center;
|
|
2829
|
+
width: 4rem;
|
|
2830
|
+
height: 4rem;
|
|
2831
|
+
padding: 0;
|
|
2832
|
+
border: none;
|
|
2833
|
+
background: transparent;
|
|
2834
|
+
color: inherit;
|
|
2835
|
+
cursor: pointer;
|
|
2836
|
+
pointer-events: auto;
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
.expand {
|
|
2840
|
+
top: 0;
|
|
2841
|
+
left: 0;
|
|
2842
|
+
}
|
|
2843
|
+
|
|
2844
|
+
.close {
|
|
2845
|
+
top: 0;
|
|
2846
|
+
right: 0;
|
|
2847
|
+
}
|
|
2848
|
+
|
|
2849
|
+
.play {
|
|
2850
|
+
top: 50%;
|
|
2851
|
+
left: 50%;
|
|
2852
|
+
width: 4.2rem;
|
|
2853
|
+
height: 4.2rem;
|
|
2854
|
+
transform: translate(-50%, -50%);
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2857
|
+
.time {
|
|
2858
|
+
position: absolute;
|
|
2859
|
+
left: 1.2rem;
|
|
2860
|
+
bottom: 1.7rem;
|
|
2861
|
+
color: #eeeeee;
|
|
2862
|
+
font-size: 1.2rem;
|
|
2863
|
+
line-height: 1.4rem;
|
|
2864
|
+
font-variant-numeric: tabular-nums;
|
|
2865
|
+
}
|
|
2866
|
+
`,Ks=({video:e,state:t,isLive:n,onExpand:r})=>{let i=e!==void 0&&!t.ended;return z(`div`,{css:Gs,className:i?`washed`:void 0,children:[U(`button`,{type:`button`,className:`expand`,"aria-label":`Expand`,"aria-keyshortcuts":`i`,onClick:r,children:z(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[U(`path`,{d:`M22 11V5a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h9`}),U(`rect`,{x:`5`,y:`7`,width:`7`,height:`5`,rx:`0.5`}),U(`path`,{d:`M16 19v-5h5M16.5 14.5l5.5 5.5`})]})}),U(`button`,{type:`button`,className:`close`,"aria-label":`Close miniplayer`,onClick:_n,children:U(ye,{size:24,strokeWidth:2})}),i?z(B,{children:[U(`button`,{type:`button`,className:`play`,"aria-label":t.paused?`Play`:`Pause`,"aria-keyshortcuts":`k`,onClick:()=>t.paused?void e.play().catch(()=>{}):e.pause(),children:t.paused?U(S,{size:42,fill:`currentColor`,strokeWidth:0}):U(b,{size:42,fill:`currentColor`,strokeWidth:0})}),n?void 0:z(`span`,{className:`time`,children:[Nn(t.currentTime),` / `,Nn(t.duration)]})]}):void 0]})},qs=V`
|
|
2867
|
+
position: absolute;
|
|
2868
|
+
inset: 0;
|
|
2869
|
+
color: #ffffff;
|
|
2870
|
+
font-family: Roboto, Arial, sans-serif;
|
|
2871
|
+
|
|
2872
|
+
&.notice {
|
|
2873
|
+
display: flex;
|
|
2874
|
+
flex-direction: column;
|
|
2875
|
+
justify-content: center;
|
|
2876
|
+
align-items: flex-start;
|
|
2877
|
+
padding: 0 12%;
|
|
2878
|
+
background: radial-gradient(circle at 72% 50%, rgba(88, 20, 100, 0.55), transparent 42%), #0f0f0f;
|
|
2879
|
+
}
|
|
2880
|
+
|
|
2881
|
+
.refusal-title {
|
|
2882
|
+
margin: 0;
|
|
2883
|
+
font-size: 2.4rem;
|
|
2884
|
+
font-weight: 700;
|
|
2885
|
+
line-height: 3.2rem;
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2888
|
+
.refusal-text {
|
|
2889
|
+
margin: 1.6rem 0 0;
|
|
2890
|
+
font-size: 1.4rem;
|
|
2891
|
+
line-height: 2rem;
|
|
2892
|
+
color: rgba(255, 255, 255, 0.7);
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
.refusal-sign-in {
|
|
2896
|
+
margin-top: 1.6rem;
|
|
2897
|
+
height: 4rem;
|
|
2898
|
+
padding: 0 1.6rem;
|
|
2899
|
+
border: none;
|
|
2900
|
+
border-radius: 2rem;
|
|
2901
|
+
background: #ffffff;
|
|
2902
|
+
color: #000000;
|
|
2903
|
+
font-size: 1.4rem;
|
|
2904
|
+
font-weight: 500;
|
|
2905
|
+
cursor: pointer;
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
.refusal-sign-in.large {
|
|
2909
|
+
height: 4.8rem;
|
|
2910
|
+
padding: 0 2rem;
|
|
2911
|
+
border-radius: 2.4rem;
|
|
2912
|
+
font-size: 1.8rem;
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
.refusal-sign-in:hover {
|
|
2916
|
+
background: #d9d9d9;
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
/* a members-only video: its thumbnail under a 75% black, the channel's avatar beside the text */
|
|
2920
|
+
&.offer {
|
|
2921
|
+
background: #000000;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
.refusal-backdrop {
|
|
2925
|
+
position: absolute;
|
|
2926
|
+
inset: 0;
|
|
2927
|
+
width: 100%;
|
|
2928
|
+
height: 100%;
|
|
2929
|
+
object-fit: cover;
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
&.offer::after {
|
|
2933
|
+
content: '';
|
|
2934
|
+
position: absolute;
|
|
2935
|
+
inset: 0;
|
|
2936
|
+
background: rgba(0, 0, 0, 0.75);
|
|
2937
|
+
}
|
|
2938
|
+
|
|
2939
|
+
.refusal-offer {
|
|
2940
|
+
position: absolute;
|
|
2941
|
+
z-index: 1;
|
|
2942
|
+
top: 5.6rem;
|
|
2943
|
+
left: 2.1rem;
|
|
2944
|
+
right: 2.1rem;
|
|
2945
|
+
display: flex;
|
|
2946
|
+
gap: 1rem;
|
|
2947
|
+
color: #eeeeee;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
.refusal-avatar {
|
|
2951
|
+
flex: none;
|
|
2952
|
+
width: 10rem;
|
|
2953
|
+
height: 10rem;
|
|
2954
|
+
border-radius: 50%;
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
&.offer .refusal-title {
|
|
2958
|
+
font-size: 2rem;
|
|
2959
|
+
font-weight: 400;
|
|
2960
|
+
line-height: 2.4rem;
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
&.offer .refusal-text {
|
|
2964
|
+
margin: 0;
|
|
2965
|
+
color: inherit;
|
|
2966
|
+
line-height: 1.68rem;
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
@container player (max-width: 600px) {
|
|
2970
|
+
&.notice {
|
|
2971
|
+
padding: 0 2.4rem;
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
.refusal-title,
|
|
2975
|
+
&.offer .refusal-title {
|
|
2976
|
+
font-size: 1.6rem;
|
|
2977
|
+
line-height: 2.2rem;
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
.refusal-text {
|
|
2981
|
+
margin-top: 0.8rem;
|
|
2982
|
+
font-size: 1.2rem;
|
|
2983
|
+
line-height: 1.6rem;
|
|
2984
|
+
}
|
|
2985
|
+
|
|
2986
|
+
.refusal-offer {
|
|
2987
|
+
top: 1.6rem;
|
|
2988
|
+
left: 1.6rem;
|
|
2989
|
+
right: 1.6rem;
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
.refusal-avatar {
|
|
2993
|
+
width: 4.8rem;
|
|
2994
|
+
height: 4.8rem;
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
`,Js=({refusal:e})=>{let t=e.description?U(`p`,{className:`refusal-text`,children:e.description}):void 0;return e.avatar!==void 0||e.thumbnail!==void 0?z(`div`,{css:qs,className:`offer`,"data-refusal":!0,children:[e.thumbnail?U(`img`,{className:`refusal-backdrop`,src:e.thumbnail,alt:``}):void 0,z(`div`,{className:`refusal-offer`,children:[e.avatar?U(`img`,{className:`refusal-avatar`,src:e.avatar,alt:``}):void 0,z(`div`,{children:[U(`p`,{className:`refusal-title`,children:e.title}),t]})]})]}):z(`div`,{css:qs,className:`notice`,"data-refusal":!0,children:[U(`p`,{className:`refusal-title`,children:e.title}),t,e.signIn?U(`button`,{type:`button`,className:e.largeSignIn?`refusal-sign-in large`:`refusal-sign-in`,onClick:W,children:`Sign in`}):void 0]})},Ys=({at:e,onClose:t,video:n,videoId:r,list:i,title:a,loop:o,onLoop:s,onMiniplayer:c,onCopied:l})=>{let u=async(e,t)=>{try{await navigator.clipboard.writeText(e),l(t)}catch{ot(`Could not copy`)}},d=e=>Yt(location.origin,r,{list:i,t:e});return z(Zt,{at:e,label:`Player menu`,media:!0,onClose:t,children:[U(Y,{icon:T,label:`Loop`,checked:o,closeOnSelect:!0,onSelect:s}),c?U(Y,{icon:E,label:`Miniplayer`,onSelect:c}):void 0,U(Y,{icon:be,label:`Copy video URL`,onSelect:()=>void u(d(),`link`)}),U(Y,{icon:be,label:`Copy video URL at current time`,onSelect:()=>void u(d(n.currentTime),`link`)}),U(Y,{icon:p,label:`Copy embed code`,onSelect:()=>{let{width:e,height:t}=n.closest(`[data-player-root]`).getBoundingClientRect();u(tn({videoId:r,title:a,width:e,height:t}),`code`)}})]})};I();var Xs={paused:!0,ended:!1,currentTime:0,duration:0,buffered:0,volume:1,muted:!1,playbackRate:1,buffering:!1,seeking:!1},Zs=(e,t,n)=>({paused:e.paused,ended:e.ended,currentTime:e.currentTime,duration:Number.isFinite(e.duration)?e.duration:0,buffered:e.buffered.length>0?e.buffered.end(e.buffered.length-1):0,volume:e.volume,muted:e.muted,playbackRate:e.playbackRate,buffering:n,seeking:e.seeking,liveWindow:t?.isLive()?t.seekRange():void 0}),Qs=(e,t)=>{let[n,r]=F(Xs);return P(()=>{if(!e)return;let n=!1,i=0,a=!0,o=()=>r(Zs(e,t,n)),s=0,c=()=>{a&&(!e.paused||e.seeking?o():t?.isLive()&&performance.now()-s>=1e3&&(s=performance.now(),o()),i=requestAnimationFrame(c))},l=e=>{n=!!e.buffering,o()},u=[`play`,`pause`,`ended`,`seeking`,`seeked`,`volumechange`,`ratechange`,`durationchange`,`loadedmetadata`,`progress`,`timeupdate`,`emptied`];for(let t of u)e.addEventListener(t,o);return t?.addEventListener(`buffering`,l),o(),i=requestAnimationFrame(c),()=>{a=!1,cancelAnimationFrame(i);for(let t of u)e.removeEventListener(t,o);t?.removeEventListener(`buffering`,l)}},[e,t]),n};M(),I();var $s=V`
|
|
2998
|
+
position: absolute;
|
|
2999
|
+
inset: 0;
|
|
3000
|
+
/* the controls and the end screen lay out for the player's own width, which is the miniplayer's 400 px wherever the page is */
|
|
3001
|
+
container: player / inline-size;
|
|
3002
|
+
|
|
3003
|
+
video {
|
|
3004
|
+
position: relative;
|
|
3005
|
+
display: block;
|
|
3006
|
+
width: 100%;
|
|
3007
|
+
height: 100%;
|
|
3008
|
+
object-fit: contain;
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
.poster {
|
|
3012
|
+
position: absolute;
|
|
3013
|
+
inset: 0;
|
|
3014
|
+
width: 100%;
|
|
3015
|
+
height: 100%;
|
|
3016
|
+
object-fit: cover;
|
|
3017
|
+
pointer-events: none;
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
&.idle {
|
|
3021
|
+
cursor: none;
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
.playback-status {
|
|
3025
|
+
position: absolute;
|
|
3026
|
+
inset: 0;
|
|
3027
|
+
display: grid;
|
|
3028
|
+
place-content: center;
|
|
3029
|
+
justify-items: center;
|
|
3030
|
+
gap: 1.2rem;
|
|
3031
|
+
pointer-events: none;
|
|
3032
|
+
color: var(--text-on-media);
|
|
3033
|
+
font: 600 14px/1.4 system-ui, sans-serif;
|
|
3034
|
+
text-shadow: 0 1px 4px #000;
|
|
3035
|
+
}
|
|
3036
|
+
|
|
3037
|
+
.playback-retry {
|
|
3038
|
+
pointer-events: auto;
|
|
3039
|
+
height: 3.6rem;
|
|
3040
|
+
padding: 0 1.6rem;
|
|
3041
|
+
border: none;
|
|
3042
|
+
border-radius: 1.8rem;
|
|
3043
|
+
background: #ffffff;
|
|
3044
|
+
color: #0f0f0f;
|
|
3045
|
+
font: 500 14px/1 system-ui, sans-serif;
|
|
3046
|
+
cursor: pointer;
|
|
3047
|
+
}
|
|
3048
|
+
|
|
3049
|
+
.spinner {
|
|
3050
|
+
position: absolute;
|
|
3051
|
+
top: 50%;
|
|
3052
|
+
left: 50%;
|
|
3053
|
+
width: 4.8rem;
|
|
3054
|
+
height: 4.8rem;
|
|
3055
|
+
margin: -2.4rem 0 0 -2.4rem;
|
|
3056
|
+
border: 0.4rem solid rgba(255, 255, 255, 0.25);
|
|
3057
|
+
border-top-color: #ffffff;
|
|
3058
|
+
border-radius: 50%;
|
|
3059
|
+
animation: player-spin 0.8s linear infinite;
|
|
3060
|
+
pointer-events: none;
|
|
3061
|
+
}
|
|
3062
|
+
|
|
3063
|
+
@keyframes player-spin {
|
|
3064
|
+
to {
|
|
3065
|
+
transform: rotate(360deg);
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3069
|
+
/* above the 72 px of seek rail and control groups, so it never covers a control */
|
|
3070
|
+
.sponsor-skip {
|
|
3071
|
+
position: absolute;
|
|
3072
|
+
right: 1.2rem;
|
|
3073
|
+
bottom: 8rem;
|
|
3074
|
+
height: 3.6rem;
|
|
3075
|
+
padding: 0 1.6rem;
|
|
3076
|
+
border: none;
|
|
3077
|
+
border-radius: 1.8rem;
|
|
3078
|
+
background: rgba(0, 0, 0, 0.6);
|
|
3079
|
+
color: #ffffff;
|
|
3080
|
+
font-size: 1.4rem;
|
|
3081
|
+
font-weight: 500;
|
|
3082
|
+
cursor: pointer;
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
.sponsor-skip:hover {
|
|
3086
|
+
background: rgba(0, 0, 0, 0.8);
|
|
3087
|
+
}
|
|
3088
|
+
|
|
3089
|
+
&.custom-captions video::cue {
|
|
3090
|
+
visibility: hidden;
|
|
3091
|
+
opacity: 0;
|
|
3092
|
+
color: transparent;
|
|
3093
|
+
background-color: transparent;
|
|
3094
|
+
text-shadow: none;
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3097
|
+
@container player (max-width: 600px) {
|
|
3098
|
+
.sponsor-skip {
|
|
3099
|
+
right: 0.8rem;
|
|
3100
|
+
bottom: 7.6rem;
|
|
3101
|
+
height: 3.2rem;
|
|
3102
|
+
padding: 0 1.2rem;
|
|
3103
|
+
font-size: 1.3rem;
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
`,ec=2500,tc=1e3,nc=5,rc=5,ic=10,ac=e=>{if(document.fullscreenElement){document.exitFullscreen().catch(()=>{});return}e?.closest(`[data-player-root]`)?.requestFullscreen().catch(()=>{})},oc=30,sc=e=>V`
|
|
3107
|
+
video::cue {
|
|
3108
|
+
${e};
|
|
3109
|
+
}
|
|
3110
|
+
`,cc=V`
|
|
3111
|
+
display: flex;
|
|
3112
|
+
gap: 0.8rem;
|
|
3113
|
+
|
|
3114
|
+
button {
|
|
3115
|
+
flex: 1;
|
|
3116
|
+
height: 3.6rem;
|
|
3117
|
+
border: none;
|
|
3118
|
+
border-radius: 1.8rem;
|
|
3119
|
+
font-size: 1.4rem;
|
|
3120
|
+
font-weight: 500;
|
|
3121
|
+
cursor: pointer;
|
|
3122
|
+
}
|
|
3123
|
+
|
|
3124
|
+
.add-time {
|
|
3125
|
+
background: var(--bg-chip);
|
|
3126
|
+
color: var(--text-primary);
|
|
3127
|
+
}
|
|
3128
|
+
|
|
3129
|
+
.add-time:hover {
|
|
3130
|
+
background: var(--bg-chip-hover);
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
.done {
|
|
3134
|
+
background: var(--bg-inverse);
|
|
3135
|
+
color: var(--text-inverse);
|
|
3136
|
+
}
|
|
3137
|
+
|
|
3138
|
+
.done:hover {
|
|
3139
|
+
background: var(--bg-inverse-hover);
|
|
3140
|
+
}
|
|
3141
|
+
`,lc=e=>{let t=As(e);return .05*Math.min(t.width,t.height)},uc=({videoId:e,playerParams:t,list:n,title:r,startAt:s,docked:c=!1,theater:l=!1,onTheater:u,onMiniplayer:d,upNext:f,chapters:p,segments:m=[],teasers:h=[],cardsAvatar:g,ambientMode:_,onAmbientMode:v,onVideoElement:b})=>{let x=L(null),[S,C]=F(null),w=N(e=>{x.current=e,C(e),b?.(e)},[b]),T=L(s??0),[E,D]=F(0),O=_e(()=>cs(),[e]),[k,A]=F(!0),[j,ee]=F(!1),[te,ne]=F(`maxres`),[M,re]=F(``),[ie,ae]=F(void 0),[oe,se]=F(!1),[ce,le]=F(!1),ue=N(()=>le(!1),[]),[de,fe]=F(void 0),[pe,me]=F([]),[he,ge]=F([]),[ve,ye]=F([]),[be,xe]=F(!1),[Se,Ce]=F(()=>Z().quality),we=L(void 0),[Te,I]=F([]),[Ee,De]=F(void 0),Oe=L(void 0),[ke,Ae]=F(!1),je=L(void 0),[Me,Ne]=F(()=>Z().stableVolume),Pe=L(Me),Fe=L(void 0),[Ie,Le]=F([]),[Re,ze]=F([]),[Be,Ve]=F(void 0),He=L(void 0),[Ue,We]=F(!0),Ge=L(void 0),[Ke,qe]=F(!1),[Je,Ye]=F(void 0),[Xe,Ze]=F(!1),R=N(()=>Ze(!1),[]),[Qe,$e]=F(!1),[et,tt]=F(``),[nt,rt]=F(0),[it,at]=F(!1),[st,ct]=F(void 0),lt=L(void 0),[ut,ft]=F(!1),[pt,mt]=F(0),ht=N(()=>ft(!1),[]),gt=N(()=>{ft(!1),x.current?.ended&&qe(!0)},[]),_t=N(()=>{ft(!1),mt(e=>e+1)},[]),vt=Gt(()=>{x.current?.pause(),c?ot(`Sleep timer has been turned off`):ft(!0)});P(()=>{c&&ft(!1)},[c]);let[yt,bt]=F(void 0),xt=N(()=>bt(void 0),[]),[V,Ct]=F(!1),wt=L(!1),H=N((e,t)=>{Ye(n=>({id:(n?.id??0)+1,icon:e,text:t}))},[]),W=Qs(S,de),Tt=p??[],Et=an(Tt,W.currentTime);P(()=>Bn(Et),[Et]);let G=An(),K=G?.grid??!1,Dt=()=>{G?.fullscreen?G.setAside(`description`):Vn()},Ot=ut||vt===`end`,kt=W.ended&&f?$n({queued:!Ot&&f.queued(),autoplay:f.autoplay,pick:f.pick,cancelled:Ke||Ot}):void 0,jt=f?.onNext,Nt=f?.onPrevious;P(()=>{kt===`advance`&&jt?.()},[kt]),P(()=>{W.ended&&Bt()===`end`&&Xt()},[W.ended]),P(()=>()=>clearTimeout(lt.current),[]),P(()=>{let e=x.current;if(!e)return;let t=()=>{let t=lc(e);rt(t),tt(Sn(Z(),t))};t();let n=new ResizeObserver(t);n.observe(e),e.addEventListener(`resize`,t);let r=Yn(t);return()=>{n.disconnect(),e.removeEventListener(`resize`,t),r()}},[E,S]),P(()=>{if(!S){at(!1);return}let e=()=>at(document.pictureInPictureElement===S);return e(),S.addEventListener(`enterpictureinpicture`,e),S.addEventListener(`leavepictureinpicture`,e),()=>{S.removeEventListener(`enterpictureinpicture`,e),S.removeEventListener(`leavepictureinpicture`,e)}},[S]);let Pt=L(m);Pt.current=m;let Ft=L(new Set),It=L([]),Lt=L(NaN),[Rt,zt]=F(void 0),Ht=(e,t)=>{let n=e.currentTime,r=Math.min(t,e.duration||t);Lt.current=r,zt({from:n,to:r,parts:Pt.current.filter(e=>e.start<r&&e.end>n)}),e.currentTime=r},Wt=()=>{let e=x.current;e&&Rt&&(It.current=Rt.parts,zt(void 0),e.currentTime=Rt.from,e.play().catch(()=>{}))};P(()=>{let e=x.current;if(!e)return;let t=!1,n=()=>{t=!0},r=()=>{let n=e.currentTime,r=Math.abs(n-Lt.current)<es;Lt.current=NaN,t&&(Ft.current=new Set([...r?[]:Pt.current.filter(e=>e.start<=n&&n<e.end),...It.current]),It.current=[],r||zt(void 0))},i=()=>{let t=e.seeking?void 0:rs(Pt.current,e.currentTime,Ft.current);t!==void 0&&Ht(e,t)};return e.addEventListener(`playing`,n),e.addEventListener(`seeking`,r),e.addEventListener(`timeupdate`,i),()=>{e.removeEventListener(`playing`,n),e.removeEventListener(`seeking`,r),e.removeEventListener(`timeupdate`,i)}},[E]),P(()=>{let n=x.current;if(!n)return;let r=Z();n.volume=r.volume,n.muted=r.muted,n.defaultPlaybackRate=r.playbackRate,n.playbackRate=r.playbackRate;let a=new AbortController,s,c,l,u=e=>{if(a.signal.aborted||l!==void 0)return;if(T.current=s?.player.isLive()?Qt(s.player.seekRange(),n.currentTime):n.currentTime||T.current,os(e)){a.abort();let t=O.refused();if(t===void 0){A(!1),re(`This video can't be played right now`),se(!0),console.error(e);return}A(!0),re(``),l=setTimeout(()=>D(e=>e+1),t);return}let t=o(e);if(e instanceof Error&&e.message===`youtube: live streams are not playable in this client yet`||t?.final===!0||!O.spend()){if(s?.destroy(),A(!1),t?.final!==!0&&console.error(e),t){re(``),ae(t);return}let n=e instanceof Error?e.message:String(e);re(`Playback failed: ${n}`);return}let r=as(e);l=setTimeout(()=>{a.signal.aborted||(r&&dt(),D(e=>e+1))},O.used===1&&!r?100:1e3)},d=()=>O.progress(n.currentTime);n.addEventListener(`timeupdate`,d),A(!0),re(``),se(!1),le(!1);let f=Tn();return f.catch(()=>{}),(async()=>{let r=await St();if(a.signal.aborted)return;let o=Z(),l=T.current,d=o.quality,p=Math.max(360,Math.ceil(n.getBoundingClientRect().height*devicePixelRatio)),m=d===`auto`?l===0?Math.min(720,p):p:d,h=d===`auto`?l>0?{prewarm:!1}:void 0:{pinnedHeight:d,...l>0?{prewarm:!1}:{}},g=h?r.openPlayback(e,m,t,o.stableVolume,h):r.openPlayback(e,m,t,o.stableVolume);g.catch(()=>{}),c={api:r,promise:g};let{startShakaPlayback:_}=await f;if(a.signal.aborted||(c=void 0,s=await _({api:r,video:n,videoId:e,playerParams:t,stableVolume:o.stableVolume,startTime:l,maxHeight:m,pinVideoFormat:d!==`auto`,openOptions:h,sessionPromise:g,signal:a.signal,onError:u,onEndScreen:ye,onAutoplayMuted:()=>{a.signal.aborted||le(!0)}}),a.signal.aborted))return;A(!1),re(``),xn(e,(e,t)=>{n.currentTime=e,t&&n.play().catch(()=>{})},()=>n.currentTime),fe(s.player),me(s.heights),ge(s.storyboards),xe(s.isLive),we.current=s.selectQuality,I(s.audioTracks),De(s.audioTrackId),Oe.current=s.audioTrackId,je.current=s.hasDrc,Ae(s.hasDrc(s.audioTrackId)),Fe.current=s.selectAudio,Le(s.captionTracks),ze(s.translationLanguages),He.current=s.selectCaption;let v=i(s.captionTracks,s.translationLanguages,Z(),navigator.language);if(Ve(v),v){let e=s.selectCaption;e(v.trackId,v.translateTo).catch(()=>{if(!v.translateTo){Ve(e=>e?.trackId===v.trackId&&!e.translateTo?void 0:e);return}let t={trackId:v.trackId};Ve(e=>e?.trackId===v.trackId&&e.translateTo===v.translateTo?t:e),e(t.trackId).catch(()=>{Ve(e=>e?.trackId===t.trackId&&!e.translateTo?void 0:e)})})}})().catch(e=>{a.signal.aborted||u(e)}),()=>{if(a.abort(),n.removeEventListener(`timeupdate`,d),clearTimeout(l),Fn(e),fe(void 0),me([]),ge([]),ye([]),xe(!1),I([]),De(void 0),Oe.current=void 0,je.current=void 0,Ae(!1),Fe.current=void 0,Ve(void 0),Le([]),ze([]),He.current=void 0,le(!1),c){let{api:e,promise:t}=c;t.then(t=>e.closePlayback(t.id)).catch(()=>{})}s?.destroy()}},[E,e,t]);let Kt=N(e=>{Ce(e),J({quality:e}),we.current?.(e).catch(()=>{})},[]);P(()=>Yn(e=>{e.stableVolume!==Pe.current&&(Pe.current=e.stableVolume,Ne(e.stableVolume),Fe.current?.(Oe.current,e.stableVolume).catch(()=>{}))}),[]);let Yt=N(e=>{De(e),Oe.current=e,Ae(je.current?.(e)??!1),Fe.current?.(e,Pe.current).catch(()=>{})},[]),Zt=N(e=>{J({stableVolume:e})},[]),$t=N(e=>{if(!e){Ve(void 0),J({captionsEnabled:!1}),He.current?.(void 0).catch(()=>{});return}if(e.translateTo){He.current?.(e.trackId,e.translateTo).then(()=>{Ve(e),J({captionsEnabled:!0,captionsLanguage:e.translateTo})},()=>{ot(`Auto-translate is not available right now`)});return}Ve(e);let t=Ie.find(t=>t.id===e.trackId);t&&J({captionsEnabled:!0,captionsLanguage:t.languageCode}),He.current?.(e.trackId).catch(()=>{Ve(t=>t?.trackId===e.trackId&&!t.translateTo?void 0:t),ot(`Subtitles are not available for this video right now`)})},[Ie]),en=L(void 0);Be&&(en.current=Be);let tn=()=>{if(Be)return $t(void 0);let e=en.current,t=e&&Ie.some(t=>t.id===e.trackId)&&(!e.translateTo||Re.some(t=>t.languageCode===e.translateTo))?e:(()=>{let e=a(Ie,navigator.language);return e?{trackId:e.id}:void 0})();t&&$t(t)},nn=N(()=>{We(!0),clearTimeout(Ge.current),Ge.current=setTimeout(()=>We(!1),ec)},[]);P(()=>()=>clearTimeout(Ge.current),[]),P(()=>(document.addEventListener(`fullscreenchange`,xt),()=>document.removeEventListener(`fullscreenchange`,xt)),[xt]);let rn=e=>{let t=wt.current;if(wt.current=!1,t)return;e.preventDefault();let n=e.currentTarget.getBoundingClientRect();bt({x:e.clientX-n.left,y:e.clientY-n.top})},on=e=>{let t=x.current,n=Z().captionSize,r=Wn(n,e);if(!t||r===n)return;J({captionSize:r});let i=[...t.textTracks].some(e=>e.mode===`showing`&&(e.activeCues?.length??0)>0);ct(i?void 0:lc(t)*r/100),clearTimeout(lt.current),lt.current=setTimeout(()=>ct(void 0),tc)},sn=L({docked:c,onTheater:u,onNext:jt,onPrevious:Nt,onMiniplayer:d,toggleCaption:tn,resizeCaptions:on,player:de,shortcuts:Xe,timesUp:ut,chapterList:Tt});sn.current={docked:c,onTheater:u,onNext:jt,onPrevious:Nt,onMiniplayer:d,toggleCaption:tn,resizeCaptions:on,player:de,shortcuts:Xe,timesUp:ut,chapterList:Tt},P(()=>{let e=e=>{let t=x.current;if(!t||e.defaultPrevented||Jt(e.target))return;let n=sn.current;if(n.shortcuts||n.timesUp)return;let r=e.key,i=()=>{e.preventDefault(),nn()};if(e.ctrlKey&&!e.metaKey&&!e.altKey&&!e.shiftKey&&(r===`ArrowLeft`||r===`ArrowRight`)){let e=Ut(n.chapterList,t.currentTime,r===`ArrowRight`?1:-1);if(e===void 0)return;i(),t.currentTime=e;return}if(e.ctrlKey||e.metaKey||e.altKey)return;let a=ar(t,n.player),o=e=>{t.currentTime=qt(a,t.currentTime+e),H(e<0?`back`:`forward`,String(Math.abs(e)))},s=e=>{t.volume=e,J({volume:t.volume}),H(t.volume===0?`mute`:`volume`,`${Math.round(t.volume*100)}%`)},c=e=>{let r=n.player?.getVariantTracks().find(e=>e.active)?.frameRate||oc;t.currentTime=Math.max(0,Math.min(t.duration||0,t.currentTime+e/r))};switch(r){case` `:case`k`:i(),t.paused?(t.play().catch(()=>{}),H(`play`)):(t.pause(),H(`pause`));return;case`ArrowLeft`:i(),o(-5);return;case`ArrowRight`:i(),o(rc);return;case`j`:i(),o(-10);return;case`l`:i(),o(ic);return;case`ArrowUp`:i(),s(Math.min(1,t.volume+.05));return;case`ArrowDown`:i(),s(Math.max(0,t.volume-.05));return;case`m`:i(),t.muted=!t.muted,J({muted:t.muted}),H(t.muted?`mute`:`volume`);return;case`c`:i(),n.toggleCaption();return;case`+`:case`=`:case`-`:case`_`:if(e.code.startsWith(`Numpad`))return;i(),n.resizeCaptions(r===`+`||r===`=`?1:-1);return;case`<`:case`>`:{i();let e=vn(t.playbackRate,r===`>`?1:-1);t.playbackRate=e,J({playbackRate:e}),H(`speed`,`${e}x`);return}case`,`:case`.`:if(!t.paused)return;i(),c(r===`.`?1:-1);return;case`f`:if(n.docked)return;i(),ac(t);return;case`t`:if(n.docked)return;i(),n.onTheater?.();return;case`Escape`:if(!n.docked)return;i(),_n();return;case`i`:if(!n.onMiniplayer)return;i(),n.onMiniplayer();return;case`?`:i(),Ze(!0);return;case`N`:if(!e.shiftKey||!n.onNext)return;i(),n.onNext();return;case`P`:if(!e.shiftKey||!n.onPrevious)return;i(),n.onPrevious();return;case`Home`:i(),t.currentTime=a.start;return;case`End`:i(),t.currentTime=a.end;return;default:/^[0-9]$/.test(r)&&a.end>a.start&&(i(),t.currentTime=Mt(a,Number(r)/10))}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[nn,H]);let q=S,cn=!M&&!ie&&(k||!!de&&(W.buffering||W.seeking)),ln=!j&&!M&&!ie&&te!==`none`?`https://i.ytimg.com/vi/${encodeURIComponent(e)}/${te===`maxres`?`maxresdefault`:`hqdefault`}.jpg`:void 0,un=W.currentTime,dn=Rt!==void 0&&un>Rt.to-.001&&un<Rt.to+nc,fn=dn?void 0:m.find(e=>!Ft.current.has(e)&&e.start>un&&e.start-un<=nc),pn=[!Ue&&!W.paused&&!yt&&!K?`idle`:void 0,it?void 0:`custom-captions`].filter(Boolean).join(` `)||void 0,mn=()=>{let e=x.current;e&&!wt.current&&(e.paused?(e.play().catch(()=>{}),H(`play`)):(e.pause(),H(`pause`)))},hn=c?void 0:()=>ac(x.current);return z(`div`,{css:[$s,sc(et)],"data-player-surface":!0,className:pn,onPointerMove:nn,onPointerLeave:()=>We(!1),onPointerDown:()=>{wt.current=yt!==void 0},onContextMenu:rn,children:[U(Xo,{video:q,enabled:_!==!1,fullscreen:G?.fullscreen??!1,docked:c,hasFrame:j,blocked:!!(M||ie)}),ln?U(`img`,{className:`poster`,src:ln,alt:``,"aria-hidden":`true`,referrerpolicy:`no-referrer`,onLoad:e=>{te===`maxres`&&e.currentTarget.naturalWidth<=120&&ne(`hq`)},onError:()=>ne(e=>e===`maxres`?`hq`:`none`)}):void 0,U(`video`,{ref:w,playsInline:!0,preload:`auto`,loop:Qe,onLoadedData:()=>ee(!0),onPlaying:()=>ee(!0),onClick:mn,onDblClick:hn},E),cn?U(`div`,{className:`spinner`}):void 0,q&&!it&&!M&&!ie?U(ks,{video:q,cueStyle:et,baseSize:nt,controlsVisible:(Ue||W.paused||V)&&!K,docked:c,sample:st,onDragStart:nn,onClick:mn,onDblClick:hn}):void 0,Je?U(vs,{cue:Je},Je.id):void 0,M?z(`div`,{className:`playback-status`,children:[M,oe?U(`button`,{type:`button`,className:`playback-retry`,onClick:()=>{O.reset(),D(e=>e+1)},children:`Retry`}):void 0]}):void 0,ie?U(Js,{refusal:ie}):void 0,q&&ce&&!c&&!M&&!ie?U(hs,{video:q,onDismiss:ue}):void 0,q&&de&&!M&&!ie&&ve.length>0?U(Rs,{elements:ve,video:q,time:un,ended:W.ended,docked:c,underCards:h.length>0,onOpen:f?.onOpen}):void 0,q&&de&&!M&&!ie&&!c&&h.length>0?U(Ws,{teasers:h,avatar:g,time:un,shown:(Ue||W.paused)&&!K,ended:W.ended,onOpen:Dt}):void 0,f&&kt===`countdown`&&f.pick?U(Dn,{target:f.pick,onOpen:f.onOpen,onCancel:()=>qe(!0)}):f&&kt===`suggestions`&&f.suggestions.length>0?U(Rn,{videos:f.suggestions,onOpen:f.onOpen}):void 0,c?U(Ks,{video:q&&!M&&!ie?q:void 0,state:W,isLive:be,onExpand:d}):void 0,q&&!M&&!ie?z(B,{children:[U(fs,{video:q,videoId:e,active:!c&&!be}),U(At,{video:q,player:de,state:W,heights:pe,storyboards:he,quality:Se,onQuality:Kt,audioTracks:Te,audioTrackId:Ee,onAudioTrack:Yt,hasDrc:ke,stableVolume:Me,onStableVolume:Zt,ambientMode:_,onAmbientMode:v,captionTracks:Ie,translationLanguages:Re,caption:Be,onCaption:$t,onToggleCaption:tn,theater:l,onTheater:()=>u?.(),onNext:jt,autoplay:f?.autoplay,onAutoplay:f?.onAutoplay,isLive:be,chapters:p,onChapters:()=>Gn(`chapters`),segments:m,sleepTimer:vt,sleepMenu:pt,docked:c,visible:(Ue||W.paused)&&!K,onMenu:Ct})]}):void 0,q&&de&&!M&&!ie&&dn?U(`button`,{type:`button`,className:`sponsor-skip`,onClick:Wt,children:`Undo`}):q&&de&&!M&&!ie&&fn?U(`button`,{type:`button`,className:`sponsor-skip`,onClick:()=>Ht(q,rs(m,fn.start,Ft.current)??fn.end),children:`Skip sponsor`}):void 0,G?.fullscreen&&G.view?U(G.view.FullscreenView,{shown:Ue||W.paused||V,settings:V}):void 0,q&&yt?U(Ys,{at:()=>{let e=q.closest(`[data-player-root]`).getBoundingClientRect();return{x:e.left+yt.x,y:e.top+yt.y}},onClose:xt,video:q,videoId:e,list:n,title:r,loop:Qe,onLoop:()=>$e(e=>!e),onMiniplayer:c||document.fullscreenElement?void 0:d,onCopied:H}):void 0,Xe?y(U(Ii,{onClose:R}),document.body):void 0,ut?y(U(Vt,{title:`Time's up`,onClose:ht,onEscape:gt,closeButton:!1,children:z(`div`,{css:cc,children:[U(`button`,{type:`button`,className:`add-time`,onClick:_t,children:`Add time`}),U(`button`,{type:`button`,className:`done`,onClick:ht,children:`Close`})]})}),document.fullscreenElement??document.body):void 0]})},dc=ft(`
|
|
3142
|
+
query WatchMeta($id: ID!, $playlistId: ID, $playlistIndex: Int) {
|
|
3143
|
+
watch(id: $id, playlistId: $playlistId, playlistIndex: $playlistIndex) {
|
|
3144
|
+
id
|
|
3145
|
+
unavailableText
|
|
3146
|
+
isLive
|
|
3147
|
+
hasChatReplay
|
|
3148
|
+
concurrentViewers
|
|
3149
|
+
title
|
|
3150
|
+
isMembersOnly
|
|
3151
|
+
commentsHidden
|
|
3152
|
+
viewCountText
|
|
3153
|
+
publishedDateText
|
|
3154
|
+
shortViewCountText
|
|
3155
|
+
relativeDateText
|
|
3156
|
+
hashtags
|
|
3157
|
+
likeCountText
|
|
3158
|
+
commentCountText
|
|
3159
|
+
description
|
|
3160
|
+
descriptionRuns { text url videoId startSeconds browseId }
|
|
3161
|
+
likeStatus
|
|
3162
|
+
channel { id name avatar handle subscriberCountText isSubscribed notificationLevel isVerified isVerifiedArtist }
|
|
3163
|
+
byline { text isVerified isVerifiedArtist }
|
|
3164
|
+
collaborators { id name avatar handle subscriberCountText isSubscribed notificationLevel isVerified isVerifiedArtist }
|
|
3165
|
+
relatedCursor
|
|
3166
|
+
autoplayId
|
|
3167
|
+
chapters { title startSeconds thumbnail }
|
|
3168
|
+
transcriptPanel { panelId params }
|
|
3169
|
+
music { countText channelId songs { title artist album thumbnail videoId } }
|
|
3170
|
+
channelCard {
|
|
3171
|
+
id
|
|
3172
|
+
name
|
|
3173
|
+
avatar
|
|
3174
|
+
subscriberCountText
|
|
3175
|
+
videosUrl
|
|
3176
|
+
aboutUrl
|
|
3177
|
+
links { title url }
|
|
3178
|
+
cards { title subtitle thumbnail duration videoId channelId url }
|
|
3179
|
+
}
|
|
3180
|
+
cardTeasers { text startMs durationMs }
|
|
3181
|
+
related {
|
|
3182
|
+
id
|
|
3183
|
+
title
|
|
3184
|
+
thumbnail
|
|
3185
|
+
thumbnailSrcset
|
|
3186
|
+
animatedThumbnail
|
|
3187
|
+
thumbnailBadge
|
|
3188
|
+
durationSeconds
|
|
3189
|
+
isMusic
|
|
3190
|
+
viewCount
|
|
3191
|
+
viewCountIcon
|
|
3192
|
+
publishedText
|
|
3193
|
+
metaDelimiter
|
|
3194
|
+
isLive
|
|
3195
|
+
isMembersOnly
|
|
3196
|
+
isShort
|
|
3197
|
+
channel { id name isVerified isVerifiedArtist }
|
|
3198
|
+
byline { text isVerified isVerifiedArtist }
|
|
3199
|
+
collaborators { id name avatar handle subscriberCountText isVerified isVerifiedArtist }
|
|
3200
|
+
notInterestedToken
|
|
3201
|
+
dontRecommendToken
|
|
3202
|
+
}
|
|
3203
|
+
playlist {
|
|
3204
|
+
id
|
|
3205
|
+
title
|
|
3206
|
+
author
|
|
3207
|
+
currentIndex
|
|
3208
|
+
isInfinite
|
|
3209
|
+
items {
|
|
3210
|
+
id
|
|
3211
|
+
title
|
|
3212
|
+
thumbnail
|
|
3213
|
+
thumbnailSrcset
|
|
3214
|
+
durationSeconds
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
}
|
|
3218
|
+
}
|
|
3219
|
+
`),fc=e=>({viewCountText:e.viewCountText,publishedDateText:e.publishedDateText,shortViewCountText:e.shortViewCountText,relativeDateText:e.relativeDateText,hashtags:e.hashtags,description:e.description,runs:e.descriptionRuns,music:e.music,channelCard:e.channelCard});M(),I();var pc=V`
|
|
3220
|
+
/* The dock is always mounted so the player's DOM home has somewhere to live
|
|
3221
|
+
even before a route claims it. It only becomes VISIBLE once a video is
|
|
3222
|
+
playing and no route is showing it. */
|
|
3223
|
+
position: fixed;
|
|
3224
|
+
right: 1.6rem;
|
|
3225
|
+
bottom: 1.6rem;
|
|
3226
|
+
z-index: 60;
|
|
3227
|
+
width: 40rem;
|
|
3228
|
+
max-width: calc(100vw - 3.2rem);
|
|
3229
|
+
border-radius: 1.2rem;
|
|
3230
|
+
overflow: hidden;
|
|
3231
|
+
background: var(--bg-subtle);
|
|
3232
|
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.2);
|
|
3233
|
+
|
|
3234
|
+
&.hidden {
|
|
3235
|
+
/* Moved off-screen rather than hidden with display none: the player lives
|
|
3236
|
+
in here, and a display-none ancestor gives the video element a zero-sized
|
|
3237
|
+
box. Shaka's restrictToElementSize then filters every variant away and
|
|
3238
|
+
the next quality decision picks the floor. Off-screen, the element keeps
|
|
3239
|
+
its real dimensions. */
|
|
3240
|
+
position: fixed;
|
|
3241
|
+
left: -20000px;
|
|
3242
|
+
top: 0;
|
|
3243
|
+
right: auto;
|
|
3244
|
+
bottom: auto;
|
|
3245
|
+
width: 40rem;
|
|
3246
|
+
box-shadow: none;
|
|
3247
|
+
pointer-events: none;
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
/* above the lines under it, which the knob overhangs as on youtube.com */
|
|
3251
|
+
.dock-slot {
|
|
3252
|
+
position: relative;
|
|
3253
|
+
z-index: 1;
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
/* youtube.com's miniplayer has none of the player bar's groups, only its seek bar, drawn all the time along the
|
|
3257
|
+
bottom edge of the video, 3 px tall */
|
|
3258
|
+
.dock-slot [data-player-root] {
|
|
3259
|
+
border-radius: 0;
|
|
3260
|
+
overflow: visible;
|
|
3261
|
+
}
|
|
3262
|
+
|
|
3263
|
+
.dock-slot .bar {
|
|
3264
|
+
display: none;
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
.dock-slot div:has(> .scrubber) {
|
|
3268
|
+
padding: 0;
|
|
3269
|
+
opacity: 1;
|
|
3270
|
+
pointer-events: auto;
|
|
3271
|
+
}
|
|
3272
|
+
|
|
3273
|
+
.dock-slot .scrubber {
|
|
3274
|
+
padding-bottom: 0;
|
|
3275
|
+
}
|
|
3276
|
+
|
|
3277
|
+
.dock-slot .rail {
|
|
3278
|
+
height: 0.3rem;
|
|
3279
|
+
}
|
|
3280
|
+
|
|
3281
|
+
/* youtube.com's miniplayer names no chapter under the frame its seek bar shows */
|
|
3282
|
+
.preview-chapter {
|
|
3283
|
+
display: none;
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
.dock-meta {
|
|
3287
|
+
height: 7.6rem;
|
|
3288
|
+
padding: 1.2rem 1.6rem;
|
|
3289
|
+
}
|
|
3290
|
+
|
|
3291
|
+
.dock-title,
|
|
3292
|
+
.dock-name {
|
|
3293
|
+
overflow: hidden;
|
|
3294
|
+
text-overflow: ellipsis;
|
|
3295
|
+
white-space: nowrap;
|
|
3296
|
+
}
|
|
3297
|
+
|
|
3298
|
+
.dock-title {
|
|
3299
|
+
display: block;
|
|
3300
|
+
color: var(--text-primary);
|
|
3301
|
+
font-size: 1.4rem;
|
|
3302
|
+
font-weight: 500;
|
|
3303
|
+
line-height: 2rem;
|
|
3304
|
+
text-decoration: none;
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3307
|
+
.dock-byline {
|
|
3308
|
+
display: flex;
|
|
3309
|
+
margin-top: 0.4rem;
|
|
3310
|
+
color: var(--text-secondary);
|
|
3311
|
+
font-size: 1.2rem;
|
|
3312
|
+
line-height: 1.8rem;
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3315
|
+
.dock-index {
|
|
3316
|
+
flex: none;
|
|
3317
|
+
}
|
|
3318
|
+
|
|
3319
|
+
.dock-index::before {
|
|
3320
|
+
content: '•';
|
|
3321
|
+
margin: 0 0.4rem;
|
|
3322
|
+
}
|
|
3323
|
+
`,mc=()=>{let e=En(),t=!!e.videoId&&!e.claimed,[n,r]=Re(),i=$e(),[a,o]=F(()=>Z().autoplay);P(()=>Yn(e=>o(e.autoplay)),[]);let s=In(`ambientMode`),[c,l]=F(null),[u,d]=F(!1),f=e.videoId,[{data:p}]=_t({query:dc,variables:{id:f??``,playlistId:e.list,playlistIndex:e.index},pause:!f}),m=f!==void 0&&p?.watch?.id===f?p.watch:void 0,h=is(m&&!m.isLive?m.id:void 0);P(()=>{f&&mn(f),Ft(f)},[f]);let g=er(),_=e.list!==void 0&&m?.playlist?.id===e.list?m.playlist:void 0,v=_?.items.length??0,b=Math.min(Math.max(_?.currentIndex??0,0),Math.max(v-1,0)),x=_?void 0:ir(g),S=_?void 0:hn(g),C=x===void 0?void 0:g.items[x],w=()=>_!==void 0&&rr(b,v)||!_&&ir(g)!==void 0,T=In(`hideShorts`),E=_e(()=>(m?.related??[]).filter(e=>e.id!==f&&(!T||e.isShort!==!0)),[m,f,T]),D=m?.autoplayId,O=_e(()=>f?$t(E,f,{preferred:D}):void 0,[E,f,D]),k=C??O,A=L(void 0),j=e=>{if(Ln().claimed){if(!document.fullscreenElement){r(dn(e));return}A.current??=`${window.location.pathname}${window.location.search}`}Qn({videoId:e.id,title:e.title??void 0,list:e.list,index:e.index})};P(()=>{let e=()=>{if(document.fullscreenElement)return;let e=A.current;A.current=void 0;let t=Ln();e===`${window.location.pathname}${window.location.search}`&&t.videoId&&t.claimed&&new URLSearchParams(window.location.search).get(`v`)!==t.videoId&&r(dn({id:t.videoId,list:t.list,index:t.index}))};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[r]);let ee=e=>{let t=e===void 0?void 0:_?.items[e];return t&&_?{id:t.id,title:t.title,thumbnail:t.thumbnail,list:_.id,index:e}:void 0},te=L(`/`);P(()=>{n.startsWith(`/watch`)||(te.current=i?`${n}?${i}`:n)},[n,i]);let ne=()=>{let e=Ln();e.videoId&&r(e.claimed?te.current:dn({id:e.videoId,list:e.list,index:e.index}))},M=v>1||k?()=>{let e=_?ee(tr(b,v))??O:C??O;e&&j(e)}:void 0,re=_?()=>{let e=ee(Nt(b,v));e&&j(e)}:S===void 0?void 0:()=>{let e=g.items[S];e&&j(e)};return z(B,{children:[z(`aside`,{css:pc,className:t?void 0:`hidden`,"aria-label":`Miniplayer`,"aria-hidden":!t,children:[U(`div`,{className:`dock-slot`,ref:Cn}),t?z(`div`,{className:`dock-meta`,children:[U(K,{className:`dock-title`,href:dn({id:e.videoId,list:e.list,index:e.index}),children:m?.title??e.title??`Now playing`}),_||g.currentIndex>=0||m?.channel?.name?z(`div`,{className:`dock-byline`,children:[U(`span`,{className:`dock-name`,children:_?_.title??`Playlist`:g.currentIndex>=0?`Queue`:m?.channel?.name}),_&&v>0?z(`span`,{className:`dock-index`,children:[b+1,` / `,v]}):!_&&g.currentIndex>=0?z(`span`,{className:`dock-index`,children:[g.currentIndex+1,` / `,g.items.length]}):void 0]}):void 0]}):void 0]}),y(e.videoId?z(B,{children:[U(Yo,{video:c,enabled:s,fullscreen:u,docked:t}),U(Kn,{onFullscreenChange:d,details:{videoId:e.videoId,list:e.list,title:m?.title??e.title,likeStatus:m?.likeStatus,commentsHidden:m?.commentsHidden===!0,commentCountText:m?.commentCountText,videos:E,onOpen:j,chapters:m?.chapters??[],chapter:e.chapter,panel:e.panel,transcript:m?.transcriptPanel??void 0,description:m?fc(m):void 0},children:U(uc,{videoId:e.videoId,playerParams:e.playerParams,list:e.list,title:e.title,startAt:e.startAt,docked:t,theater:e.theater,onTheater:()=>kn(!e.theater),onMiniplayer:ne,ambientMode:s,onAmbientMode:()=>J({ambientMode:!s}),onVideoElement:l,chapters:m?.chapters,segments:h,teasers:m?.cardTeasers,cardsAvatar:m?.channelCard?.avatar,upNext:{autoplay:a,onAutoplay:e=>J({autoplay:e}),queued:w,pick:k,suggestions:E,onNext:M,onPrevious:re,onOpen:j}},`player:${e.videoId}`)})]}):null,yn())]})},hc={HOME:`featured`,VIDEOS:`videos`,SHORTS:`shorts`,LIVE:`streams`,RELEASES:`releases`,PODCASTS:`podcasts`,COURSES:`courses`,SHOWS:`shows`,PLAYLISTS:`playlists`,COMMUNITY:`posts`,STORE:`store`,ABOUT:`about`,SEARCH:`search`},gc=Object.keys(hc),_c=e=>{let t=e.toLowerCase();return t===`community`?`COMMUNITY`:gc.find(e=>hc[e]===t)},vc=e=>{let t=e?.sequence;return typeof t==`string`?t:void 0},yc=V`
|
|
3324
|
+
min-width: 0;
|
|
3325
|
+
|
|
3326
|
+
.thumb {
|
|
3327
|
+
display: block;
|
|
3328
|
+
aspect-ratio: 2 / 3;
|
|
3329
|
+
border-radius: 0.8rem;
|
|
3330
|
+
overflow: hidden;
|
|
3331
|
+
background: var(--bg-elevated);
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3334
|
+
.thumb img {
|
|
3335
|
+
display: block;
|
|
3336
|
+
width: 100%;
|
|
3337
|
+
height: 100%;
|
|
3338
|
+
object-fit: cover;
|
|
3339
|
+
}
|
|
3340
|
+
|
|
3341
|
+
.details {
|
|
3342
|
+
position: relative;
|
|
3343
|
+
padding: 0.8rem 3.6rem 0 0;
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3346
|
+
.title {
|
|
3347
|
+
margin: 0 0 0.4rem;
|
|
3348
|
+
font-size: 1.6rem;
|
|
3349
|
+
font-weight: 500;
|
|
3350
|
+
line-height: 2.2rem;
|
|
3351
|
+
color: var(--text-primary);
|
|
3352
|
+
display: -webkit-box;
|
|
3353
|
+
-webkit-line-clamp: 2;
|
|
3354
|
+
-webkit-box-orient: vertical;
|
|
3355
|
+
overflow: hidden;
|
|
3356
|
+
}
|
|
3357
|
+
|
|
3358
|
+
.views {
|
|
3359
|
+
font-size: 1.4rem;
|
|
3360
|
+
line-height: 2rem;
|
|
3361
|
+
color: var(--text-secondary);
|
|
3362
|
+
}
|
|
3363
|
+
|
|
3364
|
+
.more-menu {
|
|
3365
|
+
position: absolute;
|
|
3366
|
+
top: 0.8rem;
|
|
3367
|
+
right: 0;
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3370
|
+
.more {
|
|
3371
|
+
width: 4rem;
|
|
3372
|
+
height: 4rem;
|
|
3373
|
+
display: flex;
|
|
3374
|
+
align-items: center;
|
|
3375
|
+
justify-content: center;
|
|
3376
|
+
border: none;
|
|
3377
|
+
border-radius: 50%;
|
|
3378
|
+
background: transparent;
|
|
3379
|
+
color: var(--text-primary);
|
|
3380
|
+
cursor: pointer;
|
|
3381
|
+
}
|
|
3382
|
+
|
|
3383
|
+
.more:hover,
|
|
3384
|
+
.more-menu[data-open] .more {
|
|
3385
|
+
background: var(--bg-hover);
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
@media (max-width: 1023px) {
|
|
3389
|
+
.views {
|
|
3390
|
+
font-size: 1.2rem;
|
|
3391
|
+
line-height: 1.8rem;
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3394
|
+
`,bc=({short:e})=>{let t=zt(e.id),n=e.shortsSequence?{sequence:e.shortsSequence}:void 0,r=Pt(e.viewCount),i=On(e.id);return z(`article`,{css:yc,className:`tile`,...i,children:[U(K,{href:t,state:n,className:`thumb`,tabIndex:-1,"aria-hidden":`true`,children:e.thumbnail?U(jn,{src:e.thumbnail,srcSet:e.thumbnailSrcset,sizes:`21rem`}):void 0}),z(`div`,{className:`details`,children:[U(`h3`,{className:`title`,children:U(K,{href:t,state:n,children:e.title})}),r?U(`div`,{className:`views`,children:r}):void 0,U(Lt,{videoId:e.id,title:e.title,iconSize:24,short:!0,class:`more-menu`})]})]})},xc=V`
|
|
3395
|
+
/* A full-width band in the grid's second row. An item placed on both axes is
|
|
3396
|
+
placed before every auto-placed card, so the cards fill the first row at
|
|
3397
|
+
whatever column count the width gives and continue below the shelf. */
|
|
3398
|
+
grid-row: 2;
|
|
3399
|
+
grid-column: 1 / -1;
|
|
3400
|
+
margin: 1.6rem 0 2.4rem;
|
|
3401
|
+
|
|
3402
|
+
.shelf-head {
|
|
3403
|
+
display: flex;
|
|
3404
|
+
align-items: center;
|
|
3405
|
+
gap: 0.8rem;
|
|
3406
|
+
margin-bottom: 1.6rem;
|
|
3407
|
+
}
|
|
3408
|
+
|
|
3409
|
+
.shelf-title {
|
|
3410
|
+
margin: 0;
|
|
3411
|
+
font-size: 2rem;
|
|
3412
|
+
font-weight: 700;
|
|
3413
|
+
color: var(--text-primary);
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
.tile {
|
|
3417
|
+
width: 21rem;
|
|
3418
|
+
}
|
|
3419
|
+
`,Sc=({shorts:e,title:t=`Shorts`})=>e.length===0?null:z(`section`,{css:xc,"aria-label":t,children:[z(`div`,{className:`shelf-head`,children:[z(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[U(`path`,{fill:`#f00`,d:`M17.77 10.32l-1.2-.5 1.2-.5a3.7 3.7 0 0 0-3.24-6.64L5.1 7.2a3.7 3.7 0 0 0 .13 6.68l1.2.5-1.2.5a3.7 3.7 0 0 0 3.24 6.64l9.43-4.52a3.7 3.7 0 0 0-.13-6.68z`}),U(`path`,{fill:`#fff`,d:`M10 14.65v-5.3L15 12z`})]}),U(`h2`,{className:`shelf-title`,children:t})]}),U(gn,{label:`shorts`,count:e.length,children:e.map(e=>U(bc,{short:e},e.id))})]}),Cc=V`
|
|
3420
|
+
display: grid;
|
|
3421
|
+
grid-template-columns: repeat(auto-fill, minmax(38rem, 1fr));
|
|
3422
|
+
column-gap: 1.6rem;
|
|
3423
|
+
row-gap: 4rem;
|
|
3424
|
+
|
|
3425
|
+
/* The channel column is 642, 856, 1070 or 1284px wide, and youtube.com puts
|
|
3426
|
+
two, two, three and three cards across them: 31rem is a minimum that does. */
|
|
3427
|
+
&.channel {
|
|
3428
|
+
grid-template-columns: repeat(auto-fill, minmax(31rem, 1fr));
|
|
3429
|
+
row-gap: 2.4rem;
|
|
3430
|
+
}
|
|
3431
|
+
|
|
3432
|
+
@media (max-width: 500px) {
|
|
3433
|
+
grid-template-columns: 1fr;
|
|
3434
|
+
}
|
|
3435
|
+
`,wc=12,Tc=4,Ec=({videos:e,fetching:t=!1,variant:n,context:r,shelf:i,recommendable:a})=>z(`div`,{css:Cc,className:n,children:[i,e.map(e=>U(en,{video:e,variant:n,context:r,recommendable:a},e.id)),t?Array.from({length:e.length===0?wc:Tc},(e,t)=>U(It,{},`skeleton-${t}`)):void 0]}),Dc=(e,t)=>{let n=t?[...e,t]:e;return{videos:n,shorts:n.map(e=>({items:e.shorts,cursor:e.cursor}))}};I();var Oc=ft(`
|
|
3436
|
+
query HomeFeed($chip: ID, $cursor: String) {
|
|
3437
|
+
home(chip: $chip, cursor: $cursor) {
|
|
3438
|
+
items {
|
|
3439
|
+
id
|
|
3440
|
+
title
|
|
3441
|
+
inlinePlayerParams
|
|
3442
|
+
thumbnail
|
|
3443
|
+
thumbnailSrcset
|
|
3444
|
+
durationSeconds
|
|
3445
|
+
viewCount
|
|
3446
|
+
publishedText
|
|
3447
|
+
isLive
|
|
3448
|
+
isShort
|
|
3449
|
+
progressPercent
|
|
3450
|
+
channel { id name avatar isVerified isVerifiedArtist }
|
|
3451
|
+
byline { text isVerified isVerifiedArtist }
|
|
3452
|
+
collaborators { id name avatar handle subscriberCountText isVerified isVerifiedArtist }
|
|
3453
|
+
notInterestedToken
|
|
3454
|
+
dontRecommendToken
|
|
3455
|
+
}
|
|
3456
|
+
shorts {
|
|
3457
|
+
id
|
|
3458
|
+
title
|
|
3459
|
+
thumbnail
|
|
3460
|
+
thumbnailSrcset
|
|
3461
|
+
viewCount
|
|
3462
|
+
}
|
|
3463
|
+
chips {
|
|
3464
|
+
id
|
|
3465
|
+
label
|
|
3466
|
+
selected
|
|
3467
|
+
}
|
|
3468
|
+
cursor
|
|
3469
|
+
}
|
|
3470
|
+
}
|
|
3471
|
+
`),kc=V`
|
|
3472
|
+
padding: 0 1.6rem 2.4rem;
|
|
3473
|
+
|
|
3474
|
+
.rail {
|
|
3475
|
+
position: sticky;
|
|
3476
|
+
top: var(--header-height);
|
|
3477
|
+
z-index: 100;
|
|
3478
|
+
margin-bottom: 1.2rem;
|
|
3479
|
+
background: var(--bg-base);
|
|
3480
|
+
}
|
|
3481
|
+
|
|
3482
|
+
.chips {
|
|
3483
|
+
display: flex;
|
|
3484
|
+
padding: 1.2rem 0;
|
|
3485
|
+
overflow-x: auto;
|
|
3486
|
+
scrollbar-width: none;
|
|
3487
|
+
}
|
|
3488
|
+
|
|
3489
|
+
.chips::-webkit-scrollbar {
|
|
3490
|
+
display: none;
|
|
3491
|
+
}
|
|
3492
|
+
|
|
3493
|
+
.track {
|
|
3494
|
+
display: flex;
|
|
3495
|
+
gap: 1.2rem;
|
|
3496
|
+
}
|
|
3497
|
+
|
|
3498
|
+
.chip {
|
|
3499
|
+
flex: none;
|
|
3500
|
+
height: 3.2rem;
|
|
3501
|
+
padding: 0 1.2rem;
|
|
3502
|
+
border: none;
|
|
3503
|
+
border-radius: 0.8rem;
|
|
3504
|
+
background: var(--bg-chip);
|
|
3505
|
+
color: var(--text-primary);
|
|
3506
|
+
font-size: 1.4rem;
|
|
3507
|
+
font-weight: 500;
|
|
3508
|
+
white-space: nowrap;
|
|
3509
|
+
cursor: pointer;
|
|
3510
|
+
transition: background 0.15s ease;
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
.chip:hover {
|
|
3514
|
+
background: var(--bg-chip-hover);
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3517
|
+
.chip.active {
|
|
3518
|
+
background: var(--bg-inverse);
|
|
3519
|
+
color: var(--text-inverse);
|
|
3520
|
+
}
|
|
3521
|
+
|
|
3522
|
+
.chip.active:hover {
|
|
3523
|
+
background: var(--bg-inverse-hover);
|
|
3524
|
+
}
|
|
3525
|
+
|
|
3526
|
+
.rail-arrow {
|
|
3527
|
+
position: absolute;
|
|
3528
|
+
top: 0;
|
|
3529
|
+
bottom: 0;
|
|
3530
|
+
display: flex;
|
|
3531
|
+
align-items: center;
|
|
3532
|
+
width: 8rem;
|
|
3533
|
+
padding: 0;
|
|
3534
|
+
border: none;
|
|
3535
|
+
color: var(--text-primary);
|
|
3536
|
+
cursor: pointer;
|
|
3537
|
+
}
|
|
3538
|
+
|
|
3539
|
+
.rail-arrow.start {
|
|
3540
|
+
left: 0;
|
|
3541
|
+
justify-content: flex-start;
|
|
3542
|
+
background: linear-gradient(to right, var(--bg-base) 60%, transparent);
|
|
3543
|
+
}
|
|
3544
|
+
|
|
3545
|
+
.rail-arrow.end {
|
|
3546
|
+
right: 0;
|
|
3547
|
+
justify-content: flex-end;
|
|
3548
|
+
background: linear-gradient(to left, var(--bg-base) 60%, transparent);
|
|
3549
|
+
}
|
|
3550
|
+
|
|
3551
|
+
.rail-arrow .circle {
|
|
3552
|
+
display: flex;
|
|
3553
|
+
align-items: center;
|
|
3554
|
+
justify-content: center;
|
|
3555
|
+
width: 4rem;
|
|
3556
|
+
height: 4rem;
|
|
3557
|
+
border-radius: 50%;
|
|
3558
|
+
transition: background 0.15s ease;
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3561
|
+
.rail-arrow:hover .circle {
|
|
3562
|
+
background: var(--bg-hover);
|
|
3563
|
+
}
|
|
3564
|
+
|
|
3565
|
+
.notice {
|
|
3566
|
+
padding: 2.4rem 0;
|
|
3567
|
+
color: var(--text-secondary);
|
|
3568
|
+
}
|
|
3569
|
+
|
|
3570
|
+
.empty {
|
|
3571
|
+
max-width: 60rem;
|
|
3572
|
+
margin: 4.8rem auto 0;
|
|
3573
|
+
padding: 2.4rem 3.2rem;
|
|
3574
|
+
border: 1px solid var(--border-subtle);
|
|
3575
|
+
border-radius: 1.2rem;
|
|
3576
|
+
background: var(--bg-subtle);
|
|
3577
|
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
|
3578
|
+
text-align: center;
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
.empty h2 {
|
|
3582
|
+
margin: 0;
|
|
3583
|
+
font-size: 2.4rem;
|
|
3584
|
+
font-weight: 700;
|
|
3585
|
+
line-height: 3.2rem;
|
|
3586
|
+
color: var(--text-primary);
|
|
3587
|
+
}
|
|
3588
|
+
|
|
3589
|
+
.empty p {
|
|
3590
|
+
margin: 1.2rem 0 0;
|
|
3591
|
+
font-size: 1.4rem;
|
|
3592
|
+
line-height: 2rem;
|
|
3593
|
+
color: var(--text-secondary);
|
|
3594
|
+
}
|
|
3595
|
+
`,Ac=()=>{nl();let[e,t]=F(),[n,r]=F({pages:[]}),[i,a]=F({chips:[]}),[o,s]=F({start:!1,end:!1}),c=L(null),l=L(null),u=n.chip===e?n.pages:[],[f]=F(()=>vr()?`cache-first`:`network-only`),[{data:p,error:m,fetching:h,operation:g},_]=_t({query:Oc,variables:{chip:e,cursor:u[u.length-1]?.cursor},requestPolicy:f}),v=g?.variables.chip===e?p?.home:void 0,y=Dc(u,v),b=Mn({pages:y.shorts,key:e=>e.id}).items,{items:x,cursor:S}=Mn({pages:y.videos,key:e=>e.id}),w=In(`hideShorts`),T=rn(),E=b.filter(e=>!jt(T,e)),D=x.filter(e=>(!w||!e.isShort)&&!jt(T,e));P(()=>{let e=v?.chips;e&&e.length!==0&&a(t=>t.chips===e?t:{chips:e,allId:t.allId??e.find(e=>e.selected)?.id})},[v]),P(()=>{let e=c.current,t=l.current;if(!e||!t)return;let n=()=>{let t=e.scrollLeft>1,n=e.scrollLeft+e.clientWidth<e.scrollWidth-1;s(e=>e.start===t&&e.end===n?e:{start:t,end:n})},r=new ResizeObserver(n);return r.observe(e),r.observe(t),e.addEventListener(`scroll`,n,{passive:!0}),n(),()=>{r.disconnect(),e.removeEventListener(`scroll`,n)}},[]);let O=e=>{let t=c.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})},k=()=>{!v?.cursor||h||m||r({chip:e,pages:u[u.length-1]===v?u:[...u,v]})},A=i.chips.filter(e=>e.id!==i.allId),j=!h&&!m&&D.length===0;return z(`main`,{css:kc,children:[z(`div`,{className:`rail`,hidden:A.length===0,children:[o.start?U(`button`,{type:`button`,className:`rail-arrow start`,"aria-label":`Scroll filters left`,onClick:()=>O(-1),children:U(`span`,{className:`circle`,children:U(C,{size:24,strokeWidth:1.5})})}):void 0,U(`div`,{className:`chips`,ref:c,children:z(`div`,{className:`track`,ref:l,children:[U(`button`,{type:`button`,className:e===void 0?`chip active`:`chip`,"aria-pressed":e===void 0,onClick:()=>t(void 0),children:`All`}),A.map(n=>U(`button`,{type:`button`,className:n.id===e?`chip active`:`chip`,"aria-pressed":n.id===e,onClick:()=>t(n.id),children:n.label},n.id))]})}),o.end?U(`button`,{type:`button`,className:`rail-arrow end`,"aria-label":`Scroll filters right`,onClick:()=>O(1),children:U(`span`,{className:`circle`,children:U(d,{size:24,strokeWidth:1.5})})}):void 0]}),j?e===void 0?z(`div`,{className:`empty`,children:[U(`h2`,{children:`Try searching to get started`}),U(`p`,{children:`Start watching videos to help us build a feed of videos you'll love.`})]}):U(`p`,{className:`notice`,children:`No videos under this filter.`}):U(Ec,{videos:D,shelf:w?void 0:U(Sc,{shorts:E}),fetching:h&&D.length===0,recommendable:!0}),m&&!h?U(cn,{error:m,reexecute:_}):void 0,h&&D.length>0?U(`p`,{className:`notice`,children:`Loading more…`}):void 0,U(kt,{onVisible:k,disabled:h||!S||!!m})]})};I();var jc=V`
|
|
3596
|
+
display: flex;
|
|
3597
|
+
flex-direction: column;
|
|
3598
|
+
align-items: center;
|
|
3599
|
+
justify-content: center;
|
|
3600
|
+
min-height: calc(100vh - var(--header-height));
|
|
3601
|
+
padding: 2.4rem 1.6rem;
|
|
3602
|
+
text-align: center;
|
|
3603
|
+
|
|
3604
|
+
.illustration {
|
|
3605
|
+
flex: none;
|
|
3606
|
+
margin-bottom: 1rem;
|
|
3607
|
+
}
|
|
3608
|
+
|
|
3609
|
+
.frame {
|
|
3610
|
+
fill: var(--bg-chip-hover);
|
|
3611
|
+
}
|
|
3612
|
+
|
|
3613
|
+
.screen {
|
|
3614
|
+
fill: var(--bg-subtle);
|
|
3615
|
+
}
|
|
3616
|
+
|
|
3617
|
+
.glyph {
|
|
3618
|
+
fill: var(--text-tertiary);
|
|
3619
|
+
}
|
|
3620
|
+
|
|
3621
|
+
.lens {
|
|
3622
|
+
fill: var(--bg-base);
|
|
3623
|
+
fill-opacity: 0.6;
|
|
3624
|
+
stroke: var(--brand);
|
|
3625
|
+
stroke-width: 8;
|
|
3626
|
+
}
|
|
3627
|
+
|
|
3628
|
+
.handle {
|
|
3629
|
+
stroke: var(--brand);
|
|
3630
|
+
stroke-width: 12;
|
|
3631
|
+
stroke-linecap: round;
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3634
|
+
p {
|
|
3635
|
+
width: 50rem;
|
|
3636
|
+
max-width: 100%;
|
|
3637
|
+
font-size: 1.6rem;
|
|
3638
|
+
line-height: 1.8rem;
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
.row {
|
|
3642
|
+
display: flex;
|
|
3643
|
+
align-items: center;
|
|
3644
|
+
gap: 0.5rem;
|
|
3645
|
+
width: 44rem;
|
|
3646
|
+
max-width: 100%;
|
|
3647
|
+
margin-top: 2.5rem;
|
|
3648
|
+
}
|
|
3649
|
+
|
|
3650
|
+
form {
|
|
3651
|
+
flex: 1;
|
|
3652
|
+
display: flex;
|
|
3653
|
+
min-width: 0;
|
|
3654
|
+
}
|
|
3655
|
+
|
|
3656
|
+
input {
|
|
3657
|
+
flex: 1;
|
|
3658
|
+
min-width: 0;
|
|
3659
|
+
height: 2.9rem;
|
|
3660
|
+
padding: 0.2rem 0.6rem;
|
|
3661
|
+
border: 1px solid var(--border);
|
|
3662
|
+
background: var(--bg-input);
|
|
3663
|
+
color: var(--text-primary);
|
|
3664
|
+
font-size: 1.6rem;
|
|
3665
|
+
outline: none;
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3668
|
+
input:focus {
|
|
3669
|
+
border-color: var(--accent-focus);
|
|
3670
|
+
}
|
|
3671
|
+
|
|
3672
|
+
input::placeholder {
|
|
3673
|
+
color: var(--text-placeholder);
|
|
3674
|
+
}
|
|
3675
|
+
|
|
3676
|
+
button {
|
|
3677
|
+
flex: none;
|
|
3678
|
+
width: 6.7rem;
|
|
3679
|
+
height: 2.9rem;
|
|
3680
|
+
display: flex;
|
|
3681
|
+
align-items: center;
|
|
3682
|
+
justify-content: center;
|
|
3683
|
+
border: 1px solid var(--border);
|
|
3684
|
+
background: var(--bg-input-button);
|
|
3685
|
+
color: var(--text-primary);
|
|
3686
|
+
cursor: pointer;
|
|
3687
|
+
}
|
|
3688
|
+
|
|
3689
|
+
button:hover {
|
|
3690
|
+
background: var(--bg-chip-hover);
|
|
3691
|
+
}
|
|
3692
|
+
|
|
3693
|
+
button svg {
|
|
3694
|
+
opacity: 0.6;
|
|
3695
|
+
}
|
|
3696
|
+
`,Mc=()=>{let[,e]=Re(),t=L(null);return nl(`404 Not Found`),z(`main`,{css:jc,children:[z(`svg`,{className:`illustration`,width:`186`,height:`174`,viewBox:`0 0 186 174`,"aria-hidden":`true`,children:[U(`rect`,{className:`frame`,x:`14`,y:`22`,width:`128`,height:`92`,rx:`12`}),U(`rect`,{className:`screen`,x:`24`,y:`32`,width:`108`,height:`72`,rx:`6`}),U(`path`,{className:`glyph`,d:`M68 54v28l22-14z`}),U(`rect`,{className:`frame`,x:`62`,y:`114`,width:`32`,height:`10`}),U(`rect`,{className:`frame`,x:`44`,y:`124`,width:`68`,height:`8`,rx:`4`}),U(`line`,{className:`handle`,x1:`150`,y1:`128`,x2:`170`,y2:`148`}),U(`circle`,{className:`lens`,cx:`128`,cy:`106`,r:`28`})]}),U(`p`,{children:`This page isn't available. Sorry about that.`}),U(`p`,{children:`Try searching for something else.`}),z(`div`,{className:`row`,children:[U($a,{}),z(`form`,{onSubmit:n=>{n.preventDefault();let r=t.current?.value.trim();r&&e(`/results?${new URLSearchParams({search_query:r})}`)},children:[U(`input`,{ref:t,name:`search_query`,type:`text`,placeholder:`Search`,"aria-label":`Search`,autoComplete:`off`}),U(`button`,{type:`submit`,"aria-label":`Search`,children:U(h,{size:15,strokeWidth:2})})]})]})]})};M(),I();var Nc=X(()=>s(()=>import(`./assets/channel-B5f9YTIf.js`),__vite__mapDeps([12,13,14,15,3,16,17,18,19,20,21,22,23,24]))),Pc=X(()=>s(()=>import(`./assets/downloads-CMXDjA_E.js`),__vite__mapDeps([25,14,13,15,3,16]))),Fc=X(()=>s(()=>import(`./assets/feed-channels-Dg2mvF5x.js`),__vite__mapDeps([26,14,13,15,3,16,18]))),Ic=X(()=>s(()=>import(`./assets/feed-groups-CnyR4sOO.js`),__vite__mapDeps([27,14,13,15,3,16]))),Lc=X(()=>s(()=>import(`./assets/feed-history-BDAGG9N5.js`),__vite__mapDeps([28,3,14,13,15,16,29,22,30]))),Rc=X(()=>s(()=>import(`./assets/feed-playlists-DcGR2AL6.js`),__vite__mapDeps([31,14,13,15,3,16,19,30]))),zc=X(()=>s(()=>import(`./assets/feed-subscriptions-Sm3tKz4P.js`),__vite__mapDeps([32,14,13,15,3,16,30]))),Bc=X(()=>s(()=>import(`./assets/feed-you-lxbqknXX.js`),__vite__mapDeps([33,14,13,15,3,16,19,30]))),Vc=X(()=>s(()=>import(`./assets/group-C00s0aT7.js`),__vite__mapDeps([34,14,13,15,3,16]))),Hc=X(()=>s(()=>import(`./assets/hashtag-CCIhITaL.js`),__vite__mapDeps([35,14,13,15,3,16,23]))),Uc=X(()=>s(()=>import(`./assets/party-CUcxsJDF.js`),__vite__mapDeps([36,14,13,15,3]))),Wc=X(()=>s(()=>import(`./assets/playlist-DF7wsidw.js`),__vite__mapDeps([37,13,14,15,3,16,17,22,24,38]))),Gc=X(()=>s(()=>import(`./assets/post-CQ9mfVos.js`),__vite__mapDeps([39,15,13,3,14,16,40,21,17,20,22]))),Kc=X(()=>s(()=>import(`./assets/privacy-hkbqXFeB.js`),__vite__mapDeps([41,15,13,3,14]))),qc=X(()=>s(()=>import(`./assets/search-Cx5IpDtZ.js`),__vite__mapDeps([42,14,13,15,3,16,43,44]))),Jc=X(()=>s(()=>import(`./assets/settings-kESE_uBm.js`),__vite__mapDeps([45,14,13,15,3,16]))),Yc=X(()=>s(()=>import(`./assets/account-BL8Hv7lS.js`),__vite__mapDeps([46,14,13,15,3]))),Xc=X(()=>s(()=>import(`./assets/shorts-BxDB7m0c.js`),__vite__mapDeps([47,13,14,15,3,16,40,21,17,48,49]))),Zc=X(()=>s(()=>import(`./assets/signin-DkI8Ogzz.js`),__vite__mapDeps([50,15,13,3,14]))),Qc=X(()=>s(()=>import(`./assets/watch-CkxSP1IA.js`),__vite__mapDeps([51,14,13,15,3,16,40,21,17,52,48,22,38,49]))),$c=V`
|
|
3697
|
+
min-height: 100vh;
|
|
3698
|
+
|
|
3699
|
+
.content {
|
|
3700
|
+
padding-top: var(--header-height);
|
|
3701
|
+
}
|
|
3702
|
+
|
|
3703
|
+
.page {
|
|
3704
|
+
min-width: 0;
|
|
3705
|
+
outline: none;
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
.page.guide-expanded {
|
|
3709
|
+
margin-left: var(--guide-width);
|
|
3710
|
+
}
|
|
3711
|
+
|
|
3712
|
+
.page.guide-mini {
|
|
3713
|
+
margin-left: var(--guide-mini-width);
|
|
3714
|
+
}
|
|
3715
|
+
|
|
3716
|
+
/* Deliberately blank rather than a spinner. Chunks are local and resolve in
|
|
3717
|
+
a frame or two, and a spinner that flashes on every navigation reads as
|
|
3718
|
+
the app being slower than it is. */
|
|
3719
|
+
.route-loading {
|
|
3720
|
+
min-height: 60vh;
|
|
3721
|
+
}
|
|
3722
|
+
`,el=`FTube`,tl=`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`,nl=e=>{P(()=>{e!==void 0&&(document.title=`${e} - ${el}`)},[e]),P(()=>()=>{document.title=el},[])},rl=[`t`],il=e=>e.startsWith(`/shorts/`)?`/shorts`:e,al=(e,t)=>{let n=new URLSearchParams(t);for(let e of rl)n.delete(e);let r=n.toString(),i=il(e);return r?`${i}?${r}`:i},ol=({query:e})=>U(ct,{to:`/results?${new URLSearchParams({search_query:e})}`,replace:!0}),sl=({videoId:e})=>{let t=new URLSearchParams($e()),n=t.get(`list`);if(e===`videoseries`&&n)return U(ct,{to:`/playlist?${new URLSearchParams({list:n})}`,replace:!0});let r=new URLSearchParams({v:Rt(e)});n&&r.set(`list`,n);let i=t.get(`t`)??t.get(`start`);return i&&r.set(`t`,i),U(ct,{to:`/watch?${r}`,replace:!0})},cl=({videoId:e})=>In(`hideShorts`)?e?U(sl,{videoId:e}):U(ct,{to:`/`,replace:!0}):U(Xc,{}),ll=({tag:e,tab:t})=>{let n=In(`hideShorts`),r=Rt(e),i=r.trim().replace(/^#/,``);if(!i)return U(Mc,{});let a=i.toLowerCase(),o=encodeURIComponent(a);return t===void 0?r===a?U(Hc,{tag:a,tab:`ALL`}):U(ct,{to:`/hashtag/${o}`,replace:!0}):Rt(t).toLowerCase()===`shorts`?n?U(ct,{to:`/hashtag/${o}`,replace:!0}):r!==a||t!==`shorts`?U(ct,{to:`/hashtag/${o}/shorts`,replace:!0}):U(Hc,{tag:a,tab:`SHORTS`}):U(Mc,{})},ul=({id:e,base:t,word:n})=>{let r=In(`hideShorts`),i=new URLSearchParams($e()),a=i.get(`tab`);i.delete(`tab`);let o=i.size>0?`?${i}`:``;if(a!==null){if(r&&a===`SHORTS`)return U(ct,{to:`${t}${o}`,replace:!0});let e=Object.hasOwn(hc,a)?`/${hc[a]}`:``;return U(ct,{to:`${t}${e}${o}`,replace:!0})}if(n===void 0)return U(Nc,{id:e,base:t});let s=_c(Rt(n));return s?r&&s===`SHORTS`?U(ct,{to:t,replace:!0}):n===hc[s]?U(Nc,{id:e,base:t,tab:s}):U(ct,{to:`${t}/${hc[s]}${o}`,replace:!0}):U(Mc,{})},dl=e=>{let[t,n]=F(()=>window.matchMedia(e).matches);return P(()=>{let t=window.matchMedia(e),r=()=>n(t.matches);return t.addEventListener(`change`,r),n(t.matches),()=>t.removeEventListener(`change`,r)},[e]),t},fl=()=>{let[e]=Re(),t=al(e,$e()),[n,r]=F(()=>Z().guideCollapsed),[i,a]=F(!1),o=dl(`(max-width: 1312px)`),s=dl(`(max-width: 792px)`),c=L(t),l=L(new Map),u=L(null),d=e.startsWith(`/watch`)||s,f=d?void 0:n||o?`mini`:`expanded`;P(()=>{history.scrollRestoration=`manual`;let e=()=>l.current.set(c.current,scrollY);return addEventListener(`scroll`,e,{passive:!0}),()=>removeEventListener(`scroll`,e)},[]),ce(()=>{if(c.current===t)return;c.current=t,a(!1);let e=vr()?l.current.get(t):void 0;scrollTo(0,e??0)},[t]);let p=N(()=>{if(d||o){a(e=>!e);return}r(e=>J({guideCollapsed:!e}).guideCollapsed)},[d,o]),m=N(()=>{let e=u.current;if(!e)return;let t=[...e.querySelectorAll(tl)].find(e=>e.checkVisibility({visibilityProperty:!0}));if(t){t.focus();return}e.tabIndex=-1,e.addEventListener(`blur`,()=>e.removeAttribute(`tabindex`),{once:!0}),e.focus()},[]);return z(`div`,{css:$c,children:[U(no,{onMenu:p,onSkip:m}),z(`div`,{className:`content`,children:[f?U(wo,{variant:f}):void 0,U(`div`,{ref:u,className:f?`page guide-${f}`:`page`,children:U(Jn,{children:U(_,{fallback:U(`div`,{className:`route-loading`}),children:z(Qe,{children:[U(G,{path:`/`,component:Ac}),U(G,{path:`/results`,component:qc}),U(G,{path:`/watch`,component:Qc}),U(G,{path:`/playlist`,component:Wc}),U(G,{path:`/shorts`,children:()=>U(cl,{})}),U(G,{path:`/shorts/:videoId`,children:e=>U(cl,{videoId:e.videoId})}),U(G,{path:`/feed/subscriptions`,component:zc}),U(G,{path:`/feed/channels`,component:Fc}),U(G,{path:`/feed/history`,component:Lc}),U(G,{path:`/feed/playlists`,component:Rc}),U(G,{path:`/feed/you`,component:Bc}),U(G,{path:`/feed/groups`,component:Ic}),U(G,{path:`/feed/groups/:id`,component:Vc}),U(G,{path:`/channel/:channelId/:tab?`,children:e=>U(ul,{id:e.channelId,base:`/channel/${e.channelId}`,word:e.tab})}),U(G,{path:`/settings`,component:Jc}),U(G,{path:`/downloads`,component:Pc}),U(G,{path:`/privacy`,component:Kc}),U(G,{path:`/party`,component:Uc}),U(G,{path:`/account`,component:Yc}),U(G,{path:`/signin`,component:Zc}),U(G,{path:`/search/:query`,children:e=>U(ol,{query:Rt(e.query)})}),U(G,{path:`/hashtag/:tag/:tab?`,children:e=>U(ll,{tag:e.tag,tab:e.tab})}),U(G,{path:`/watch/:videoId`,children:e=>U(sl,{videoId:e.videoId})}),U(G,{path:`/live/:videoId`,children:e=>U(sl,{videoId:e.videoId})}),U(G,{path:`/embed/:videoId`,children:e=>U(sl,{videoId:e.videoId})}),U(G,{path:`/c/:name/:tab?`,children:e=>U(ul,{id:`c/${e.name}`,base:`/c/${e.name}`,word:e.tab})}),U(G,{path:`/user/:name/:tab?`,children:e=>U(ul,{id:`user/${e.name}`,base:`/user/${e.name}`,word:e.tab})}),U(G,{path:`/gaming`,children:U(ct,{to:`/channel/UCOpNcN46UbXVtpKMrmU4Abg`,replace:!0})}),U(G,{path:`/post/:postId`,component:Gc}),U(G,{path:`/:segment/:tab?`,children:e=>e.segment?.startsWith(`@`)?U(ul,{id:e.segment,base:`/${e.segment}`,word:e.tab}):U(Mc,{})}),U(G,{component:Mc})]})})},t)})]}),(d||o)&&i?U(wo,{variant:`drawer`,onClose:()=>a(!1)}):void 0,U(mc,{}),U(Oo,{}),U(Do,{})]})};I();var pl=536870912,ml=V`
|
|
3723
|
+
display: flex;
|
|
3724
|
+
flex-direction: column;
|
|
3725
|
+
gap: 1.6rem;
|
|
3726
|
+
|
|
3727
|
+
.video-summary {
|
|
3728
|
+
display: flex;
|
|
3729
|
+
align-items: center;
|
|
3730
|
+
gap: 1.2rem;
|
|
3731
|
+
}
|
|
3732
|
+
|
|
3733
|
+
.thumb {
|
|
3734
|
+
flex: none;
|
|
3735
|
+
width: 9.6rem;
|
|
3736
|
+
aspect-ratio: 16 / 9;
|
|
3737
|
+
border-radius: 0.6rem;
|
|
3738
|
+
object-fit: cover;
|
|
3739
|
+
background: var(--bg-elevated);
|
|
3740
|
+
}
|
|
3741
|
+
|
|
3742
|
+
.meta {
|
|
3743
|
+
min-width: 0;
|
|
3744
|
+
}
|
|
3745
|
+
|
|
3746
|
+
.video-title {
|
|
3747
|
+
font-size: 1.4rem;
|
|
3748
|
+
font-weight: 500;
|
|
3749
|
+
line-height: 2rem;
|
|
3750
|
+
color: var(--text-primary);
|
|
3751
|
+
display: -webkit-box;
|
|
3752
|
+
-webkit-line-clamp: 2;
|
|
3753
|
+
-webkit-box-orient: vertical;
|
|
3754
|
+
overflow: hidden;
|
|
3755
|
+
}
|
|
3756
|
+
|
|
3757
|
+
.video-channel {
|
|
3758
|
+
margin-top: 0.2rem;
|
|
3759
|
+
font-size: 1.2rem;
|
|
3760
|
+
color: var(--text-secondary);
|
|
3761
|
+
}
|
|
3762
|
+
|
|
3763
|
+
.tabs {
|
|
3764
|
+
display: flex;
|
|
3765
|
+
gap: 0.8rem;
|
|
3766
|
+
}
|
|
3767
|
+
|
|
3768
|
+
.tab {
|
|
3769
|
+
flex: 1;
|
|
3770
|
+
height: 3.6rem;
|
|
3771
|
+
border: 1px solid var(--border);
|
|
3772
|
+
border-radius: 0.8rem;
|
|
3773
|
+
background: var(--bg-chip);
|
|
3774
|
+
color: var(--text-primary);
|
|
3775
|
+
font: inherit;
|
|
3776
|
+
font-size: 1.4rem;
|
|
3777
|
+
font-weight: 500;
|
|
3778
|
+
cursor: pointer;
|
|
3779
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3782
|
+
.tab:hover {
|
|
3783
|
+
background: var(--bg-chip-hover);
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3786
|
+
.tab[aria-selected='true'] {
|
|
3787
|
+
background: var(--bg-inverse);
|
|
3788
|
+
color: var(--text-inverse);
|
|
3789
|
+
border-color: var(--bg-inverse);
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3792
|
+
.track-row {
|
|
3793
|
+
display: flex;
|
|
3794
|
+
align-items: center;
|
|
3795
|
+
justify-content: space-between;
|
|
3796
|
+
gap: 1.2rem;
|
|
3797
|
+
font-size: 1.3rem;
|
|
3798
|
+
color: var(--text-secondary);
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
.track-select {
|
|
3802
|
+
height: 3.4rem;
|
|
3803
|
+
padding: 0 1rem;
|
|
3804
|
+
border: 1px solid var(--border);
|
|
3805
|
+
border-radius: 0.8rem;
|
|
3806
|
+
background: var(--bg-input);
|
|
3807
|
+
color: var(--text-primary);
|
|
3808
|
+
font: inherit;
|
|
3809
|
+
font-size: 1.3rem;
|
|
3810
|
+
}
|
|
3811
|
+
|
|
3812
|
+
.formats {
|
|
3813
|
+
display: flex;
|
|
3814
|
+
flex-direction: column;
|
|
3815
|
+
gap: 0.6rem;
|
|
3816
|
+
max-height: 24rem;
|
|
3817
|
+
overflow-y: auto;
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3820
|
+
.format-option {
|
|
3821
|
+
width: 100%;
|
|
3822
|
+
display: flex;
|
|
3823
|
+
align-items: center;
|
|
3824
|
+
justify-content: space-between;
|
|
3825
|
+
gap: 1.2rem;
|
|
3826
|
+
padding: 1rem 1.2rem;
|
|
3827
|
+
border: 1px solid var(--border);
|
|
3828
|
+
border-radius: 0.8rem;
|
|
3829
|
+
background: var(--bg-elevated);
|
|
3830
|
+
color: var(--text-primary);
|
|
3831
|
+
font: inherit;
|
|
3832
|
+
font-size: 1.4rem;
|
|
3833
|
+
text-align: left;
|
|
3834
|
+
cursor: pointer;
|
|
3835
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
3836
|
+
}
|
|
3837
|
+
|
|
3838
|
+
.format-option:hover {
|
|
3839
|
+
background: var(--bg-hover);
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3842
|
+
.format-option[aria-checked='true'] {
|
|
3843
|
+
border-color: var(--accent);
|
|
3844
|
+
background: var(--accent-hover);
|
|
3845
|
+
}
|
|
3846
|
+
|
|
3847
|
+
.format-main {
|
|
3848
|
+
display: flex;
|
|
3849
|
+
align-items: center;
|
|
3850
|
+
gap: 0.8rem;
|
|
3851
|
+
min-width: 0;
|
|
3852
|
+
}
|
|
3853
|
+
|
|
3854
|
+
.format-label {
|
|
3855
|
+
font-weight: 500;
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3858
|
+
.format-badge {
|
|
3859
|
+
padding: 0.2rem 0.6rem;
|
|
3860
|
+
border-radius: 0.4rem;
|
|
3861
|
+
background: var(--bg-chip);
|
|
3862
|
+
color: var(--text-secondary);
|
|
3863
|
+
font-size: 1.2rem;
|
|
3864
|
+
}
|
|
3865
|
+
|
|
3866
|
+
.format-size {
|
|
3867
|
+
color: var(--text-secondary);
|
|
3868
|
+
font-size: 1.3rem;
|
|
3869
|
+
white-space: nowrap;
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3872
|
+
.size-warning {
|
|
3873
|
+
margin: 0;
|
|
3874
|
+
padding: 0.8rem 1rem;
|
|
3875
|
+
border: 1px solid var(--border);
|
|
3876
|
+
border-radius: 0.8rem;
|
|
3877
|
+
background: var(--bg-elevated);
|
|
3878
|
+
color: var(--text-secondary);
|
|
3879
|
+
font-size: 1.2rem;
|
|
3880
|
+
line-height: 1.7rem;
|
|
3881
|
+
}
|
|
3882
|
+
|
|
3883
|
+
.state {
|
|
3884
|
+
padding: 2rem 0;
|
|
3885
|
+
text-align: center;
|
|
3886
|
+
font-size: 1.4rem;
|
|
3887
|
+
color: var(--text-secondary);
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
.retry {
|
|
3891
|
+
display: inline-flex;
|
|
3892
|
+
align-items: center;
|
|
3893
|
+
gap: 0.6rem;
|
|
3894
|
+
margin-top: 1.2rem;
|
|
3895
|
+
height: 3.4rem;
|
|
3896
|
+
padding: 0 1.4rem;
|
|
3897
|
+
border: 1px solid var(--border-strong);
|
|
3898
|
+
border-radius: 1.7rem;
|
|
3899
|
+
background: transparent;
|
|
3900
|
+
color: var(--accent);
|
|
3901
|
+
font: inherit;
|
|
3902
|
+
font-size: 1.3rem;
|
|
3903
|
+
font-weight: 500;
|
|
3904
|
+
cursor: pointer;
|
|
3905
|
+
}
|
|
3906
|
+
|
|
3907
|
+
.footer {
|
|
3908
|
+
display: flex;
|
|
3909
|
+
align-items: center;
|
|
3910
|
+
justify-content: space-between;
|
|
3911
|
+
gap: 1.2rem;
|
|
3912
|
+
padding-top: 0.4rem;
|
|
3913
|
+
}
|
|
3914
|
+
|
|
3915
|
+
.manage-link {
|
|
3916
|
+
font-size: 1.4rem;
|
|
3917
|
+
font-weight: 500;
|
|
3918
|
+
color: var(--accent);
|
|
3919
|
+
}
|
|
3920
|
+
|
|
3921
|
+
.manage-link:hover {
|
|
3922
|
+
text-decoration: underline;
|
|
3923
|
+
}
|
|
3924
|
+
|
|
3925
|
+
.start-btn {
|
|
3926
|
+
display: inline-flex;
|
|
3927
|
+
align-items: center;
|
|
3928
|
+
gap: 0.8rem;
|
|
3929
|
+
height: 3.8rem;
|
|
3930
|
+
padding: 0 1.8rem;
|
|
3931
|
+
border: none;
|
|
3932
|
+
border-radius: 1.9rem;
|
|
3933
|
+
background: var(--bg-inverse);
|
|
3934
|
+
color: var(--text-inverse);
|
|
3935
|
+
font: inherit;
|
|
3936
|
+
font-size: 1.4rem;
|
|
3937
|
+
font-weight: 500;
|
|
3938
|
+
cursor: pointer;
|
|
3939
|
+
transition: background 0.15s ease;
|
|
3940
|
+
}
|
|
3941
|
+
|
|
3942
|
+
.start-btn:hover:not(:disabled) {
|
|
3943
|
+
background: var(--bg-inverse-hover);
|
|
3944
|
+
}
|
|
3945
|
+
|
|
3946
|
+
.start-btn:disabled {
|
|
3947
|
+
opacity: 0.5;
|
|
3948
|
+
cursor: default;
|
|
3949
|
+
}
|
|
3950
|
+
`,hl=(e,t)=>{let n=e.filter(e=>e.container===`m4a`),r=n.length>0?n:e;if(t){let e=r.find(e=>e.audioTrackId===t);if(e)return e}return r.find(e=>e.isOriginal)??r[0]},gl=({videoId:e,title:t,thumbnail:n,channelName:r,onClose:i})=>{let[a,o]=F(`video`),[s,c]=F(!0),[l,u]=F(void 0),[d,f]=F(!1),[p,m]=F([]),[h,g]=F([]),[_,v]=F(void 0),[y,b]=F(void 0),[x,S]=F(void 0),[C,w]=F(0),T=L(null),E=L(null);P(()=>{let t=!0;return c(!0),u(void 0),(async()=>{try{let n=await(await St()).downloadFormats(e);if(!t)return;f(n.isLive),m(n.videoFormats),g(n.audioFormats);let r=or(n.audioFormats),i=(r.find(e=>e.original)??r[0])?.id;S(i),v(n.videoFormats[0]?.key);let a=hl(n.audioFormats,i)??n.audioFormats[0];b(a?.key),n.videoFormats.length===0&&n.audioFormats.length>0&&o(`audio`)}catch(e){if(!t)return;let n=e instanceof Error?e.message.replace(/^youtube:\s*/i,``):String(e);u(n)}finally{t&&c(!1)}})(),()=>{t=!1}},[e,C]);let D=or(h),O=hl(h,x),k=p.find(e=>e.key===_)??p[0],A=h.find(e=>e.key===y)??h[0],j=a===`video`?k?.estimatedBytes!==void 0&&O?.estimatedBytes!==void 0?k.estimatedBytes+O.estimatedBytes:k?.estimatedBytes:A?.estimatedBytes,ee=!s&&!l&&!d&&(a===`video`?!!(k&&O):!!A),te=e=>{let t=[`video`,`audio`],n=t.indexOf(a),r=-1;e.key===`ArrowRight`?r=(n+1)%t.length:e.key===`ArrowLeft`?r=(n-1+t.length)%t.length:e.key===`Home`?r=0:e.key===`End`&&(r=t.length-1),!(r<0)&&(e.preventDefault(),o(t[r]),(T.current?.children[r])?.focus())},ne=(e,t,n,r)=>{if(t.length===0)return;let i=Math.max(0,t.findIndex(e=>e.key===n)),a=-1;e.key===`ArrowDown`||e.key===`ArrowRight`?a=(i+1)%t.length:e.key===`ArrowUp`||e.key===`ArrowLeft`?a=(i-1+t.length)%t.length:e.key===`Home`?a=0:e.key===`End`&&(a=t.length-1),!(a<0)&&(e.preventDefault(),r(t[a].key),(E.current?.querySelectorAll(`[role="radio"]`))?.[a]?.focus())};return U(Vt,{title:`Download`,onClose:i,children:z(`div`,{css:ml,children:[z(`div`,{className:`video-summary`,children:[n?U(`img`,{className:`thumb`,src:n,alt:``}):void 0,z(`div`,{className:`meta`,children:[U(`div`,{className:`video-title`,children:t}),r?U(`div`,{className:`video-channel`,children:r}):void 0]})]}),z(`div`,{ref:T,className:`tabs`,role:`tablist`,"aria-label":`Download type`,onKeyDown:te,children:[U(`button`,{id:`dl-tab-video`,type:`button`,role:`tab`,className:`tab`,"aria-controls":`dl-tabpanel`,"aria-selected":a===`video`,tabIndex:a===`video`?0:-1,onClick:()=>o(`video`),children:`Video (MP4)`}),U(`button`,{id:`dl-tab-audio`,type:`button`,role:`tab`,className:`tab`,"aria-controls":`dl-tabpanel`,"aria-selected":a===`audio`,tabIndex:a===`audio`?0:-1,onClick:()=>o(`audio`),children:`Audio`})]}),U(`div`,{id:`dl-tabpanel`,role:`tabpanel`,"aria-labelledby":a===`video`?`dl-tab-video`:`dl-tab-audio`,children:s?U(`div`,{className:`state`,children:`Loading formats…`}):l?z(`div`,{className:`state`,children:[z(`div`,{children:[`Could not load formats: `,l]}),z(`button`,{type:`button`,className:`retry`,onClick:()=>w(e=>e+1),children:[U(he,{size:14,strokeWidth:1.75}),`Retry`]})]}):d?U(`div`,{className:`state`,children:`Live streams cannot be downloaded while broadcasting.`}):a===`video`?z(B,{children:[D.length>1?z(`label`,{className:`track-row`,children:[U(`span`,{children:`Audio language`}),U(`select`,{className:`track-select`,value:x??``,onChange:e=>S(e.currentTarget.value),children:D.map(e=>U(`option`,{value:e.id,children:e.label},e.id))})]}):void 0,U(`div`,{ref:E,className:`formats`,role:`radiogroup`,"aria-label":`Video quality`,onKeyDown:e=>ne(e,p,k?.key,v),children:p.length>0?p.map(e=>{let t=e.key===k?.key,n=e.estimatedBytes!==void 0&&O?.estimatedBytes!==void 0?e.estimatedBytes+O.estimatedBytes:e.estimatedBytes;return z(`button`,{type:`button`,role:`radio`,"aria-checked":t,tabIndex:t?0:-1,className:`format-option`,onClick:()=>v(e.key),children:[z(`span`,{className:`format-main`,children:[U(`span`,{className:`format-label`,children:e.qualityLabel}),U(`span`,{className:`format-badge`,children:e.codec})]}),n?z(`span`,{className:`format-size`,children:[`~`,q(n)]}):void 0]},e.key)}):U(`div`,{className:`state`,children:`No MP4 video formats available.`})})]}):U(`div`,{ref:E,className:`formats`,role:`radiogroup`,"aria-label":`Audio format`,onKeyDown:e=>ne(e,h,A?.key,b),children:h.length>0?h.map(e=>{let t=e.key===A?.key;return z(`button`,{type:`button`,role:`radio`,"aria-checked":t,tabIndex:t?0:-1,className:`format-option`,onClick:()=>b(e.key),children:[z(`span`,{className:`format-main`,children:[z(`span`,{className:`format-label`,children:[e.container.toUpperCase(),` `,e.qualityLabel]}),U(`span`,{className:`format-badge`,children:e.codec}),e.audioTrackName&&D.length>1?U(`span`,{className:`format-badge`,children:e.audioTrackName}):void 0]}),e.estimatedBytes?z(`span`,{className:`format-size`,children:[`~`,q(e.estimatedBytes)]}):void 0]},e.key)}):U(`div`,{className:`state`,children:`No audio formats available.`})})}),!s&&!l&&!d&&j&&j>pl?z(`p`,{className:`size-warning`,children:[`Large file (~`,q(j),`): assembled in browser memory before saving.`]}):void 0,z(`div`,{className:`footer`,children:[U(K,{href:`/downloads`,className:`manage-link`,onClick:i,children:`Manage downloads`}),z(`button`,{type:`button`,className:`start-btn`,disabled:!ee,onClick:()=>{if(a===`video`){if(!k||!O)return;bn({target:{videoId:e,title:t,thumbnail:n,channelName:r},mode:`video`,videoKey:k.key,audioKey:O.key,qualityLabel:`${k.qualityLabel} (${k.codec})`,container:`mp4`,estimatedBytes:j}),i();return}A&&(bn({target:{videoId:e,title:t,thumbnail:n,channelName:r},mode:`audio`,audioKey:A.key,qualityLabel:`${A.container.toUpperCase()} ${A.qualityLabel}`,container:A.container,estimatedBytes:A.estimatedBytes}),i())},children:[U(oe,{size:18,strokeWidth:1.75}),`Download`]})]})]})})},_l=()=>{let e=Xn();return e?U(gl,{videoId:e.videoId,title:e.title,thumbnail:e.thumbnail,channelName:e.channelName,onClose:ln},e.videoId):null},vl=`
|
|
3951
|
+
https://bit.ly/2XbVrpR#`;function yl(e,t,n){if(!e){var r=t||`Minfied Error #`+n+`
|
|
3952
|
+
`,i=Error(r+vl+n);throw i.name=`Graphcache Error`,i}}var bl={},xl=e=>e._directives||bl,Sl=e=>e.name.value,Cl=e=>e.typeCondition.name.value,wl=e=>e.alias?e.alias.value:e.name.value,Tl=[],El=e=>e.selectionSet?e.selectionSet.selections:Tl,Dl=e=>e.typeCondition?e.typeCondition.name.value:null,Ol=(e,t)=>{var n=null;if(e.arguments)for(var r=0,i=e.arguments.length;r<i;r++){var a=e.arguments[r],o=ht(a.value,t);o!=null&&(n||={},n[Sl(a)]=o)}return n},kl=(e,t)=>{if(t&&e.variableDefinitions){for(var n={},r=0,i=e.variableDefinitions.length;r<i;r++){var a=Sl(e.variableDefinitions[r].variable);n[a]=t[a]}return n}},Al=(e,t)=>{var n={};if(!t)return n;if(e.variableDefinitions)for(var r=0,i=e.variableDefinitions.length;r<i;r++){var a=e.variableDefinitions[r],o=Sl(a.variable);n[o]=t[o]===void 0&&a.defaultValue?ht(a.defaultValue,t):t[o]}for(var s in t)s in n||(n[s]=t[s]);return n};function jl(e){for(var t=0;t<e.definitions.length;t++)if(e.definitions[t].kind===H.OPERATION_DEFINITION)return e.definitions[t];yl(!1,``,1)}var Ml=e=>{for(var t={},n=0;n<e.definitions.length;n++){var r=e.definitions[n];r.kind===H.FRAGMENT_DEFINITION&&(t[Sl(r)]=r)}return t},Nl=(e,t)=>{var n=xl(e);if(n.include||n.skip)for(var r in n){var i=n[r];if(i&&(r===`include`||r===`skip`)&&i.arguments&&i.arguments[0]&&Sl(i.arguments[0])===`if`){var a=ht(i.arguments[0].value,t);return r===`include`?!!a:!a}}return!0},Pl=(e,t)=>{var{defer:n}=xl(e);if(n){for(var r of n.arguments||[])if(Sl(r)===`if`)return!!ht(r.value,t);return!0}return!1},Fl=e=>{var{optional:t,required:n}=xl(e);if(n)return!1;if(t)return!0},Il=`__`,Ll=(e,t,n,r)=>{var i=Bl(e,t,n,r);return!!i&&i.type.kind!==`NON_NULL`},Rl=(e,t,n,r)=>{var i=Bl(e,t,n,r);if(!i)return!1;var a=i.type.kind===`NON_NULL`?i.type.ofType:i.type;return a.kind===`LIST`&&a.ofType.kind!==`NON_NULL`},zl=(e,t,n)=>{if(!n)return!1;var r=Dl(t);return!r||n===r?!0:e.types.has(r)&&e.types.get(r).kind===`OBJECT`?r===n:((function(e,t){yl(e.types.has(t)&&(e.types.get(t).kind===`INTERFACE`||e.types.get(t).kind===`UNION`),``,5)})(e,r),Vl(e,n),e.isSubType(r,n))},Bl=(e,t,n,r)=>{if(n.indexOf(Il)!==0&&t.indexOf(Il)!==0)return Vl(e,t),e.types.get(t).fields()[n]};function Vl(e,t){yl(e.types.has(t)&&e.types.get(t).kind===`OBJECT`,``,3)}var Hl=(e,t)=>t?`${e}(${Ue(t)})`:e,Ul=(e,t)=>`${e}.${t}`,Wl=e=>{var t=e.indexOf(`(`);return t>-1?{fieldKey:e,fieldName:e.slice(0,t),arguments:JSON.parse(e.slice(t+1,-1))}:{fieldKey:e,fieldName:e,arguments:null}},Gl=e=>{var t=e.indexOf(`.`);return{entityKey:e.slice(0,t).replace(/%2e/g,`.`),fieldKey:e.slice(t+1)}},Kl=null,ql=null,$=null,Jl=null,Yl=null,Xl=null,Zl=!1,Ql=!1;function $l(e,t){var n;if(e){if(Kl.has(e))return e;n=ql.get(e)}return n??=t?[]:{},e&&ql.set(e,n),Kl.add(n),n}var eu=e=>!!e&&Kl.has(e),tu=(e,t,n,r,i)=>{Kl=new WeakSet,ql=new WeakMap,Yl=e,$=t,Xl=new Set,Ql=!!r,Zl=!!i,n?Yl===`read`?Jl=n:r||t.hydrating||t.optimisticOrder.length>1?(!r&&!t.commutativeKeys.has(n)?bu(t,n):r&&(t.optimisticOrder.indexOf(n)!==-1&&!t.commutativeKeys.has(n)&&t.optimisticOrder.splice(t.optimisticOrder.indexOf(n),1),t.commutativeKeys.delete(n)),Jl=n,xu(t,n)):(Jl=null,Cu(t,n)):Jl=null},nu=()=>{var e=$,t=Jl;if(Ql=!1,Jl=null,!e.hydrating&&t&&e.optimisticOrder.indexOf(t)>-1)for(var n=e.optimisticOrder.length;--n>=0&&e.dirtyKeys.has(e.optimisticOrder[n])&&e.commutativeKeys.has(e.optimisticOrder[n]);)wu(e.optimisticOrder[n]);Kl=null,ql=null,Yl=null,$=null,Xl=null,!e.defer&&(e.storage||!e.optimisticOrder.length)&&(e.defer=!0,setTimeout((()=>{tu(`read`,e,null),du(),Eu(),nu(),e.defer=!1})))},ru=(e,t,n)=>{t&&!n&&e.deferredKeys.delete(t),tu(`write`,e,t,n),nu()},iu=new Set,au=(e,t,n,r)=>{var i=Jl?e.optimistic.get(Jl):e.base,a=i.get(t);a===void 0&&i.set(t,a=Object.create(null)),r===void 0&&!Jl?delete a[n]:a[n]=r},ou=(e,t,n)=>{for(var r,i=!Ql&&Yl===`read`&&Jl&&$.commutativeKeys.has(Jl),a=0,o=$.optimisticOrder.length;a<o;a++){var s=$.optimisticOrder[a],c=e.optimistic.get(s);if(i&&=s!==Jl,c&&(!i||!$.commutativeKeys.has(s))&&(!Ql||Yl===`write`||$.commutativeKeys.has(s))&&(r=c.get(t))!==void 0&&n in r)return r[n]}return(r=e.base.get(t))===void 0?void 0:r[n]};function su(e){return $.refCount.get(e)||0}var cu=(e,t)=>{if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)cu(e[n],t);else typeof e==`string`&&((e,t)=>{var n=su(e),r=n+t>0?n+t:0;$.refCount.set(e,r),r?!n&&r&&$.gc.delete(e):$.gc.add(e)})(e,t)},lu=(e,t,n)=>{if(n!==void 0)for(var r in n)t.has(r)||(e.push(Wl(r)),t.add(r))},uu=(e,t,n,r)=>{lu(e,t,r.base.get(n));for(var i=0,a=$.optimisticOrder.length;i<a;i++){var o=r.optimistic.get($.optimisticOrder[i]);o!==void 0&&lu(e,t,o.get(n))}},du=()=>{if(!$.optimisticOrder.length){for(var e of $.gc.keys())if($.gc.delete(e),!(su(e)>0)){var t=$.records.base.get(e);$.refCount.delete(e),$.records.base.delete(e);var n=t&&t.__typename;if(n){var r=$.types.get(n);r&&r.delete(e)}var i=$.links.base.get(e);if(i)for(var a in $.links.base.delete(e),i)cu(i[a],-1)}}},fu=(e,t)=>{e===$.queryRootKey?t!==void 0&&t!==`__typename`&&Xl.add(Ul(e,t)):Xl.add(e)},pu=(e,t)=>{!Ql&&$.storage&&$.persist.add(((e,t)=>`${e.replace(/\./g,`%2e`)}.${t}`)(e,t))},mu=(e,t)=>(Yl===`read`&&fu(e,t),ou($.records,e,t)),hu=(e,t)=>(Yl===`read`&&fu(e,t),ou($.links,e,t)),gu=(e,t)=>{var n=$.abstractToConcreteMap.get(e);if(n)n.add(t);else{var r=new Set;r.add(t),$.abstractToConcreteMap.set(e,r)}},_u=(e,t,n)=>{Du(ou($.records,e,t),n)||(fu(e,t),pu(e,t)),au($.records,e,t,n)},vu=(e,t)=>mu(e,t)!==void 0||hu(e,t)!==void 0,yu=(e,t,n)=>{var r=Jl?$.links.optimistic.get(Jl):$.links.base;if(!Jl){var i=r&&r.get(e);cu(i&&i[t],-1),cu(n,1)}Du(ou($.links,e,t),n)||(fu(e,t),pu(e,t)),au($.links,e,t,n)},bu=(e,t,n)=>{var r=e.optimisticOrder.indexOf(t);if(r>-1&&e.optimisticOrder.splice(r,1),n)for(e.deferredKeys.add(t),r=r>-1?r:0;r<e.optimisticOrder.length&&!e.deferredKeys.has(e.optimisticOrder[r])&&(!e.dirtyKeys.has(e.optimisticOrder[r])||!e.commutativeKeys.has(e.optimisticOrder[r]));r++);else e.deferredKeys.delete(t),r>-1&&!e.commutativeKeys.has(t)&&Su(e,t),r=0;e.optimisticOrder.splice(r,0,t),e.commutativeKeys.add(t)},xu=(e,t)=>{e.optimisticOrder.indexOf(t)===-1&&e.optimisticOrder.unshift(t),e.dirtyKeys.has(t)||(e.dirtyKeys.add(t),e.links.optimistic.set(t,new Map),e.records.optimistic.set(t,new Map))},Su=(e,t)=>{e.dirtyKeys.has(t)&&(e.dirtyKeys.delete(t),e.records.optimistic.delete(t),e.links.optimistic.delete(t),e.deferredKeys.delete(t))},Cu=(e,t)=>{var n=e.optimisticOrder.indexOf(t);n>-1&&(e.optimisticOrder.splice(n,1),e.commutativeKeys.delete(t)),Su(e,t)},wu=e=>{var t=Xl;Xl=new Set,Yl=`write`;var n=$.links.optimistic.get(e);if(n)for(var r of n.entries()){var i=r[0],a=r[1];for(var o in a)yu(i,o,a[o])}var s=$.records.optimistic.get(e);if(s)for(var c of s.entries()){var l=c[0],u=c[1];for(var d in u)_u(l,d,u[d])}Xl=t,Cu($,e)},Tu=e=>{var{links:t,records:n}=$,r=[],i=new Set;return fu(e),uu(r,i,e,t),uu(r,i,e,n),r},Eu=()=>{if($.storage){Ql=!0,Yl=`read`;var e={};for(var t of $.persist.keys()){var{entityKey:n,fieldKey:r}=Gl(t),i=void 0;e[t]=(i=hu(n,r))===void 0?(i=mu(n,r))===void 0?void 0:Ue(i):`:${Ue(i)}`}Ql=!1,$.storage.writeData(e),$.persist.clear()}};function Du(e,t){return typeof e!=typeof t||e!==t?!1:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&!e.some(((e,n)=>e!==t[n])):!0}var Ou=null,ku=!1,Au=void 0,ju=e=>e.__internal.path.length>0&&e.__internal.errorMap?e.__internal.errorMap[e.__internal.path.join(`.`)]:void 0,Mu=(e,t,n,r,i,a)=>{var o={store:e,variables:t,fragments:n,parent:{__typename:r},parentTypeName:r,parentKey:i,parentFieldKey:``,fieldName:``,error:void 0,partial:!1,hasNext:!1,optimistic:Ql,__internal:{path:[],errorMap:void 0}};if(a&&a.graphQLErrors)for(var s=0;s<a.graphQLErrors.length;s++){var c=a.graphQLErrors[s];c.path&&c.path.length&&(o.__internal.errorMap||(o.__internal.errorMap=Object.create(null)),o.__internal.errorMap[c.path.join(`.`)]=c)}return o},Nu=(e,t,n,r,i,a)=>{Ou=e,e.parent=t,e.parentTypeName=n,e.parentKey=r,e.parentFieldKey=i,e.fieldName=a,e.error=ju(e)},Pu=(e,t,n,r,i)=>{if(!t)return!1;var a=Dl(e);return!a||t===a||!El(e).some((e=>e.kind===H.FIELD&&!vu(n,Hl(Sl(e),Ol(e,r)))))},Fu=class{constructor(e,t,n,r,i,a){this.typename=e,this.entityKey=t,this.ctx=a,this.stack=[{selectionSet:i,index:0,defer:n,optional:r}]}next(){for(;this.stack.length>0;){for(var e=this.stack[this.stack.length-1];e.index<e.selectionSet.length;){var t=e.selectionSet[e.index++];if(Nl(t,this.ctx.variables)){if(t.kind!==H.FIELD){var n=t.kind===H.INLINE_FRAGMENT?t:this.ctx.fragments[Sl(t)];if(n){var r=!n.typeCondition||(this.ctx.store.schema?zl(this.ctx.store.schema,n,this.typename):this.ctx.store.possibleTypeMap?Iu(this.ctx.store.possibleTypeMap,n.typeCondition.name.value,this.typename):Yl===`read`&&Lu(n.typeCondition.name.value,this.typename)||Pu(n,this.typename,this.entityKey,this.ctx.variables,this.ctx.store.logger));if(r||Yl===`write`&&!this.ctx.store.schema){var i=Fl(t);r&&n.typeCondition&&this.typename!==n.typeCondition.name.value&&gu(n.typeCondition.name.value,this.typename),this.stack.push(e={selectionSet:El(n),index:0,defer:e.defer||Pl(t,this.ctx.variables),optional:i===void 0?e.optional:i})}}}else if(Yl===`write`||!t._generated)return ku=e.defer,Au=e.optional,t}}this.stack.pop()}}},Iu=(e,t,n)=>{if(!n)return!1;if(t===n)return!0;var r=e.get(t);return r&&r.has(n)},Lu=(e,t)=>{if(!t)return!1;if(e===t)return!0;if((e=>$.types.has(e))(e))return!1;var n=(e=>$.abstractToConcreteMap.get(e)||iu)(e);return n.size&&n.has(t)},Ru=e=>e??null,zu=(e,t)=>{if(!t)return t||null;if(Array.isArray(t)){for(var n=Array(t.length),r=0,i=n.length;r<i;r++)n[r]=zu(e,t[r]);return n}return e.keyOfEntity(t)},Bu=(e,t,n,r)=>{var i=lr(t.query),a=jl(i),o=e.rootFields[a.operation],s=El(a),c=Mu(e,Al(a,t.variables),Ml(i),o,o,r),l=o===c.store.rootFields.query?Wu(c,o,s,n||$l()):Vu(c,o,s,n||$l());return{dependencies:Xl,partial:c.partial||!l,hasNext:c.hasNext,data:l||null}},Vu=(e,t,n,r)=>{if(typeof(e.store.rootNames[t]?t:r.__typename)!=`string`)return r;for(var i=new Fu(t,t,!1,void 0,n,e),a,o=Zl,s=$l(r);a=i.next();){var c=wl(a),l=r[c];e.__internal.path.push(c);var u=void 0;u=a.selectionSet&&l!==null?Hu(e,El(a),Ru(l)):l,o||=u!==l,u!==void 0&&(s[c]=u),e.__internal.path.pop()}return o?s:r},Hu=(e,t,n)=>{if(Array.isArray(n)){for(var r=Array(n.length),i=Zl,a=0,o=n.length;a<o;a++)e.__internal.path.push(a),r[a]=Hu(e,t,n[a]),i||=r[a]!==n[a],e.__internal.path.pop();return i?r:n}if(n===null)return null;var s=e.store.keyOfEntity(n);return s===null?Vu(e,n.__typename,t,n):Wu(e,s,t,n)||null};function Uu(e,t,n,r){var i=r.store.resolvers[t],a=i&&i[n],o;for(var s in e){var c=e[s];if(c&&s!==`include`&&s!==`skip`&&r.store.directives[s])return o=r.store.directives[s](Ol(c,r.variables)),o}return o||a}var Wu=(e,t,n,r,i)=>{var{store:a}=e,o=t===a.rootFields.query,s=i&&a.keyOfEntity(i)||t,c=o?t:mu(s,`__typename`)||i&&i.__typename;if(typeof c==`string`&&!(i&&c!==i.__typename)){for(var l=new Fu(c,s,!1,void 0,n,e),u=!1,d=!1,f=Zl,p,m=e.partial,h=$l(r);(p=l.next())!==void 0;){var g=Sl(p),_=Ol(p,e.variables),v=wl(p),y=xl(p),b=Uu(y,c,g,e),x=Hl(g,_),S=Ul(s,x),C=mu(s,x),w=i?i[g]:void 0;e.__internal.path.push(v);var T=void 0;if(g===`__typename`)T=c;else if(w!==void 0&&p.selectionSet===void 0)T=w;else if(Yl===`read`&&b){var E=h;if(p.selectionSet===void 0&&C!==void 0&&(E={...h,[v]:C,[g]:C}),Nu(e,E,c,s,x,g),T=b(E,_||{},a,e),p.selectionSet&&(T=Gu(e,c,g,S,El(p),h[v]===void 0?r[v]:h[v],T,eu(r))),a.schema&&T===null&&!Ll(a.schema,c,g,e.store.logger))return}else if(!p.selectionSet)T=C;else if(w!==void 0)T=Gu(e,c,g,S,El(p),h[v]===void 0?r[v]:h[v],w,eu(r));else{var D=hu(s,x);D===void 0?typeof C==`object`&&C&&(T=C):T=Ku(e,D,c,g,El(p),h[v]===void 0?r[v]:h[v],eu(r))}if(!ku&&T===void 0&&(y.optional||Au&&!y.required||ju(e)||!y.required&&a.schema&&Ll(a.schema,c,g,e.store.logger))?(e.partial=!0,T=null):T===null&&(y.required||!1===Au)?(e.store.logger,T=void 0):u||=g!==`__typename`,e.__internal.path.pop(),f||=T!==r[v],T!==void 0)h[v]=T;else if(ku)d=!0;else{e.store.logger,e.partial=m;return}}return e.partial=e.partial||m,e.hasNext=e.hasNext||d,o&&e.partial&&!u?void 0:f?h:r}},Gu=(e,t,n,r,i,a,o,s)=>{if(Array.isArray(o)){for(var{store:c}=e,l=c.schema?Rl(c.schema,t,n,e.store.logger):!1,u=e.partial,d=$l(a,!0),f=Zl||!Array.isArray(a)||o.length!==a.length,p=0,m=o.length;p<m;p++){e.__internal.path.push(p);var h=Gu(e,t,n,Ul(r,`${p}`),i,a?.[p],o[p],s);if(e.__internal.path.pop(),h===void 0&&!l){e.partial=u;return}e.partial=e.partial||h===void 0&&l,d[p]=h??null,f||=d[p]!==a[p]}return f?d:a}if(o==null)return o;if(s&&a===null)return null;if(qu(o)){var g=a||$l(a);return typeof o==`string`?Wu(e,o,i,g):Wu(e,r,i,g,o)}},Ku=(e,t,n,r,i,a,o)=>{if(Array.isArray(t)){for(var{store:s}=e,c=s.schema?Rl(s.schema,n,r,e.store.logger):!1,l=$l(a,!0),u=e.partial,d=Zl||!Array.isArray(a)||t.length!==a.length,f=0,p=t.length;f<p;f++){e.__internal.path.push(f);var m=Ku(e,t[f],n,r,i,a?.[f],o);if(e.__internal.path.pop(),m===void 0&&!c){e.partial=u;return}e.partial=e.partial||m===void 0&&c,l[f]=m||null,d||=l[f]!==a[f]}return d?l:a}return t===null||a===null&&o?null:Wu(e,t,i,a||$l(a))},qu=e=>typeof e==`string`||typeof e==`object`&&typeof e.__typename==`string`,Ju=(e,t,n)=>{for(var r=t?[{fieldKey:Hl(t,n)}]:Tu(e),i=0,a=r.length;i<a;i++){var{fieldKey:o}=r[i];hu(e,o)===void 0?_u(e,o,void 0):yu(e,o,void 0)}},Yu=(e,t)=>{for(var n of(e=>$.types.get(e)||iu)(e))t.includes(n)||Ju(n)},Xu=(e,t,n,r)=>{var i=lr(t.query),a=jl(i),o={data:n||$l(),dependencies:Xl},s=e.rootFields[a.operation];return Zu(Mu(e,Al(a,t.variables),Ml(i),s,s,r),s,El(a),o.data),o},Zu=(e,t,n,r)=>{var i=e.store.rootNames[t]||`query`,a=!!e.store.rootNames[t],o=a?t:r.__typename;if(!o&&t&&e.optimistic&&(o=mu(t,`__typename`)),o)!a&&t&&(_u(t,`__typename`,o),((e,t)=>{var n=$.types.get(e);if(n)n.add(t);else{var r=new Set;r.add(t),$.types.set(e,r)}})(o,t));else return;for(var s=e.store.updates[o],c=new Fu(o,t||o,!1,void 0,n,e),l;l=c.next();){var u=Sl(l),d=Ol(l,e.variables),f=Hl(u,d),p=wl(l),m=r[e.optimistic?u:p];if(!(u===`__typename`||m===void 0&&(ku||e.optimistic&&i===`query`))){e.__internal.path.push(p);var h=void 0;if(e.optimistic&&i===`mutation`){if(!(h=e.store.optimisticMutations[u]))continue}else e.optimistic&&typeof m==`function`&&(h=m);if(h&&(Nu(e,r,o,t||o,f,u),m=Ru(h(d||{},e.store,e))),m!==void 0){if(l.selectionSet){if(t&&i===`query`){var g=Ul(t,f),_=Qu(e,El(l),Ru(m),g,e.optimistic?hu(t||o,f):void 0);yu(t||o,f,_)}else Qu(e,El(l),Ru(m))}else t&&i===`query`&&_u(t||o,f,m!==null||!ju(e)?m:void 0);var v=s&&s[u];if(v)Nu(e,r,o,t||o,f,u),r[u]=m,v(r,d||{},e.store,e);else if(o===e.store.rootFields.mutation&&!e.optimistic){if(m&&Array.isArray(m))for(var y=m.map((t=>e.store.keyOfEntity(t)||``)),b=0,x=m.length;b<x;b++){var S=y[b];if(S&&m[b].__typename){var C=mu(S,`__typename`),w=su(S);C&&!w&&Yu(m[b].__typename,y)}}else if(m&&typeof m==`object`){var T=e.store.keyOfEntity(m);if(T){var E=mu(T,`__typename`),D=su(T);(!E||!D)&&m.__typename&&Yu(m.__typename,[T])}}}e.__internal.path.pop()}}}},Qu=(e,t,n,r,i)=>{if(Array.isArray(n)){for(var a=Array(n.length),o=0,s=n.length;o<s;o++){e.__internal.path.push(o);var c=r?Ul(r,`${o}`):void 0,l=Qu(e,t,n[o],c,i?.[o]);a[o]=l,e.__internal.path.pop()}return a}if(n===null)return ju(e)?void 0:null;var u=e.store.keyOfEntity(n)||(typeof i==`string`?i:null);n.__typename;var d=u||r;return Zu(e,d,t,n),d||null},$u=class{constructor(e){e||={},this.logger=e.logger,this.resolvers=e.resolvers||{},this.directives=e.directives||{},this.optimisticMutations=e.optimistic||{},this.keys=e.keys||{},this.globalIDs=Array.isArray(e.globalIDs)?new Set(e.globalIDs):!!e.globalIDs;var t=`Query`,n=`Mutation`,r=`Subscription`;if(e.schema){var i=(({__schema:e})=>{var t=new Map,n=e=>{var t;return()=>{if(!t){t={};for(var n=0;n<e.length;n++)t[e[n].name]=e[n]}return t}},r=e=>{switch(e.kind){case`OBJECT`:case`INTERFACE`:return{name:e.name,kind:e.kind,interfaces:n(e.interfaces||[]),fields:n(e.fields.map((e=>({name:e.name,type:e.type,args:n(e.args)}))))};case`UNION`:return{name:e.name,kind:e.kind,types:n(e.possibleTypes||[])}}},i={query:e.queryType?e.queryType.name:null,mutation:e.mutationType?e.mutationType.name:null,subscription:e.subscriptionType?e.subscriptionType.name:null,types:void 0,isSubType(e,n){var r=t.get(e),i=t.get(n);return!r||!i?!1:r.kind===`UNION`?!!r.types()[n]:r.kind!==`OBJECT`&&i.kind===`OBJECT`?!!i.interfaces()[e]:e===n}};if(e.types){i.types=t;for(var a=0;a<e.types.length;a++){var o=e.types[a];if(o&&o.name){var s=r(o);s&&t.set(o.name,s)}}}return i})(e.schema);t=i.query||t,n=i.mutation||n,r=i.subscription||r,i.types&&(this.schema=i)}if(!this.schema&&e.possibleTypes){this.possibleTypeMap=new Map;for(var a of Object.entries(e.possibleTypes)){var[o,s]=a;this.possibleTypeMap.set(o,new Set(s))}}this.updates=e.updates||{},this.rootFields={query:t,mutation:n,subscription:r},this.rootNames={[t]:`query`,[n]:`mutation`,[r]:`subscription`},this.data=(c=t,{hydrating:!1,defer:!1,gc:new Set,types:new Map,persist:new Set,queryRootKey:c,refCount:new Map,links:{optimistic:new Map,base:new Map},abstractToConcreteMap:new Map,records:{optimistic:new Map,base:new Map},deferredKeys:new Set,commutativeKeys:new Set,dirtyKeys:new Set,optimisticOrder:[],storage:null});var c;this.schema}keyOfField(e,t){return Hl(e,t)}keyOfEntity(e){if(Ou&&e===Ou.parent)return Ou.parentKey;if(e==null||typeof e==`string`)return e||null;if(!e.__typename)return null;if(this.rootNames[e.__typename])return e.__typename;var t=null;this.keys[e.__typename]?t=this.keys[e.__typename](e)||null:e.id==null?e._id!=null&&(t=`${e._id}`):t=`${e.id}`;var n=e.__typename;return!0===this.globalIDs||this.globalIDs&&this.globalIDs.has(n)||!t?t:`${n}:${t}`}resolve(e,t,n){var r=this.keyOfEntity(e);if(r){var i=Hl(t,n),a=mu(r,i);if(a!==void 0)return a;var o=hu(r,i);return o!==void 0&&(o=zu(this,o)),o}}invalidate(e,t,n){var r=this.keyOfEntity(e);e&&typeof e==`string`&&!t&&!n&&!this.resolve(e,`__typename`)?Yu(e,[]):(yl(r,``,19),Ju(r,t,n))}inspectFields(e){var t=this.keyOfEntity(e);return t?Tu(t):[]}updateQuery(e,t){var n=Ie(e.query,e.variables),r=t(this.readQuery(n));r!==null&&Xu(this,n,r,void 0)}readQuery(e){var t=Ie(e.query,e.variables);return Bu(this,t,void 0,void 0).data}readFragment(e,t,n,r){return((e,t,n,r,i)=>{var a=Ml(t),o;if(i){if(!(o=a[i]))return null}else if(!(o=a[Object.keys(a)[0]]))return null;var s=Cl(o);typeof n!=`string`&&!n.__typename&&(n.__typename=s);var c=e.keyOfEntity(n);return c&&Wu(Mu(e,r||{},a,s,c,void 0),c,El(o),$l())||null})(this,lr(e),t,n,r)}writeFragment(e,t,n,r){((e,t,n,r,i)=>{var a=Ml(t),o;if(i){if(!(o=a[i]))return null}else if(!(o=a[Object.keys(a)[0]]))return null;var s=Cl(o),c={__typename:s,...n},l=e.keyOfEntity(c);l&&Zu(Mu(e,r||{},a,s,l,void 0),l,El(o),c)})(this,lr(e),t,n,r)}link(e,t,...n){var r=n.length===2?n[0]:null,i=n.length===2?n[1]:n[0],a=this.keyOfEntity(e);a&&yu(a,Hl(t,r),zu(this,i))}},ed=(e,t)=>dr(e.kind,e,{...e.context,meta:{...e.context.meta,...t}}),td=(e,t)=>dr(e.kind,e,{...e.context,requestPolicy:t}),nd=e=>({forward:t,client:n,dispatchDebug:r})=>{var i=new $u(e);e&&e.storage&&(i.data.hydrating=!0,e.storage.readData().then((t=>{((e,t,n)=>{for(var r in tu(`write`,e,null),n){var i=n[r];if(i!==void 0){var{entityKey:a,fieldKey:o}=Gl(r);i[0]===`:`?hu(a,o)===void 0&&yu(a,o,JSON.parse(i.slice(1))):mu(a,o)===void 0&&_u(a,o,JSON.parse(i))}}e.storage=t,e.hydrating=!1,nu()})(i.data,e.storage,t),e.storage.onCacheHydrated&&e.storage.onCacheHydrated()})));var a=new Map,o=[],s=new Map,c=new Map,l=new Set,u=new Set,d=new Map,f=new Set,p=new Set,m=e=>{for(var t of e.values())if(l.has(t))return!0;return!1},h=(e,t)=>{if(t)for(var n of t.values()){var r=d.get(n);if(r)for(var i of r.values())e.add(i)}},g=(e,t,r)=>{for(var i of t.values())if(i!==e.key){var a=s.get(i);if(a){e.kind===`query`&&p.add(i);var o=`cache-first`;u.has(i)&&(u.delete(i),o=`cache-and-network`),n.reexecuteOperation(td(a,o))}}if(!r){var c=f;f=p,e.kind===`query`&&f.add(e.key),(p=c).clear()}},_=e=>{var t=!1;if(e.kind===`query`)bu(i.data,e.key),s.set(e.key,e);else if(e.kind===`teardown`)return s.delete(e.key),c.delete(e.key),f.delete(e.key),ru(i.data,e.key),e;else if(e.kind===`mutation`&&e.context.requestPolicy!==`network-only`){s.set(e.key,e),tu(`write`,i.data,e.key,!0,!1);var{dependencies:n}=Xu(i,e,void 0,void 0);if(nu(),n.size){for(var r of n.values())l.add(r);a.set(e.key,n);var o=new Set;h(o,n),g(e,o,!0),t=!0}}return dr(e.kind,{key:e.key,query:lr(e.query),variables:e.variables?kl(jl(e.query),e.variables):e.variables},{...e.context,optimistic:t})},v=(e,t)=>{for(var n of t.values()){var r=d.get(n);r||d.set(n,r=new Set),r.add(e.key)}},y=e=>{tu(`read`,i.data,void 0,!1,!1);var t=Bu(i,e,c.get(e.key),void 0);nu();var n=t.data?!t.partial&&!t.hasNext?`hit`:`partial`:`miss`;return c.set(e.key,t.data),s.set(e.key,e),v(e,t.dependencies),{outcome:n,operation:e,data:t.data,dependencies:t.dependencies,hasNext:t.hasNext}},b=(e,t)=>{var n=s.get(e.operation.key)||e.operation;n.kind===`mutation`&&(h(t,a.get(n.key)),a.delete(n.key)),(n.kind===`subscription`||e.hasNext)&&bu(i.data,n.key,!0);var r,o=e.data;if(o){tu(`write`,i.data,n.key,!1,!1);var l=Xu(i,n,o,e.error).dependencies;nu(),h(t,l);var u=n.kind===`query`?c.get(n.key):null;tu(`read`,i.data,n.key,!1,u!==o);var d=Bu(i,n,u||o,e.error);nu(),o=d.data,n.kind===`query`&&(h(t,r=d.dependencies),c.set(n.key,o))}else ru(i.data,n.key);return r&&v(e.operation,r),{operation:n,data:o,error:e.error,extensions:e.extensions,hasNext:e.hasNext,stale:e.stale}};return e=>{var r=rt(He(y)(R((e=>e.kind===`query`&&e.context.requestPolicy!==`network-only`))(e))),c=R((e=>e.kind!==`query`||e.context.requestPolicy===`network-only`))(e),d=He((e=>ed(e.operation,{cacheOutcome:`miss`})))(R((e=>e.outcome===`miss`&&e.operation.context.requestPolicy!==`cache-only`&&!m(e.dependencies)&&!f.has(e.operation.key)))(r)),p=He((e=>{var{requestPolicy:t}=e.operation.context,r=t!==`cache-only`&&(e.hasNext||t===`cache-and-network`||t===`cache-first`&&e.outcome===`partial`&&!f.has(e.operation.key)),a=t!==`cache-only`&&(r||e.outcome===`partial`&&f.has(e.operation.key)&&((o=i.data).commutativeKeys.has(c=e.operation.key)||o.optimisticOrder.indexOf(c)>-1)),o,c,l={operation:ed(e.operation,{cacheOutcome:e.outcome}),data:e.data,error:e.error,extensions:e.extensions,stale:a&&!e.hasNext,hasNext:r&&e.hasNext};return r&&(m(e.dependencies)?t===`cache-and-network`&&u.add(e.operation.key):n.reexecuteOperation(td(s.get(e.operation.key)||e.operation,`network-only`))),l}))(R((e=>e.outcome!==`miss`||e.operation.context.requestPolicy===`cache-only`))(r)),h=t(He(_)(et([c,d]))),v=He((e=>{var t=new Set,n=b(e,t);return g(e.operation,t,!1),n}))(R((e=>!a.has(e.operation.key)))(h)),x=nt((e=>{if(o.push(e)<a.size)return Ke;for(var t=0;t<o.length;t++)bu(i.data,o[t].operation.key);l.clear();for(var n=[],r=new Set,s;s=o.shift();)n.push(b(s,r));return g(e.operation,r,!1),it(n)}))(R((e=>a.has(e.operation.key)))(h));return et([v,x,p])}};function rd(e){return new Worker(`/assets/index-DwsYJ-bu.js`,{type:`module`,name:e?.name})}var id=()=>{},ad=new Promise(e=>{id=e}),od=e=>{id(e),ad=Promise.resolve(e)},sd=async(e,t=!0)=>{try{return await e(await Promise.race([ad,St().then(e=>(od(e),e))]))}catch(n){if(!(n instanceof Error&&n.message.startsWith(`yt-client:`)))throw n;let r=await St();if(od(r),!t)throw Error(`youtube: continuation expired after engine restart (${n.message})`,{cause:n});return e(r)}},cd=r,ld=(e,n)=>{let r=t[e];if(r!==`unless-cursor`)return r===`always`;let i=cd[e];return i===void 0||n[i]===void 0},ud=Object.fromEntries(n.map(e=>[e,(...t)=>sd(n=>n[e](...t),ld(e,t))])),dd=new rd;c(ud,{key:`source`,transport:dd});var fd=c({},{key:`graphql`,transport:dd}),pd=async(...e)=>(await fd).handleRequest(...e),md=(e,t,n)=>{for(let r of e.inspectFields(`Query`))r.fieldName===t&&n(r.arguments??{})&&e.invalidate(`Query`,r.fieldName,r.arguments)},hd=(e,t)=>md(e,`playlist`,e=>e.id===t),gd=e=>md(e,`playlists`,()=>!0),_d=new gr({url:`http://yt-client.local/graphql`,exchanges:[nd({possibleTypes:{SearchResult:[`Video`,`Channel`,`Playlist`,`SearchCard`,`SearchShelf`]},keys:{Video:e=>e.id??null,Channel:e=>e.id??null,Comment:e=>e.id??null,Playlist:e=>e.id??null,WatchMeta:e=>e.id??null,VideoPage:()=>null,HomeFeed:()=>null,Short:()=>null,ShortsPage:()=>null,SectionedVideoPage:()=>null,VideoSection:()=>null,ChannelPage:()=>null,ChannelHome:()=>null,ChannelShelf:()=>null,StoreShelf:()=>null,Product:()=>null,Game:()=>null,ChannelAbout:()=>null,ChannelLink:()=>null,SearchPage:()=>null,HashtagPage:()=>null,SearchCard:()=>null,SearchShelf:()=>null,SearchSuggestion:()=>null,SearchTopic:()=>null,CommentPage:()=>null,PostPage:()=>null,PlaylistItem:()=>null,PlaylistPage:()=>null,PlaylistListPage:()=>null,WatchPlaylist:()=>null,Chapter:()=>null,LiveChatPage:()=>null,LiveChatPinnedMessage:()=>null,LiveChatEmoji:()=>null,LiveChatRun:()=>null,LiveChatBadge:()=>null,LiveChatInputState:()=>null,LiveChatLeaderboardEntryPoint:()=>null,LiveChatLeaderboard:()=>null,LiveChatLeaderboardItem:()=>null,LiveChatPoll:()=>null,LiveChatPollChoice:()=>null,LiveChatTickerItem:()=>null,TextRun:()=>null,BylinePart:()=>null,TranscriptPanel:()=>null,Transcript:()=>null,TranscriptSection:()=>null,TranscriptLine:()=>null,MusicSection:()=>null,Song:()=>null,ChannelCard:()=>null,InfoCard:()=>null,CardTeaser:()=>null,Author:()=>null,Session:()=>null},optimistic:{rateVideo:({id:e,status:t})=>({__typename:`WatchMeta`,id:e,likeStatus:t})},updates:{Mutation:{addToPlaylist:(e,t,n)=>hd(n,t.playlistId),removeFromPlaylist:(e,t,n)=>hd(n,t.playlistId),movePlaylistItem:(e,t,n)=>hd(n,t.playlistId),createPlaylist:(e,t,n)=>gd(n),deletePlaylist:(e,t,n)=>{n.invalidate({__typename:`Playlist`,id:t.id}),gd(n)},clearHistory:(e,t,n)=>md(n,`history`,()=>!0)}}}),pr],fetch:(e,t)=>pd(e,t)}),vd=new Set,yd=e=>{if(!vd.has(e)){vd.add(e);try{performance.mark(`yt:${e}`)}catch{}}},bd=/^[^:@/]+@/,xd=/^https?:\/\/[^@/]+@/,Sd=/^www\.youtube\.com@yt-client:/,Cd=`/__yt_scramjet__/`,wd=`__scramjet_controller`,Td=[wd,`https://www.youtube.com@youtubei.js`],Ed=(e,t)=>new Promise(n=>{try{let r=e.deleteDatabase(t);r.onsuccess=()=>n(),r.onerror=()=>n(),r.onblocked=()=>n()}catch{n()}}),Dd=async({serviceWorker:e=globalThis.navigator?.serviceWorker,indexedDB:t=globalThis.indexedDB,caches:n=globalThis.caches,storage:r=globalThis.localStorage}={})=>{if(await e?.getRegistration(Cd).then(e=>e&&new URL(e.scope).pathname===Cd?e.unregister():void 0).catch(()=>{}),t){let e=(await t.databases?.().then(e=>e.map(({name:e})=>e??``),()=>void 0)??Td).filter(e=>e===wd||xd.test(e));await Promise.all(e.map(e=>Ed(t,e)))}await n?.keys().then(e=>Promise.all(e.filter(e=>xd.test(e)).map(e=>n.delete(e)))).catch(()=>{});try{if(r){let e=Array.from({length:r.length},(e,t)=>r.key(t)??``);for(let t of e)bd.test(t)&&!Sd.test(t)&&r.removeItem(t)}}catch{}},Od=V`
|
|
3953
|
+
/* Dark is the base palette; the light block below overrides only what
|
|
3954
|
+
changes. 'Device' is resolved to one of the two in JS rather than by a
|
|
3955
|
+
media query, so an explicit choice always wins without a specificity
|
|
3956
|
+
fight. Inverse tokens are the pair that swaps between themes (the active
|
|
3957
|
+
chip is a light pill in dark mode and a dark pill in light mode), so they
|
|
3958
|
+
must stay distinct from --bg-base / --text-primary. */
|
|
3959
|
+
:root {
|
|
3960
|
+
color-scheme: dark;
|
|
3961
|
+
|
|
3962
|
+
--bg-base: #0f0f0f;
|
|
3963
|
+
--bg-subtle: #1f1f1f;
|
|
3964
|
+
--bg-elevated: #212121;
|
|
3965
|
+
--bg-menu: #282828;
|
|
3966
|
+
--bg-chip: #272727;
|
|
3967
|
+
--bg-chip-hover: #3f3f3f;
|
|
3968
|
+
--bg-selected: #272727;
|
|
3969
|
+
--bg-hover: rgba(255, 255, 255, 0.1);
|
|
3970
|
+
--bg-hover-strong: rgba(255, 255, 255, 0.15);
|
|
3971
|
+
--bg-input: #121212;
|
|
3972
|
+
--bg-input-button: #222222;
|
|
3973
|
+
--bg-inverse: #f1f1f1;
|
|
3974
|
+
--bg-inverse-hover: #ffffff;
|
|
3975
|
+
|
|
3976
|
+
--border: #303030;
|
|
3977
|
+
--border-strong: #3f3f3f;
|
|
3978
|
+
--border-subtle: rgba(255, 255, 255, 0.2);
|
|
3979
|
+
|
|
3980
|
+
--text-primary: #f1f1f1;
|
|
3981
|
+
--text-secondary: #aaaaaa;
|
|
3982
|
+
--text-tertiary: #717171;
|
|
3983
|
+
--text-placeholder: #888888;
|
|
3984
|
+
--text-inverse: #0f0f0f;
|
|
3985
|
+
|
|
3986
|
+
--accent: #3ea6ff;
|
|
3987
|
+
--accent-hover: rgba(62, 166, 255, 0.15);
|
|
3988
|
+
--accent-focus: #1c62b9;
|
|
3989
|
+
--accent-inverse: #065fd4;
|
|
3990
|
+
/* youtube.com's chapter time pills, opaque so the line joining them stops at each */
|
|
3991
|
+
--accent-tint: #263850;
|
|
3992
|
+
/* the time of the transcript line playing, from the palette of youtube.com's answer for g6Die8gVFn0 (2026-11-10),
|
|
3993
|
+
which varies a little from video to video */
|
|
3994
|
+
--transcript-tint: rgba(69, 118, 201, 0.169);
|
|
3995
|
+
--transcript-tint-text: #acbedd;
|
|
3996
|
+
--danger: #f28b82;
|
|
3997
|
+
--membership: #2ba640;
|
|
3998
|
+
|
|
3999
|
+
--shadow-menu: 0 0.4rem 3.2rem rgba(0, 0, 0, 0.4);
|
|
4000
|
+
|
|
4001
|
+
/* Theme-invariant on purpose, so the light block below must NOT override
|
|
4002
|
+
them: the brand mark is red in both themes, and anything drawn over a
|
|
4003
|
+
thumbnail or the video surface sits on media rather than on the page. */
|
|
4004
|
+
--brand: #ff0000;
|
|
4005
|
+
/* The progress red, which is NOT the logo red: upstream draws its playhead
|
|
4006
|
+
and played track in #ff0033, measured off their inline preview, and the
|
|
4007
|
+
mark itself in #ff0000.
|
|
4008
|
+
|
|
4009
|
+
This existed only as four var(--brand-red) references with nothing
|
|
4010
|
+
defining it, so every one of them computed to an invalid background and
|
|
4011
|
+
painted NOTHING: the preview's played fill and its playhead knob, the
|
|
4012
|
+
search filter dot and the notifications badge were all invisible. */
|
|
4013
|
+
--brand-red: #ff0033;
|
|
4014
|
+
--bg-scrim: rgba(0, 0, 0, 0.5);
|
|
4015
|
+
--bg-badge: rgba(0, 0, 0, 0.8);
|
|
4016
|
+
--text-on-media: #ffffff;
|
|
4017
|
+
|
|
4018
|
+
--header-height: 5.6rem;
|
|
4019
|
+
--guide-width: 24rem;
|
|
4020
|
+
--guide-mini-width: 7.2rem;
|
|
4021
|
+
|
|
4022
|
+
--z-guide: 1000;
|
|
4023
|
+
--z-header: 2000;
|
|
4024
|
+
--z-drawer: 2100;
|
|
4025
|
+
--z-popup: 2200;
|
|
4026
|
+
--z-dialog: 2300;
|
|
4027
|
+
--z-toast: 2400;
|
|
4028
|
+
}
|
|
4029
|
+
|
|
4030
|
+
/* The page is #f9f9f9 rather than white so that raised surfaces (menus,
|
|
4031
|
+
dialogs, cards) can be white and still read as raised. Every --bg-* pair
|
|
4032
|
+
that meets in one rule (a surface and its hover, a track and its ring)
|
|
4033
|
+
must resolve to different values here: dark has eight distinct surface
|
|
4034
|
+
greys to separate them, and collapsing them all onto white is what makes
|
|
4035
|
+
hover states and card edges silently vanish in light mode. */
|
|
4036
|
+
:root[data-theme='light'] {
|
|
4037
|
+
color-scheme: light;
|
|
4038
|
+
|
|
4039
|
+
--bg-base: #f9f9f9;
|
|
4040
|
+
--bg-subtle: #ffffff;
|
|
4041
|
+
--bg-elevated: #f2f2f2;
|
|
4042
|
+
--bg-menu: #ffffff;
|
|
4043
|
+
--bg-chip: #f2f2f2;
|
|
4044
|
+
--bg-chip-hover: #e5e5e5;
|
|
4045
|
+
--bg-selected: #e5e5e5;
|
|
4046
|
+
--bg-hover: rgba(0, 0, 0, 0.05);
|
|
4047
|
+
--bg-hover-strong: rgba(0, 0, 0, 0.1);
|
|
4048
|
+
--bg-input: #ffffff;
|
|
4049
|
+
--bg-input-button: #f8f8f8;
|
|
4050
|
+
--bg-inverse: #0f0f0f;
|
|
4051
|
+
--bg-inverse-hover: #000000;
|
|
4052
|
+
|
|
4053
|
+
--shadow-menu: 0 0.2rem 1.2rem rgba(0, 0, 0, 0.15);
|
|
4054
|
+
|
|
4055
|
+
--border: #d9d9d9;
|
|
4056
|
+
--border-strong: #d9d9d9;
|
|
4057
|
+
--border-subtle: rgba(0, 0, 0, 0.1);
|
|
4058
|
+
|
|
4059
|
+
--text-primary: #0f0f0f;
|
|
4060
|
+
--text-secondary: #606060;
|
|
4061
|
+
--text-tertiary: #909090;
|
|
4062
|
+
--text-placeholder: #909090;
|
|
4063
|
+
--text-inverse: #ffffff;
|
|
4064
|
+
|
|
4065
|
+
--accent: #065fd4;
|
|
4066
|
+
--accent-hover: rgba(6, 95, 212, 0.1);
|
|
4067
|
+
--accent-focus: #065fd4;
|
|
4068
|
+
--accent-inverse: #3ea6ff;
|
|
4069
|
+
--accent-tint: #def1ff;
|
|
4070
|
+
--transcript-tint: rgba(69, 118, 201, 0.129);
|
|
4071
|
+
--transcript-tint-text: #3a4d6e;
|
|
4072
|
+
--danger: #c5221f;
|
|
4073
|
+
--membership: #107516;
|
|
4074
|
+
}
|
|
4075
|
+
|
|
4076
|
+
*,
|
|
4077
|
+
*::before,
|
|
4078
|
+
*::after {
|
|
4079
|
+
box-sizing: border-box;
|
|
4080
|
+
margin: 0;
|
|
4081
|
+
padding: 0;
|
|
4082
|
+
}
|
|
4083
|
+
|
|
4084
|
+
* {
|
|
4085
|
+
scrollbar-width: thin;
|
|
4086
|
+
scrollbar-color: var(--text-tertiary) transparent;
|
|
4087
|
+
}
|
|
4088
|
+
|
|
4089
|
+
html {
|
|
4090
|
+
font-size: 62.5%;
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
html,
|
|
4094
|
+
body,
|
|
4095
|
+
#app {
|
|
4096
|
+
min-height: 100%;
|
|
4097
|
+
}
|
|
4098
|
+
|
|
4099
|
+
body {
|
|
4100
|
+
min-width: 320px;
|
|
4101
|
+
font-family: 'Roboto', Arial, sans-serif;
|
|
4102
|
+
font-size: 1.4rem;
|
|
4103
|
+
background-color: var(--bg-base);
|
|
4104
|
+
color: var(--text-primary);
|
|
4105
|
+
}
|
|
4106
|
+
|
|
4107
|
+
button,
|
|
4108
|
+
input {
|
|
4109
|
+
font: inherit;
|
|
4110
|
+
}
|
|
4111
|
+
|
|
4112
|
+
a {
|
|
4113
|
+
color: inherit;
|
|
4114
|
+
text-decoration: none;
|
|
4115
|
+
}
|
|
4116
|
+
|
|
4117
|
+
ul {
|
|
4118
|
+
list-style: none;
|
|
4119
|
+
}
|
|
4120
|
+
`;(!document.title||document.title===`FKN Sandbox`)&&(document.title=`FTube`),fn(),Zn();var kd=document.createElement(`div`);kd.id=`app`,document.body.appendChild(kd);var Ad=location.pathname;(Ad.startsWith(`/watch`)||Ad.startsWith(`/shorts/`)||Ad===`/shorts`&&!Z().hideShorts)&&Tn().catch(()=>{}),St().then(e=>{od(e),yd(`engine-ready`),document.documentElement.dataset.engine=`ready`;let t=location.pathname;if(t===`/watch`){let e=new URLSearchParams(location.search).get(`v`),t=Ht(history.state);e&&zn(e,t)}else if(t.startsWith(`/shorts/`)){let e=Rt(t.slice(8).split(`/`)[0]??``);e&&zn(e)}else t===`/shorts`&&e.warmPlayback().catch(()=>{});let n=!t.startsWith(`/watch`)&&!t.startsWith(`/shorts`)&&t!==`/privacy`&&t!==`/settings`;n&&e.warmPlayback().catch(()=>{}),(globalThis.requestIdleCallback??(e=>setTimeout(e,1e3)))(()=>{Dd(),n&&Tn().catch(()=>{})})},e=>{document.documentElement.dataset.engine=`error`,document.documentElement.dataset.engineError=e instanceof Error?e.message:String(e)}),Mi().catch(e=>console.warn(`groups: FKN account sync did not start`,e)),ke(z(ze,{value:_d,children:[U(st,{styles:Od}),U(fl,{}),U(_l,{}),U(mt,{})]}),kd),setTimeout(()=>Un(pn()),0);export{ci as A,Sa as C,mi as D,pi as E,xr as F,Lr as I,kr as L,jr as M,Ar as N,hi as O,Mr as P,Rr as R,Q as S,ma as T,Ka as _,Sc as a,Ia as b,yc as c,fc as d,As as f,Zo as g,os as h,Ec as i,ei as j,ii as k,hc as l,ls as m,nl as n,bc as o,hs as p,dl as r,vc as s,yd as t,dc as u,qa as v,ha as w,La as x,Ha as y};
|