@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.
Files changed (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -2
  3. package/__yt_engine__/engine.html +9 -0
  4. package/app.webmanifest +31 -0
  5. package/assets/account-BL8Hv7lS.js +157 -0
  6. package/assets/account-By94iboj.js +1 -0
  7. package/assets/account-DfiXzypA-YE6OyKjK.js +1 -0
  8. package/assets/account-generation-BP_-Qyck-BOth6YQ_.js +1 -0
  9. package/assets/agent-source-E4g0cDzU.js +1 -0
  10. package/assets/api-1NDCtwel-CAaxX8P1.js +3 -0
  11. package/assets/binary-encoding-By5K7InN.js +1 -0
  12. package/assets/build-CNn3bm6X.js +1 -0
  13. package/assets/busy-C1JPjoZ_-CJ0641jK.js +1 -0
  14. package/assets/cards-Csel8naI.js +2334 -0
  15. package/assets/channel-B5f9YTIf.js +1160 -0
  16. package/assets/client-version-D9kIz6Gz.js +1 -0
  17. package/assets/comments-CJp9O808.js +612 -0
  18. package/assets/dislikes-DH5jCVEY.js +1 -0
  19. package/assets/dist-7VpLCl1k.js +1 -0
  20. package/assets/dist-BOrL1gYg.js +2 -0
  21. package/assets/downloads-CMXDjA_E.js +191 -0
  22. package/assets/egress.worker-DopXr5uP.js +104 -0
  23. package/assets/engine-B_kFyW7L.js +2 -0
  24. package/assets/feed-channels-Dg2mvF5x.js +251 -0
  25. package/assets/feed-groups-CnyR4sOO.js +160 -0
  26. package/assets/feed-history-BDAGG9N5.js +368 -0
  27. package/assets/feed-playlists-DcGR2AL6.js +167 -0
  28. package/assets/feed-subscriptions-Sm3tKz4P.js +165 -0
  29. package/assets/feed-you-lxbqknXX.js +110 -0
  30. package/assets/formats-CDwXfKnr.js +1 -0
  31. package/assets/frame-BrGNSf3s.js +2 -0
  32. package/assets/fs-CjRTQ7Nu.js +1 -0
  33. package/assets/fs-CwRtKje1-CBsYhX2-.js +1 -0
  34. package/assets/fullscreen-view-BLgosU84.js +269 -0
  35. package/assets/group-C00s0aT7.js +183 -0
  36. package/assets/groups-button-CvVnqwlu.js +25 -0
  37. package/assets/hashtag-CCIhITaL.js +115 -0
  38. package/assets/icons-DKsqNLSs.js +1 -0
  39. package/assets/index-A5dHbptn.css +1 -0
  40. package/assets/index-DwsYJ-bu.js +1328 -0
  41. package/assets/lib-h0P14ZFl.js +70 -0
  42. package/assets/linkify-B6hdFhsL.js +1 -0
  43. package/assets/packages-C3w3tSjj-BCtDk0vj.js +1 -0
  44. package/assets/party-CUcxsJDF.js +180 -0
  45. package/assets/playlist-DF7wsidw.js +521 -0
  46. package/assets/playlist-card-Btoc7D8f.js +91 -0
  47. package/assets/playlist-panel-D97BwT1f.js +199 -0
  48. package/assets/post-CQ9mfVos.js +39 -0
  49. package/assets/post-card-ZUQixO1G.js +76 -0
  50. package/assets/privacy-hkbqXFeB.js +46 -0
  51. package/assets/protobuf-BXZ2dCCc.js +1 -0
  52. package/assets/read-more-BhddUSlS.js +20 -0
  53. package/assets/rich-text-07paR5O3.js +25 -0
  54. package/assets/roboto-cyrillic-ext-BCp_3N7R.woff2 +0 -0
  55. package/assets/roboto-cyrillic-fOt7epNf.woff2 +0 -0
  56. package/assets/roboto-greek-DlT9XTxE.woff2 +0 -0
  57. package/assets/roboto-greek-ext-Bgw4czJT.woff2 +0 -0
  58. package/assets/roboto-latin-ccAYIvAh.woff2 +0 -0
  59. package/assets/roboto-latin-ext-DYIxWhlt.woff2 +0 -0
  60. package/assets/roboto-math-4a3xuzGk.woff2 +0 -0
  61. package/assets/roboto-symbols-B7iHSfaG.woff2 +0 -0
  62. package/assets/roboto-vietnamese-_f1XEJpo.woff2 +0 -0
  63. package/assets/rooms-B-AvBY-c-FNDqRDHE.js +1 -0
  64. package/assets/rooms-B91zuirR.js +1 -0
  65. package/assets/save-menu-DF1WKqSE.js +462 -0
  66. package/assets/search-Cx5IpDtZ.js +1026 -0
  67. package/assets/settings-kESE_uBm.js +99 -0
  68. package/assets/shaka-BwT9pJcV.js +36 -0
  69. package/assets/share-dialog-Cp0BJ6bg.js +156 -0
  70. package/assets/shorts-BxDB7m0c.js +686 -0
  71. package/assets/shorts-grid-Bgbkl5dP.js +11 -0
  72. package/assets/sign-in-Bx3zmj-m.js +97 -0
  73. package/assets/signed-out-prompt-CEAx65kq.js +79 -0
  74. package/assets/signin-DkI8Ogzz.js +18 -0
  75. package/assets/social-bXt3vmd4.js +1 -0
  76. package/assets/video-card-compact-r-K4XyDb.js +190 -0
  77. package/assets/watch-CkxSP1IA.js +1802 -0
  78. package/assets/web-BNanCsH5.js +43 -0
  79. package/favicon.ico +0 -0
  80. package/favicon.svg +5 -0
  81. package/icons/icon-192.png +0 -0
  82. package/icons/icon-512.png +0 -0
  83. package/index-Bj-Q3X8Q.js +4120 -0
  84. package/index.html +32 -0
  85. package/package.json +45 -4
  86. package/store/background.webp +0 -0
  87. package/store/channel.webp +0 -0
  88. package/store/cover.webp +0 -0
  89. package/store/phone.webp +0 -0
  90. package/store/search.webp +0 -0
  91. package/store/watch.webp +0 -0
@@ -0,0 +1,1160 @@
1
+ import{C as e,S as t}from"./dist-BOrL1gYg.js";import{E as n,Ut as r,an as i,en as a,jt as o,kt as s,on as c,rt as l,sn as u,tn as d}from"./icons-DKsqNLSs.js";import{C as ee,T as te,c as f,d as ne,g as p,k as m,o as h,ot as g,s as _,y as v}from"./sign-in-Bx3zmj-m.js";import{$ as re,A as ie,G as y,K as ae,Kt as b,P as x,Sn as S,T as C,Y as w,c as T,et as oe,hn as se,in as ce,j as le,k as E,kt as D,ln as ue,rn as de,xn as fe}from"./cards-Csel8naI.js";import{a as pe,i as me,l as he,n as ge}from"../index-Bj-Q3X8Q.js";import{t as O}from"./rich-text-07paR5O3.js";import{t as _e}from"./groups-button-CvVnqwlu.js";import{t as ve}from"./playlist-card-Btoc7D8f.js";import{t as k}from"./post-card-ZUQixO1G.js";import{t as ye}from"./shorts-grid-Bgbkl5dP.js";import{t as A}from"./linkify-B6hdFhsL.js";u();var be=p(`
2
+ query ChannelAbout($id: ID!) {
3
+ channelAbout(id: $id) {
4
+ description
5
+ country
6
+ joinedDateText
7
+ viewCountText
8
+ subscriberCountText
9
+ videoCountText
10
+ links { title url displayUrl }
11
+ }
12
+ }
13
+ `),j=g`
14
+ h3 {
15
+ margin: 2.4rem 0 1.2rem;
16
+ font-size: 2rem;
17
+ font-weight: 700;
18
+ }
19
+
20
+ h3:first-of-type {
21
+ margin-top: 0;
22
+ }
23
+
24
+ .about-description {
25
+ margin: 0;
26
+ font-size: 1.4rem;
27
+ line-height: 2rem;
28
+ white-space: pre-wrap;
29
+ overflow-wrap: anywhere;
30
+ }
31
+
32
+ ul {
33
+ display: flex;
34
+ flex-direction: column;
35
+ gap: 1.2rem;
36
+ margin: 0;
37
+ padding: 0;
38
+ list-style: none;
39
+ font-size: 1.4rem;
40
+ line-height: 2rem;
41
+ }
42
+
43
+ .about-links li {
44
+ display: flex;
45
+ flex-direction: column;
46
+ min-width: 0;
47
+ }
48
+
49
+ .about-links a {
50
+ overflow: hidden;
51
+ color: var(--accent);
52
+ text-overflow: ellipsis;
53
+ white-space: nowrap;
54
+ }
55
+ `,xe=({name:e,about:t,description:n,onClose:r})=>{let i=t?.description??n,a=[t?.country,t?.joinedDateText,t?.subscriberCountText,t?.videoCountText,t?.viewCountText].filter(e=>e!=null&&e!==``);return _(y,{title:e,onClose:r,children:f(`div`,{css:j,children:[i?f(h,{children:[_(`h3`,{children:`Description`}),_(`p`,{className:`about-description`,children:i})]}):void 0,t&&t.links.length>0?f(h,{children:[_(`h3`,{children:`Links`}),_(`ul`,{className:`about-links`,children:t.links.map(e=>f(`li`,{children:[_(`span`,{children:e.title}),_(`a`,{href:e.url,target:`_blank`,rel:`noreferrer noopener`,children:e.displayUrl??e.url})]},e.url))})]}):void 0,a.length>0?f(h,{children:[_(`h3`,{children:`More info`}),_(`ul`,{className:`about-details`,children:a.map(e=>_(`li`,{children:e},e))})]}):void 0]})})},M=e=>e.expandable===!0&&e.videos.length+e.playlists.length+e.posts.length>0,Se=(e,t)=>t?e.map(e=>({...e,shorts:[],videos:e.videos.filter(e=>!e.isShort)})).filter(e=>e.videos.length+e.playlists.length+e.channels.length+e.games.length+e.posts.length>0):[...e],N=g`
56
+ > * {
57
+ padding: 2.4rem 0;
58
+ border-bottom: 1px solid var(--border-subtle);
59
+ }
60
+
61
+ > :first-of-type {
62
+ padding-top: 0;
63
+ }
64
+
65
+ > :last-child {
66
+ border-bottom: none;
67
+ }
68
+
69
+ .featured {
70
+ display: flex;
71
+ gap: 2.4rem;
72
+ }
73
+
74
+ .featured-thumb {
75
+ position: relative;
76
+ flex: none;
77
+ display: block;
78
+ width: 42.4rem;
79
+ max-width: 100%;
80
+ aspect-ratio: 16 / 9;
81
+ border-radius: 1.2rem;
82
+ overflow: hidden;
83
+ background: var(--bg-elevated);
84
+ }
85
+
86
+ .featured-thumb img {
87
+ display: block;
88
+ width: 100%;
89
+ height: 100%;
90
+ object-fit: cover;
91
+ }
92
+
93
+ .featured-thumb .badge {
94
+ position: absolute;
95
+ right: 0.6rem;
96
+ bottom: 0.6rem;
97
+ display: flex;
98
+ align-items: center;
99
+ gap: 0.2rem;
100
+ padding: 0.1rem 0.4rem;
101
+ border-radius: 0.4rem;
102
+ background: var(--bg-badge);
103
+ color: var(--text-on-media);
104
+ font-size: 1.2rem;
105
+ font-weight: 500;
106
+ line-height: 1.8rem;
107
+ }
108
+
109
+ .featured-thumb .badge.live {
110
+ background: var(--brand);
111
+ text-transform: uppercase;
112
+ }
113
+
114
+ .featured-text {
115
+ min-width: 0;
116
+ max-width: 40rem;
117
+ }
118
+
119
+ .featured-title {
120
+ margin: 0;
121
+ font-size: 1.4rem;
122
+ font-weight: 500;
123
+ line-height: 2rem;
124
+ color: var(--text-primary);
125
+ }
126
+
127
+ .featured-meta {
128
+ margin-top: 0.8rem;
129
+ font-size: 1.2rem;
130
+ color: var(--text-secondary);
131
+ }
132
+
133
+ /* Cut by height rather than -webkit-line-clamp so a blank paragraph line at
134
+ the cut never draws an orphaned ellipsis on its own empty line. */
135
+ .featured-description {
136
+ margin: 1.6rem 0 0;
137
+ max-height: 12rem;
138
+ font-size: 1.4rem;
139
+ line-height: 2rem;
140
+ color: var(--text-primary);
141
+ white-space: pre-wrap;
142
+ overflow-wrap: anywhere;
143
+ overflow: hidden;
144
+ }
145
+
146
+ .featured-more {
147
+ display: inline-block;
148
+ margin-top: 1.2rem;
149
+ font-size: 1.2rem;
150
+ font-weight: 500;
151
+ line-height: 1.8rem;
152
+ text-transform: uppercase;
153
+ color: var(--text-secondary);
154
+ transition: color 0.15s ease;
155
+ }
156
+
157
+ .featured-more:hover {
158
+ color: var(--text-primary);
159
+ }
160
+
161
+ .shelf-title {
162
+ margin: 0;
163
+ font-size: 2rem;
164
+ font-weight: 700;
165
+ line-height: 2.8rem;
166
+ color: var(--text-primary);
167
+ }
168
+
169
+ .shelf-subtitle {
170
+ margin: 0.4rem 0 0;
171
+ max-width: 64rem;
172
+ font-size: 1.4rem;
173
+ line-height: 2rem;
174
+ color: var(--text-secondary);
175
+ display: -webkit-box;
176
+ -webkit-line-clamp: 2;
177
+ -webkit-box-orient: vertical;
178
+ overflow: hidden;
179
+ }
180
+
181
+ /* youtube.com's row cards are 214px with their gap, the same step the
182
+ channel column widens by, so a row always ends on a whole card. The arrow
183
+ sits on the middle of the thumbnail. */
184
+ .shelf-rail {
185
+ --rail-arrow-top: 3.8rem;
186
+ margin-top: 1.6rem;
187
+ }
188
+
189
+ .shelf-card {
190
+ width: 20.6rem;
191
+ }
192
+
193
+ /* A channel's own posts row on youtube.com: 436 by 210px cards on a 444px
194
+ step, five lines of text with its line breaks run together, the picture a
195
+ 116px square beside it, and the comment count at the far end. Measured on
196
+ youtube.com/@mkbhd at 1280px, 2026-11-10. */
197
+ .post-shelf {
198
+ --rail-arrow-top: 8.5rem;
199
+ margin-top: 1.6rem;
200
+ }
201
+
202
+ .post-shelf .post {
203
+ display: grid;
204
+ grid-template: auto minmax(0, 1fr) auto / minmax(0, 1fr) auto;
205
+ column-gap: 1.6rem;
206
+ width: 43.6rem;
207
+ height: 21rem;
208
+ padding: 1.2rem 2.4rem 0;
209
+ overflow: hidden;
210
+ }
211
+
212
+ .post-shelf .post-head {
213
+ grid-column: 1 / -1;
214
+ gap: 1.2rem;
215
+ font-size: 1.2rem;
216
+ line-height: 1.8rem;
217
+ }
218
+
219
+ .post-shelf .post-author {
220
+ font-weight: 400;
221
+ color: var(--text-secondary);
222
+ }
223
+
224
+ .post-shelf .post-text {
225
+ align-self: start;
226
+ margin-top: 1.4rem;
227
+ font-size: 1.4rem;
228
+ line-height: 2rem;
229
+ white-space: normal;
230
+ display: -webkit-box;
231
+ -webkit-line-clamp: 5;
232
+ -webkit-box-orient: vertical;
233
+ overflow: hidden;
234
+ }
235
+
236
+ .post-shelf .post-image {
237
+ grid-area: 2 / 2;
238
+ width: 11.6rem;
239
+ height: 11.6rem;
240
+ margin-top: 1.2rem;
241
+ object-fit: cover;
242
+ }
243
+
244
+ .post-shelf .post-footer {
245
+ grid-column: 1 / -1;
246
+ }
247
+
248
+ .post-shelf .post-comments {
249
+ margin-left: auto;
250
+ }
251
+
252
+ .channel-tile {
253
+ display: flex;
254
+ flex-direction: column;
255
+ align-items: center;
256
+ width: 20.6rem;
257
+ text-align: center;
258
+ color: var(--text-primary);
259
+ }
260
+
261
+ .channel-tile img,
262
+ .channel-tile .initial {
263
+ width: 13.6rem;
264
+ height: 13.6rem;
265
+ border-radius: 50%;
266
+ object-fit: cover;
267
+ background: var(--bg-chip);
268
+ }
269
+
270
+ .channel-tile .initial {
271
+ display: flex;
272
+ align-items: center;
273
+ justify-content: center;
274
+ font-size: 4.8rem;
275
+ }
276
+
277
+ .channel-tile .name {
278
+ margin-top: 1.2rem;
279
+ font-size: 1.4rem;
280
+ font-weight: 500;
281
+ }
282
+
283
+ .channel-tile .subscribers {
284
+ margin-top: 0.4rem;
285
+ font-size: 1.2rem;
286
+ color: var(--text-secondary);
287
+ }
288
+
289
+ /* youtube.com's box art is 210 by 290px on a 214px step */
290
+ .game-tile {
291
+ display: flex;
292
+ flex-direction: column;
293
+ width: 20.6rem;
294
+ color: var(--text-primary);
295
+ }
296
+
297
+ .game-tile .box-art {
298
+ width: 100%;
299
+ aspect-ratio: 210 / 290;
300
+ border-radius: 0.8rem;
301
+ object-fit: cover;
302
+ background: var(--bg-elevated);
303
+ }
304
+
305
+ .game-tile .name {
306
+ margin-top: 0.8rem;
307
+ font-size: 1.4rem;
308
+ font-weight: 500;
309
+ line-height: 2rem;
310
+ }
311
+
312
+ /* A topic channel's rows on youtube.com: home-feed cards, three across at
313
+ the 1070px column (four for playlists), one row until Show more. Measured
314
+ on youtube.com's Live, News, Sports and Music, 2026-11-10. */
315
+ .rich-grid {
316
+ display: grid;
317
+ grid-template-columns: repeat(auto-fill, minmax(min(31rem, 100%), 1fr));
318
+ column-gap: 1.6rem;
319
+ row-gap: 2.4rem;
320
+ margin-top: 1.6rem;
321
+ }
322
+
323
+ .rich-grid.playlists {
324
+ grid-template-columns: repeat(auto-fill, minmax(min(23rem, 100%), 1fr));
325
+ }
326
+
327
+ .rich-grid .post-text {
328
+ display: -webkit-box;
329
+ -webkit-line-clamp: 4;
330
+ -webkit-box-orient: vertical;
331
+ overflow: hidden;
332
+ }
333
+
334
+ .show-more {
335
+ display: flex;
336
+ align-items: center;
337
+ gap: 0.6rem;
338
+ height: 3.6rem;
339
+ margin: 2.4rem auto 0;
340
+ padding: 0 1.6rem;
341
+ border: 1px solid var(--border-subtle);
342
+ border-radius: 1.8rem;
343
+ background: transparent;
344
+ color: var(--text-primary);
345
+ font: inherit;
346
+ font-size: 1.4rem;
347
+ font-weight: 500;
348
+ cursor: pointer;
349
+ }
350
+
351
+ .show-more:hover {
352
+ background: var(--bg-hover);
353
+ }
354
+
355
+ @media (max-width: 768px) {
356
+ .featured {
357
+ flex-direction: column;
358
+ }
359
+ }
360
+ `,P=({shelf:e})=>f(h,{children:[_(`h2`,{className:`shelf-title`,children:e.url?_(v,{href:e.url,children:e.title}):e.title}),e.subtitle?_(`p`,{className:`shelf-subtitle`,children:e.subtitle}):void 0]}),F=({shelf:e})=>{let t=d(null),[n,r]=c(),[i,l]=c(!1);a(()=>{let e=t.current;if(!e)return;let n=()=>r(getComputedStyle(e).gridTemplateColumns.split(` `).length);n();let i=new ResizeObserver(n);return i.observe(e),()=>i.disconnect()},[]);let u=[...e.videos.map(t=>_(C,{video:t,variant:e.uploads?`channel`:void 0},t.id)),...e.playlists.map(e=>_(ve,{id:e.id,title:e.title,thumbnail:e.thumbnail,videoCountText:e.videoCountText},e.id)),...e.posts.map(e=>_(k,{post:e,readMore:!1},e.id))],ee=n!==void 0&&u.length>n;return f(`section`,{"aria-label":e.title,children:[_(P,{shelf:e}),_(`div`,{ref:t,className:e.videos.length+e.posts.length>0?`rich-grid`:`rich-grid playlists`,children:ee&&!i?u.slice(0,n):u}),ee?f(`button`,{type:`button`,className:`show-more`,"aria-expanded":i,onClick:()=>l(!i),children:[i?`Show less`:`Show more`,_(i?s:o,{size:20,strokeWidth:1.5})]}):void 0]})},I=({shelf:e})=>{if(e.shorts.length>0&&e.videos.length+e.playlists.length+e.channels.length+e.games.length+e.posts.length===0)return _(pe,{shorts:e.shorts});if(M(e))return _(F,{shelf:e});let t=e.videos.length+e.playlists.length+e.channels.length+e.games.length+e.posts.length;return f(`section`,{"aria-label":e.title,children:[_(P,{shelf:e}),_(`div`,{className:e.posts.length>0?`shelf-rail post-shelf`:`shelf-rail`,children:f(T,{label:e.title,count:t,children:[e.videos.map(t=>_(`div`,{className:`shelf-card`,children:_(C,{video:t,variant:e.uploads?`channel`:`shelf`})},t.id)),e.playlists.map(e=>_(`div`,{className:`shelf-card`,children:_(ve,{id:e.id,title:e.title,thumbnail:e.thumbnail,videoCountText:e.videoCountText})},e.id)),e.channels.map(e=>f(v,{className:`channel-tile`,href:`/channel/${e.id}`,children:[e.avatar?_(`img`,{src:e.avatar,alt:``,loading:`lazy`}):_(`span`,{className:`initial`,"aria-hidden":`true`,children:e.name.slice(0,1).toUpperCase()}),_(`span`,{className:`name`,children:e.name}),e.subscriberCountText?_(`span`,{className:`subscribers`,children:e.subscriberCountText}):void 0]},e.id)),e.games.map(e=>f(v,{className:`game-tile`,href:`/channel/${e.id}`,children:[e.boxArt?_(`img`,{className:`box-art`,src:e.boxArt,alt:``,loading:`lazy`}):_(`span`,{className:`box-art`,"aria-hidden":`true`}),_(`span`,{className:`name`,children:e.title})]},e.id)),e.posts.map(e=>_(k,{post:e,readMore:!1},e.id))]})})]})},L=({featured:e})=>{let t=E(e.id),n=S(e.viewCount,e.publishedText),r=fe(e.durationSeconds),i=se(e.id),[a,o]=c(!1),s=e.isUpcoming===!0?void 0:e.inlinePlayerParams??void 0,l=b(s),u=e.description?A(e.description,e.descriptionRuns):[];return f(`section`,{className:`featured`,"aria-label":`Featured video`,children:[f(v,{href:t,state:l,className:`featured-thumb`,tabIndex:-1,"aria-hidden":`true`,onPointerEnter:e=>{s||i.onPointerEnter(),e.pointerType===`mouse`&&o(!0)},onPointerLeave:()=>{s||i.onPointerLeave(),o(!1)},onPointerDown:s?void 0:i.onPointerDown,children:[e.thumbnail?_(ce,{src:e.thumbnail,srcSet:e.thumbnailSrcset,sizes:`(max-width: 768px) 100vw, 42.4rem`}):void 0,a&&s?_(D,{videoId:e.id,href:t,playerParams:s}):void 0,e.isLive?_(`span`,{className:`badge live`,children:`LIVE`}):r?f(`span`,{className:`badge`,children:[e.isMusic?_(x,{}):void 0,r]}):void 0]}),f(`div`,{className:`featured-text`,children:[_(`h2`,{className:`featured-title`,children:_(v,{href:t,state:l,onPointerEnter:s?void 0:i.onPointerEnter,onPointerLeave:s?void 0:i.onPointerLeave,onPointerDown:s?void 0:i.onPointerDown,children:e.title})}),n?_(`div`,{className:`featured-meta`,children:n}):void 0,u.length>0?f(h,{children:[_(`p`,{className:`featured-description`,children:_(O,{runs:u})}),_(v,{href:t,state:l,className:`featured-more`,onPointerEnter:s?void 0:i.onPointerEnter,onPointerLeave:s?void 0:i.onPointerLeave,onPointerDown:s?void 0:i.onPointerDown,children:`READ MORE`})]}):void 0]})]})},Ce=({home:e})=>f(`div`,{css:N,children:[e.featured?_(L,{featured:e.featured}):void 0,e.shelves.map((e,t)=>_(I,{shelf:e},`${t}:${e.title}`))]}),R=g`
361
+ > * {
362
+ padding: 2.4rem 0;
363
+ border-bottom: 1px solid var(--border-subtle);
364
+ }
365
+
366
+ > :first-of-type {
367
+ padding-top: 0;
368
+ }
369
+
370
+ > :last-child {
371
+ border-bottom: none;
372
+ }
373
+
374
+ h2 {
375
+ margin: 0;
376
+ font-size: 2rem;
377
+ font-weight: 700;
378
+ line-height: 2.8rem;
379
+ color: var(--text-primary);
380
+ }
381
+
382
+ .product-grid {
383
+ display: grid;
384
+ grid-template-columns: repeat(auto-fill, 20.8rem);
385
+ column-gap: 0.4rem;
386
+ row-gap: 2.4rem;
387
+ margin-top: 2rem;
388
+ }
389
+
390
+ .product-rail {
391
+ --rail-gap: 1.2rem;
392
+ --rail-arrow-top: 8.4rem;
393
+ margin-top: 2rem;
394
+ }
395
+
396
+ .product {
397
+ display: flex;
398
+ flex-direction: column;
399
+ width: 20.8rem;
400
+ font-size: 1.4rem;
401
+ line-height: 2rem;
402
+ color: var(--text-primary);
403
+ }
404
+
405
+ .product-image {
406
+ width: 20rem;
407
+ height: 20rem;
408
+ margin: 0.4rem;
409
+ object-fit: contain;
410
+ object-position: top;
411
+ }
412
+
413
+ .product-title {
414
+ margin-top: 1rem;
415
+ display: -webkit-box;
416
+ -webkit-line-clamp: 2;
417
+ -webkit-box-orient: vertical;
418
+ overflow: hidden;
419
+ }
420
+
421
+ .product-price {
422
+ margin-top: 0.6rem;
423
+ font-weight: 500;
424
+ }
425
+
426
+ .product-note {
427
+ font-weight: 400;
428
+ color: var(--text-secondary);
429
+ }
430
+
431
+ .product-merchant {
432
+ display: flex;
433
+ align-items: center;
434
+ gap: 0.4rem;
435
+ margin-top: 0.4rem;
436
+ font-size: 1.2rem;
437
+ line-height: 1.8rem;
438
+ color: var(--accent);
439
+ }
440
+ `,z=({product:e})=>f(`a`,{className:`product`,href:e.url,target:`_blank`,rel:`noreferrer noopener`,children:[e.thumbnail?_(`img`,{className:`product-image`,src:e.thumbnail,alt:``,loading:`lazy`}):_(`span`,{className:`product-image`}),_(`span`,{className:`product-title`,children:e.title}),e.price?f(`span`,{className:`product-price`,children:[e.price,e.priceNote?f(`span`,{className:`product-note`,children:[` `,e.priceNote]}):void 0]}):void 0,e.merchant?f(`span`,{className:`product-merchant`,children:[e.merchant,_(r,{size:14,strokeWidth:2,"aria-hidden":`true`})]}):void 0]}),we=({shelves:e})=>_(`div`,{css:R,children:e.map((e,t)=>f(`section`,{className:`store-shelf`,"aria-label":e.title,children:[_(`h2`,{children:e.title}),e.scrolls?_(`div`,{className:`product-rail`,children:_(T,{label:e.title,count:e.products.length,children:e.products.map((e,t)=>_(z,{product:e},`${t}:${e.url}`))})}):_(`div`,{className:`product-grid`,children:e.products.map((e,t)=>_(z,{product:e},`${t}:${e.url}`))})]},`${t}:${e.title}`))});u();var Te=p(`
441
+ query CommunityPosts($channelId: ID!, $cursor: String) {
442
+ communityPosts(channelId: $channelId, cursor: $cursor) {
443
+ items {
444
+ id
445
+ text
446
+ publishedText
447
+ voteCountText
448
+ commentCountText
449
+ commentCountLabel
450
+ attachedImage
451
+ author { id name avatar }
452
+ attachedVideo {
453
+ id
454
+ title
455
+ thumbnail
456
+ thumbnailSrcset
457
+ durationSeconds
458
+ viewCount
459
+ publishedText
460
+ channel { id name }
461
+ }
462
+ }
463
+ cursor
464
+ }
465
+ }
466
+ `),Ee=p(`
467
+ query ChannelView($id: ID!, $tab: ChannelTab, $sort: String, $filter: String, $query: String, $cursor: String) {
468
+ channel(id: $id, tab: $tab, sort: $sort, filter: $filter, query: $query, cursor: $cursor) {
469
+ channel {
470
+ id
471
+ name
472
+ avatar
473
+ handle
474
+ subscriberCountText
475
+ videoCountText
476
+ banner
477
+ description
478
+ isSubscribed
479
+ isOwnChannel
480
+ notificationLevel
481
+ isVerified
482
+ isVerifiedArtist
483
+ }
484
+ videos {
485
+ items {
486
+ id
487
+ title
488
+ thumbnail
489
+ thumbnailSrcset
490
+ animatedThumbnail
491
+ thumbnailBadge
492
+ durationSeconds
493
+ isMusic
494
+ viewCount
495
+ viewCountIcon
496
+ publishedText
497
+ metaDelimiter
498
+ isLive
499
+ isShort
500
+ shortsSequence
501
+ isUpcoming
502
+ isMembersOnly
503
+ badges
504
+ byline { text isVerified isVerifiedArtist }
505
+ }
506
+ playlists {
507
+ id
508
+ title
509
+ thumbnail
510
+ videoCountText
511
+ updatedText
512
+ channel { id name }
513
+ }
514
+ cursor
515
+ }
516
+ availableTabs
517
+ tab
518
+ sortOptions
519
+ appliedSort
520
+ sortMenu
521
+ filterOptions
522
+ appliedFilter
523
+ home {
524
+ featured {
525
+ id
526
+ title
527
+ description
528
+ descriptionRuns { text url videoId startSeconds browseId }
529
+ thumbnail
530
+ thumbnailSrcset
531
+ durationSeconds
532
+ isLive
533
+ isMusic
534
+ isUpcoming
535
+ inlinePlayerParams
536
+ viewCount
537
+ publishedText
538
+ }
539
+ shelves {
540
+ title
541
+ subtitle
542
+ url
543
+ expandable
544
+ uploads
545
+ videos {
546
+ id
547
+ title
548
+ thumbnail
549
+ thumbnailSrcset
550
+ animatedThumbnail
551
+ durationSeconds
552
+ isMusic
553
+ viewCount
554
+ viewCountIcon
555
+ publishedText
556
+ metaDelimiter
557
+ isLive
558
+ isShort
559
+ isUpcoming
560
+ isMembersOnly
561
+ badges
562
+ channel { id name avatar isVerified isVerifiedArtist }
563
+ byline { text isVerified isVerifiedArtist }
564
+ collaborators { id name avatar handle subscriberCountText isVerified isVerifiedArtist }
565
+ }
566
+ shorts {
567
+ id
568
+ title
569
+ thumbnail
570
+ viewCount
571
+ shortsSequence
572
+ }
573
+ playlists {
574
+ id
575
+ title
576
+ thumbnail
577
+ videoCountText
578
+ }
579
+ channels {
580
+ id
581
+ name
582
+ avatar
583
+ subscriberCountText
584
+ }
585
+ games {
586
+ id
587
+ title
588
+ boxArt
589
+ }
590
+ posts {
591
+ id
592
+ text
593
+ publishedText
594
+ voteCountText
595
+ commentCountText
596
+ commentCountLabel
597
+ attachedImage
598
+ author { id name avatar }
599
+ attachedVideo {
600
+ id
601
+ title
602
+ thumbnail
603
+ thumbnailSrcset
604
+ durationSeconds
605
+ viewCount
606
+ publishedText
607
+ channel { id name }
608
+ }
609
+ }
610
+ }
611
+ message
612
+ }
613
+ store {
614
+ title
615
+ scrolls
616
+ products { title url thumbnail price priceNote merchant }
617
+ }
618
+ posts {
619
+ items {
620
+ id
621
+ text
622
+ publishedText
623
+ voteCountText
624
+ commentCountText
625
+ commentCountLabel
626
+ attachedImage
627
+ author { id name avatar }
628
+ attachedVideo {
629
+ id
630
+ title
631
+ thumbnail
632
+ thumbnailSrcset
633
+ durationSeconds
634
+ viewCount
635
+ publishedText
636
+ channel { id name }
637
+ }
638
+ }
639
+ cursor
640
+ }
641
+ }
642
+ }
643
+ `),De={HOME:`Home`,VIDEOS:`Videos`,SHORTS:`Shorts`,LIVE:`Live`,RELEASES:`Releases`,PODCASTS:`Podcasts`,COURSES:`Courses`,SHOWS:`Shows`,PLAYLISTS:`Playlists`,COMMUNITY:`Posts`,STORE:`Store`,ABOUT:`About`,SEARCH:`Search`},B=e=>e===void 0||e===`VIDEOS`||e===`HOME`?`This channel has no videos.`:e===`SHORTS`?`This channel has no shorts.`:e===`LIVE`?`This channel has no live streams.`:`This channel has nothing under ${De[e]}.`,Oe=g`
644
+ /* youtube.com widens the channel column in steps of one 214px row card, up
645
+ to six of them, and centres it. Measured on youtube.com/@RickAstleyYT at
646
+ 1000 to 2560px wide, 2026-11-05. */
647
+ width: max(min(100% - 3.2rem, 64.2rem), min(128.4rem, round(down, 100% - 4.8rem, 21.4rem)));
648
+ margin: 0 auto;
649
+ padding: 2.4rem 0;
650
+
651
+ .banner {
652
+ display: block;
653
+ width: 100%;
654
+ aspect-ratio: 6.2 / 1;
655
+ border-radius: 1.6rem;
656
+ object-fit: cover;
657
+ background: var(--bg-elevated);
658
+ }
659
+
660
+ .header {
661
+ display: flex;
662
+ align-items: center;
663
+ gap: 2.4rem;
664
+ margin-top: 2.4rem;
665
+ }
666
+
667
+ .avatar {
668
+ flex: none;
669
+ width: 16rem;
670
+ height: 16rem;
671
+ border-radius: 50%;
672
+ overflow: hidden;
673
+ background: var(--bg-chip);
674
+ }
675
+
676
+ .avatar img {
677
+ display: block;
678
+ width: 100%;
679
+ height: 100%;
680
+ object-fit: cover;
681
+ }
682
+
683
+ .avatar.fallback {
684
+ display: flex;
685
+ align-items: center;
686
+ justify-content: center;
687
+ font-size: 6.4rem;
688
+ font-weight: 500;
689
+ color: var(--text-primary);
690
+ }
691
+
692
+ .info {
693
+ flex: 1;
694
+ min-width: 0;
695
+ }
696
+
697
+ .name {
698
+ font-size: 3.6rem;
699
+ font-weight: 700;
700
+ line-height: 5rem;
701
+ color: var(--text-primary);
702
+ }
703
+
704
+ .meta {
705
+ margin-top: 0.4rem;
706
+ font-size: 1.4rem;
707
+ line-height: 2rem;
708
+ color: var(--text-secondary);
709
+ }
710
+
711
+ .description {
712
+ display: flex;
713
+ max-width: min(60rem, 100%);
714
+ margin-top: 0.8rem;
715
+ padding: 0;
716
+ border: none;
717
+ background: none;
718
+ font: inherit;
719
+ font-size: 1.4rem;
720
+ line-height: 2rem;
721
+ color: var(--text-secondary);
722
+ text-align: left;
723
+ }
724
+
725
+ button.description {
726
+ cursor: pointer;
727
+ }
728
+
729
+ .description-text {
730
+ min-width: 0;
731
+ overflow: hidden;
732
+ text-overflow: ellipsis;
733
+ white-space: nowrap;
734
+ }
735
+
736
+ button.description .description-text {
737
+ text-overflow: clip;
738
+ mask-image: linear-gradient(to right, #000 calc(100% - 2.4rem), transparent);
739
+ }
740
+
741
+ .description .more,
742
+ .more-links {
743
+ flex: none;
744
+ margin-left: 0.4rem;
745
+ padding: 0;
746
+ border: none;
747
+ background: none;
748
+ font: inherit;
749
+ font-weight: 500;
750
+ color: var(--text-primary);
751
+ cursor: pointer;
752
+ }
753
+
754
+ .links {
755
+ display: flex;
756
+ align-items: center;
757
+ gap: 0.4rem;
758
+ margin-top: 0.8rem;
759
+ min-height: 2rem;
760
+ font-size: 1.4rem;
761
+ line-height: 2rem;
762
+ color: var(--accent);
763
+ }
764
+
765
+ .links-skeleton span {
766
+ display: block;
767
+ width: 18rem;
768
+ max-width: 100%;
769
+ height: 1.4rem;
770
+ border-radius: 0.4rem;
771
+ background: var(--bg-elevated);
772
+ animation: channel-skeleton-pulse 1.6s ease-in-out infinite;
773
+ }
774
+
775
+ .links a {
776
+ min-width: 0;
777
+ overflow: hidden;
778
+ color: var(--accent);
779
+ text-overflow: ellipsis;
780
+ white-space: nowrap;
781
+ }
782
+
783
+ .links .more-links {
784
+ margin-left: 0;
785
+ }
786
+
787
+ .subscribe-row {
788
+ display: flex;
789
+ flex-wrap: wrap;
790
+ align-items: center;
791
+ gap: 0.8rem;
792
+ margin-top: 1.2rem;
793
+ }
794
+
795
+ .owner-action {
796
+ display: inline-flex;
797
+ align-items: center;
798
+ height: 3.6rem;
799
+ padding: 0 1.6rem;
800
+ border-radius: 1.8rem;
801
+ background: var(--bg-chip);
802
+ color: var(--text-primary);
803
+ font-size: 1.4rem;
804
+ font-weight: 500;
805
+ text-decoration: none;
806
+ white-space: nowrap;
807
+ transition: background 0.15s ease;
808
+ }
809
+
810
+ .owner-action:hover {
811
+ background: var(--bg-chip-hover);
812
+ }
813
+
814
+ /* The rule is an inset shadow rather than a border so the active tab's
815
+ underline can cover it inside the strip, which scrolls on a phone. */
816
+ .tabs {
817
+ display: flex;
818
+ align-items: center;
819
+ gap: 2.4rem;
820
+ min-height: 4.8rem;
821
+ margin-top: 2.4rem;
822
+ overflow-x: auto;
823
+ scrollbar-width: none;
824
+ box-shadow: inset 0 -1px var(--border-subtle);
825
+ }
826
+
827
+ .tab-skeleton {
828
+ flex: none;
829
+ width: 5.6rem;
830
+ height: 1.6rem;
831
+ border-radius: 0.4rem;
832
+ background: var(--bg-elevated);
833
+ animation: channel-skeleton-pulse 1.6s ease-in-out infinite;
834
+ }
835
+
836
+ .tabs::-webkit-scrollbar {
837
+ display: none;
838
+ }
839
+
840
+ .tab {
841
+ flex: none;
842
+ display: inline-flex;
843
+ align-items: center;
844
+ height: 4.8rem;
845
+ padding: 0;
846
+ border: none;
847
+ border-bottom: 0.25rem solid transparent;
848
+ background: transparent;
849
+ color: var(--text-secondary);
850
+ font-size: 1.5rem;
851
+ font-weight: 500;
852
+ cursor: pointer;
853
+ transition: color 0.15s ease;
854
+ }
855
+
856
+ .tab:hover {
857
+ color: var(--text-primary);
858
+ }
859
+
860
+ .tab.active {
861
+ color: var(--text-primary);
862
+ border-bottom-color: var(--text-primary);
863
+ }
864
+
865
+ .tab-icon {
866
+ display: flex;
867
+ padding: 1rem 0;
868
+ }
869
+
870
+ .tab-search {
871
+ flex: none;
872
+ display: flex;
873
+ align-items: center;
874
+ gap: 0.8rem;
875
+ color: var(--text-secondary);
876
+ }
877
+
878
+ .tab-search input {
879
+ width: 22rem;
880
+ padding: 0.4rem 0;
881
+ border: none;
882
+ border-bottom: 1px solid var(--text-primary);
883
+ background: transparent;
884
+ color: var(--text-primary);
885
+ font: inherit;
886
+ font-size: 1.4rem;
887
+ outline: none;
888
+ }
889
+
890
+ /* Only rendered when the tab offers more than one ordering, so it never shows
891
+ a single dead option next to itself. The labels are upstream's own and are
892
+ already localized. */
893
+ .sorts {
894
+ display: flex;
895
+ flex-wrap: wrap;
896
+ gap: 0.8rem;
897
+ padding: 1.6rem 0 0;
898
+ }
899
+
900
+ .sort {
901
+ height: 3.2rem;
902
+ padding: 0 1.2rem;
903
+ border: none;
904
+ border-radius: 0.8rem;
905
+ background: var(--bg-chip);
906
+ color: var(--text-primary);
907
+ font-size: 1.4rem;
908
+ font-weight: 500;
909
+ cursor: pointer;
910
+ transition: background 0.15s ease;
911
+ }
912
+
913
+ .sort:hover {
914
+ background: var(--bg-chip-hover);
915
+ }
916
+
917
+ .sort.active {
918
+ background: var(--bg-inverse);
919
+ color: var(--text-inverse);
920
+ }
921
+
922
+ .sort.menu {
923
+ display: inline-flex;
924
+ align-items: center;
925
+ gap: 0.6rem;
926
+ }
927
+
928
+ .sort-skeleton {
929
+ width: 7.2rem;
930
+ background: var(--bg-elevated);
931
+ pointer-events: none;
932
+ animation: channel-skeleton-pulse 1.6s ease-in-out infinite;
933
+ }
934
+
935
+ .videos {
936
+ margin-top: 2.4rem;
937
+ }
938
+
939
+ /* Five cards across a 1284px channel column (four at 1070px), matching
940
+ youtube.com's Playlists grid density while collapsing cleanly on phones. */
941
+ .playlist-grid {
942
+ display: grid;
943
+ grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr));
944
+ column-gap: 1.6rem;
945
+ row-gap: 2.4rem;
946
+ }
947
+
948
+ /* A single readable column rather than a grid: a post is a body of text, and
949
+ the video grid's card width would set the measure far too wide. */
950
+ .posts {
951
+ display: flex;
952
+ flex-direction: column;
953
+ gap: 1.6rem;
954
+ max-width: 68rem;
955
+ }
956
+
957
+ .skeleton-pulse {
958
+ animation: channel-skeleton-pulse 1.6s ease-in-out infinite;
959
+ }
960
+
961
+ .skeleton-slot {
962
+ display: flex;
963
+ align-items: center;
964
+ height: 2rem;
965
+ }
966
+
967
+ .skeleton-slot span {
968
+ display: block;
969
+ height: 1.4rem;
970
+ border-radius: 0.4rem;
971
+ background: var(--bg-elevated);
972
+ }
973
+
974
+ .skeleton-name {
975
+ height: 5rem;
976
+ }
977
+
978
+ .skeleton-name span {
979
+ width: 24rem;
980
+ max-width: 70%;
981
+ height: 3.4rem;
982
+ border-radius: 0.6rem;
983
+ }
984
+
985
+ .skeleton-meta {
986
+ margin-top: 0.4rem;
987
+ }
988
+
989
+ .skeleton-meta span {
990
+ width: 28rem;
991
+ max-width: 85%;
992
+ }
993
+
994
+ .skeleton-desc {
995
+ margin-top: 0.8rem;
996
+ }
997
+
998
+ .skeleton-desc span {
999
+ width: 42rem;
1000
+ max-width: 100%;
1001
+ }
1002
+
1003
+ .skeleton-links {
1004
+ margin-top: 0.8rem;
1005
+ }
1006
+
1007
+ .skeleton-links span {
1008
+ width: 18rem;
1009
+ max-width: 60%;
1010
+ }
1011
+
1012
+ .skeleton-button {
1013
+ display: block;
1014
+ width: 10.6rem;
1015
+ height: 3.6rem;
1016
+ border-radius: 1.8rem;
1017
+ background: var(--bg-elevated);
1018
+ }
1019
+
1020
+ .post-skeleton {
1021
+ padding: 1.6rem;
1022
+ border: 1px solid var(--border-subtle);
1023
+ border-radius: 1.2rem;
1024
+ animation: channel-skeleton-pulse 1.6s ease-in-out infinite;
1025
+ }
1026
+
1027
+ .post-skeleton-head {
1028
+ display: flex;
1029
+ align-items: center;
1030
+ gap: 0.8rem;
1031
+ }
1032
+
1033
+ .post-skeleton-avatar {
1034
+ width: 2.4rem;
1035
+ height: 2.4rem;
1036
+ border-radius: 50%;
1037
+ background: var(--bg-elevated);
1038
+ }
1039
+
1040
+ .post-skeleton-bar {
1041
+ height: 1.4rem;
1042
+ border-radius: 0.4rem;
1043
+ background: var(--bg-elevated);
1044
+ }
1045
+
1046
+ .post-skeleton-body {
1047
+ display: flex;
1048
+ flex-direction: column;
1049
+ gap: 0.8rem;
1050
+ margin-top: 1.2rem;
1051
+ }
1052
+
1053
+ .post-skeleton-footer {
1054
+ width: 12rem;
1055
+ height: 2rem;
1056
+ margin-top: 1.4rem;
1057
+ border-radius: 0.4rem;
1058
+ background: var(--bg-elevated);
1059
+ }
1060
+
1061
+ .playlist-skeleton {
1062
+ min-width: 0;
1063
+ animation: channel-skeleton-pulse 1.6s ease-in-out infinite;
1064
+ }
1065
+
1066
+ .playlist-skeleton-cover {
1067
+ margin-top: 0.6rem;
1068
+ aspect-ratio: 16 / 9;
1069
+ border-radius: 1.2rem;
1070
+ background: var(--bg-elevated);
1071
+ }
1072
+
1073
+ .playlist-skeleton-bar {
1074
+ height: 1.6rem;
1075
+ margin-top: 1.2rem;
1076
+ border-radius: 0.4rem;
1077
+ background: var(--bg-elevated);
1078
+ }
1079
+
1080
+ .playlist-skeleton-bar.short {
1081
+ width: 60%;
1082
+ margin-top: 0.8rem;
1083
+ }
1084
+
1085
+ @keyframes channel-skeleton-pulse {
1086
+ 0%,
1087
+ 100% {
1088
+ opacity: 1;
1089
+ }
1090
+
1091
+ 50% {
1092
+ opacity: 0.55;
1093
+ }
1094
+ }
1095
+
1096
+ .status {
1097
+ margin-top: 2.4rem;
1098
+ color: var(--text-secondary);
1099
+ }
1100
+
1101
+ /* youtube.com's 404 page, measured at 1280 px on 2026-11-10 */
1102
+ .not-found {
1103
+ margin-top: 16rem;
1104
+ text-align: center;
1105
+ font-size: 1.6rem;
1106
+ line-height: 1.8rem;
1107
+ color: var(--text-primary);
1108
+ }
1109
+
1110
+ @media (max-width: 768px) {
1111
+ .header {
1112
+ flex-direction: column;
1113
+ align-items: center;
1114
+ text-align: center;
1115
+ }
1116
+
1117
+ .avatar {
1118
+ width: 9.6rem;
1119
+ height: 9.6rem;
1120
+ }
1121
+
1122
+ .avatar.fallback {
1123
+ font-size: 4rem;
1124
+ }
1125
+
1126
+ /* full width rather than shrink-wrapped, or the one-line description
1127
+ would size it to the whole unwrapped text */
1128
+ .info {
1129
+ width: 100%;
1130
+ }
1131
+
1132
+ .description,
1133
+ .links,
1134
+ .subscribe-row {
1135
+ justify-content: center;
1136
+ }
1137
+
1138
+ .description {
1139
+ margin-inline: auto;
1140
+ }
1141
+
1142
+ .name {
1143
+ font-size: 2.4rem;
1144
+ line-height: 3.2rem;
1145
+ }
1146
+
1147
+ .skeleton-slot {
1148
+ justify-content: center;
1149
+ }
1150
+
1151
+ .skeleton-name {
1152
+ height: 3.2rem;
1153
+ }
1154
+
1155
+ .skeleton-name span {
1156
+ width: 18rem;
1157
+ height: 2.4rem;
1158
+ }
1159
+ }
1160
+ `,ke=()=>f(h,{children:[_(`div`,{className:`banner skeleton-pulse`,"aria-hidden":`true`}),f(`header`,{className:`header skeleton-pulse`,"aria-hidden":`true`,children:[_(`div`,{className:`avatar`}),f(`div`,{className:`info`,children:[_(`div`,{className:`skeleton-slot skeleton-name`,children:_(`span`,{})}),_(`div`,{className:`skeleton-slot skeleton-meta`,children:_(`span`,{})}),_(`div`,{className:`skeleton-slot skeleton-desc`,children:_(`span`,{})}),_(`div`,{className:`skeleton-slot skeleton-links`,children:_(`span`,{})}),_(`div`,{className:`subscribe-row`,children:_(`span`,{className:`skeleton-button`})})]})]})]}),Ae=()=>f(`div`,{className:`post-skeleton`,"aria-hidden":`true`,children:[f(`div`,{className:`post-skeleton-head`,children:[_(`div`,{className:`post-skeleton-avatar`}),_(`div`,{className:`post-skeleton-bar`,style:{width:`16rem`}})]}),f(`div`,{className:`post-skeleton-body`,children:[_(`div`,{className:`post-skeleton-bar`,style:{width:`92%`}}),_(`div`,{className:`post-skeleton-bar`,style:{width:`78%`}}),_(`div`,{className:`post-skeleton-bar`,style:{width:`54%`}})]}),_(`div`,{className:`post-skeleton-footer`})]}),je=()=>f(`div`,{className:`playlist-skeleton`,"aria-hidden":`true`,children:[_(`div`,{className:`playlist-skeleton-cover`}),_(`div`,{className:`playlist-skeleton-bar`}),_(`div`,{className:`playlist-skeleton-bar short`})]}),Me=new Set([`VIDEOS`,`SHORTS`,`LIVE`,`PLAYLISTS`]),Ne=new Set([`PLAYLISTS`,`SHOWS`,`RELEASES`,`PODCASTS`,`COURSES`]),Pe=e=>e?e.replace(/^@/,``).trim().toLowerCase():void 0,V=({id:r,base:s,tab:u})=>{let{signedIn:p,handle:g}=ne(),y=te(),b=new URLSearchParams(y),[x,S]=ee(),C=u===`ABOUT`,T=C?void 0:u,se=b.get(`sort`)??void 0,ce=b.get(`filter`)??void 0,E=b.get(`query`)??void 0,D=`${r}|${T??``}|${se??``}|${ce??``}|${E??``}`,[fe,pe]=c({id:D,pages:[]}),O=fe.id===D?fe.pages:[],[{data:A,error:j,fetching:M},N]=m({query:Ee,variables:{id:r,tab:T,sort:se,filter:ce,query:E,cursor:O[O.length-1]?.cursor}}),P=d(void 0);A&&(P.current={key:D,data:A});let F=A??(O.length>0&&P.current?.key===D?P.current.data:void 0),I=F?.channel.channel,L=j?.graphQLErrors.find(t=>t.message.startsWith(e)),R=j?.graphQLErrors.some(e=>e.message===t)===!0,z=F?.channel.videos,{items:V,cursor:Fe}=le({pages:z?[...O,z]:O,key:e=>e.id}),{items:Ie}=le({pages:(z?[...O,z]:O).map(e=>({items:e.playlists,cursor:e.cursor})),key:e=>e.id});ge(I?.name??`Channel`);let Le=I?.handle?I.handle.startsWith(`@`)?I.handle:`@${I.handle}`:void 0,Re=Pe(g),ze=I?.isOwnChannel===!0||p&&!!Re&&Re===Pe(I?.handle),Be=[Le,I?.subscriberCountText,I?.videoCountText].filter(e=>e!=null&&e.length>0),Ve=Be.length>0?Be.join(` • `):void 0,He=I?Le?`/${Le}`:`/channel/${I.id}`:s,Ue=(e,t)=>{let n=new URLSearchParams(y);n.get(e)===t?n.delete(e):n.set(e,t);let r=n.toString();S(r?`${x}?${r}`:x)},H=F?.channel.tab,U=H??T,We=F?.channel.availableTabs.includes(`ABOUT`)===!0,[{data:Ge,error:Ke}]=m({query:be,variables:{id:r},pause:!We}),qe=Ge?.channelAbout??void 0,[W,...Je]=qe?.links??[],Ye=We&&Ge===void 0&&!Ke,Xe=F?.channel.availableTabs.includes(`SEARCH`)===!0,[Ze,Qe]=c(!1),$e=d(null);a(()=>{Ze&&$e.current?.focus()},[Ze]);let et=e=>{e.preventDefault();let t=$e.current?.value.trim();t&&(Qe(!1),S(`${He}/${he.SEARCH}?${new URLSearchParams({query:t})}`))},[tt,nt]=c(!1),rt=()=>nt(!0),it=i(()=>{nt(!1),C&&S(s,{replace:!0})},[C,s,S]),at=F?.channel.posts??void 0,[G,ot]=c({id:D,pages:[]}),K=G.id===D?G.pages:[],st=G.id===D?G.cursor:void 0,[{data:q,error:J,fetching:Y},ct]=m({query:Te,variables:{channelId:r,cursor:st},pause:H!==`COMMUNITY`||!st}),X=st&&q?.communityPosts&&q.communityPosts!==K[K.length-1]?q.communityPosts:void 0,{items:Z,cursor:lt}=le({pages:[...at?[at]:[],...K,...X?[X]:[]],key:e=>e.id}),ut=()=>{if(!lt||Y||M)return;let e=X?[...K,X]:K;ot({id:D,pages:e,cursor:lt})},dt=()=>{z?.cursor&&!M&&pe({id:D,pages:O[O.length-1]===z?O:[...O,z]})},ft=!I&&M&&!j,pt=ue(`hideShorts`),mt=T!==void 0&&Me.has(T),ht=U!==void 0&&Ne.has(U),Q=pt?V.filter(e=>!e.isShort):V,$=F?.channel.home?{...F.channel.home,shelves:Se(F.channel.home.shelves,pt)}:void 0;return f(`main`,{css:Oe,children:[I?.banner?_(`img`,{className:`banner`,src:I.banner,alt:``}):void 0,I?f(`header`,{className:`header`,children:[_(`div`,{className:I.avatar?`avatar`:`avatar fallback`,children:I.avatar?_(`img`,{src:I.avatar,alt:``}):I.name.slice(0,1).toUpperCase()}),f(`div`,{className:`info`,children:[f(`h1`,{className:`name`,children:[I.name,_(de,{channel:I,size:20})]}),Ve?_(`p`,{className:`meta`,children:Ve}):void 0,We?f(`button`,{type:`button`,className:`description`,onClick:rt,children:[_(`span`,{className:`description-text`,children:I.description??`More about this channel`}),_(`span`,{className:`more`,children:`...more`})]}):I.description?_(`p`,{className:`description`,children:_(`span`,{className:`description-text`,children:I.description})}):void 0,W?f(`p`,{className:`links`,children:[_(l,{size:14,strokeWidth:2,"aria-hidden":`true`}),_(`a`,{href:W.url,target:`_blank`,rel:`noreferrer noopener`,children:W.displayUrl??W.title}),Je.length>0?f(`button`,{type:`button`,className:`more-links`,onClick:rt,children:[`and `,Je.length,` more `,Je.length===1?`link`:`links`]}):void 0]}):Ye?_(`p`,{className:`links links-skeleton`,"aria-hidden":`true`,children:_(`span`,{})}):void 0,_(`div`,{className:`subscribe-row`,children:ze?f(h,{children:[_(`a`,{className:`owner-action`,href:`https://studio.youtube.com/channel/${encodeURIComponent(I.id)}/editing`,target:`_blank`,rel:`noreferrer noopener`,children:`Customize channel`}),_(`a`,{className:`owner-action`,href:`https://studio.youtube.com/channel/${encodeURIComponent(I.id)}/videos`,target:`_blank`,rel:`noreferrer noopener`,children:`Manage videos`})]}):f(h,{children:[_(ae,{channelId:I.id,subscribed:I.isSubscribed,notificationLevel:I.notificationLevel}),_(_e,{channel:{id:I.id,name:I.name,avatar:I.avatar??void 0}})]})})]})]}):ft?_(ke,{}):void 0,I&&(tt||C)?_(xe,{name:I.name,about:qe,description:I.description,onClose:it}):void 0,R?f(`div`,{className:`not-found`,children:[_(`p`,{children:`This page isn't available. Sorry about that.`}),_(`p`,{children:`Try searching for something else.`})]}):void 0,L?_(`p`,{className:`status`,children:L.message.slice(e.length)}):void 0,j&&!R&&!L&&!M&&O.length===0?_(w,{error:j,reexecute:N}):void 0,!R&&!L&&(!j||F)?f(`nav`,{className:`tabs`,"aria-label":`Channel sections`,children:[!F&&M&&!j?Array.from({length:6},(e,t)=>_(`span`,{className:`tab-skeleton`,"aria-hidden":`true`},t)):void 0,(F?.channel.availableTabs??[]).filter(e=>e!==`ABOUT`&&e!==`SEARCH`&&(!pt||e!==`SHORTS`)).map(e=>{let t=e===F?.channel.tab;return _(v,{href:`${He}/${he[e]}`,className:t?`tab active`:`tab`,"aria-current":t?`page`:void 0,children:De[e]},e)}),Xe&&(Ze||E!==void 0)?f(`form`,{className:`tab-search`,onSubmit:et,children:[_(n,{size:20,strokeWidth:1.5,"aria-hidden":`true`}),_(`input`,{ref:$e,type:`search`,placeholder:`Search`,"aria-label":`Search this channel`,defaultValue:E,onBlur:e=>{e.currentTarget.value||Qe(!1)}},E)]}):Xe?_(`button`,{type:`button`,className:`tab tab-icon`,"aria-label":`Search`,onClick:()=>Qe(!0),children:_(n,{size:20,strokeWidth:1.5})}):void 0]}):void 0,(F?.channel.sortOptions.length??0)>1||(F?.channel.filterOptions.length??0)>0?f(`div`,{className:`sorts`,children:[F?.channel.sortMenu?_(re,{label:`Sort by`,align:`start`,trigger:f(`button`,{type:`button`,className:`sort menu`,children:[F.channel.appliedSort??F.channel.sortOptions[0],_(o,{size:20,strokeWidth:1.5})]}),children:F.channel.sortOptions.map(e=>_(oe,{label:e,onSelect:()=>{e!==(F.channel.appliedSort??F.channel.sortOptions[0])&&Ue(`sort`,e)}},e))}):F?.channel.sortOptions.map(e=>{let t=e===(F.channel.appliedSort??F.channel.sortOptions[0]);return _(`button`,{type:`button`,className:t?`sort active`:`sort`,"aria-pressed":t,onClick:()=>Ue(`sort`,e),children:e},e)}),F?.channel.filterOptions.map(e=>{let t=e===F.channel.appliedFilter;return _(`button`,{type:`button`,className:t?`sort active`:`sort`,"aria-pressed":t,onClick:()=>Ue(`filter`,e),children:e},e)})]}):!F&&M&&!j&&mt?f(`div`,{className:`sorts`,"aria-hidden":`true`,children:[_(`span`,{className:`sort sort-skeleton`}),_(`span`,{className:`sort sort-skeleton`}),_(`span`,{className:`sort sort-skeleton`})]}):void 0,U===`COMMUNITY`?f(`div`,{className:`videos`,children:[f(`div`,{className:`posts`,children:[Z.map(e=>_(k,{post:e},e.id)),M&&Z.length===0&&!j||Y?Array.from({length:Z.length===0?3:1},(e,t)=>_(Ae,{},`post-skeleton-${t}`)):void 0]}),J&&!Y?_(w,{error:J,reexecute:ct}):F&&!M&&!Y&&!j&&!J&&Z.length===0?_(`p`,{className:`status`,children:`This channel has no posts.`}):void 0,_(ie,{onVisible:ut,disabled:M||Y||!!J||!lt})]}):H===`STORE`&&F?.channel.store?f(`div`,{className:`videos`,children:[_(we,{shelves:F.channel.store}),F.channel.store.length===0?_(`p`,{className:`status`,children:B(`STORE`)}):void 0]}):H===`HOME`&&$?f(`div`,{className:`videos`,children:[_(Ce,{home:$}),!$.featured&&$.shelves.length===0?_(`p`,{className:`status`,children:$.message??B(`HOME`)}):void 0]}):f(h,{children:[f(`div`,{className:`videos`,children:[U===`SHORTS`?_(ye,{shorts:Q,fetching:M&&!j}):Q.length>0||M&&!j&&!ht?_(me,{videos:Q,fetching:M&&!j&&!ht&&Q.length===0,variant:`channel`}):void 0,Ie.length>0?_(`div`,{className:`playlist-grid`,children:Ie.map(e=>_(ve,{id:e.id,title:e.title,thumbnail:e.thumbnail,videoCountText:e.videoCountText,updatedText:e.updatedText,channelName:H===`SHOWS`?e.channel?.name:void 0},e.id))}):M&&!j&&ht&&Q.length===0?_(`div`,{className:`playlist-grid`,"aria-hidden":`true`,children:Array.from({length:10},(e,t)=>_(je,{},t))}):void 0,F&&!M&&!j&&Q.length===0&&Ie.length===0?_(`p`,{className:`status`,children:B(T)}):void 0]}),M&&Q.length>0?_(`p`,{className:`status`,children:`Loading more…`}):void 0,j&&!M&&O.length>0?_(w,{error:j,reexecute:N}):void 0,_(ie,{onVisible:dt,disabled:M||!!j||!Fe})]})]})};export{V as ChannelPage,V as default};