PageSourceSearch

https://www.rare.co.uk/_next/static/chunks/3337-599823ee1955def3.js

js rare.co.uk collected 2026-10-02 03:20:39 UTC 10,625 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3337],{3337:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>g});var a=l(7876),r=l(4232),o=l(5062),s=l.n(o),i=l(5039),n=l.n(i),c=l(4568),u=l.n(c),d=l(926),p=l.n(d),h=l(2396),f=l(5220),v=l(264),m=l(331),_=l(6097),y=l.n(_);let{Fm:w,t6:b}=m,x=e=>{let{videoId:t,videoTitle:l,videoService:o,channelName:s,videoFile:i,videoFileAD:c,videoStart:d="0",tracks:m=[],autoplay:_=!1,light:w=!1,autoFocusVideo:x=!1,className:g}=e,[C,k]=(0,r.useState)(!1),[j,N]=(0,f.eY)(!w),[S,I,$]=(0,f.eY)(_),[P,T]=(0,r.useState)(.8),[D,E]=(0,r.useState)(.8),[L,F,V]=(0,f.eY)(!1),[M,R]=(0,r.useState)(!0),[A,O]=(0,r.useState)(0),[Y,K]=(0,r.useState)(0),[W,B]=(0,r.useState)(0),[U,X]=(0,r.useState)(!1),[q,H]=(0,r.useState)(!1),[Z,G]=(0,r.useState)([]),[J,Q]=(0,r.useState)(),[z,ee]=(0,r.useState)(),[et,el]=(0,r.useState)(!!m.length&&"file"===o),[ea,er]=(0,f.eY)(!1),[eo]=(0,r.useState)("file"===o&&c),[es,ei]=(0,f.eY)(!1),[en,ec]=(0,f.eY)(!1),eu=(0,r.useRef)(),ed=(0,r.useRef)(),ep=(0,r.useRef)(),eh=(0,r.useRef)(),ef=(0,r.useRef)(),ev=(0,f.$f)("videoPlayerLabel",{videoTitle:l}),em=(0,f.$f)("videoCurrentTime"),e_=(0,f.$f)("videoPlayingVideo",{videoTitle:l}),ey=(0,f.$f)("play"),ew=(0,f.$f)("pause"),eb=(0,f.$f)("videoMuteVideo",{videoTitle:l}),ex=(0,f.$f)("mute"),eg=(0,f.$f)("unMute"),eC=(0,f.$f)("videoVolumeLevel"),ek=(0,f.$f)("videoVolumeValue",{volume:100*P}),ej=(0,f.$f)("live"),eN=(0,f.$f)("showCloseCaptions"),eS=(0,f.$f)("hideCloseCaptions"),eI=(0,f.$f)("showAudioDescription"),e$=(0,f.$f)("hideAudioDescription"),eP=(0,f.$f)("showFullScreen"),eT=(0,f.$f)("closeFullScreen"),eD=(0,f.$f)("playerConsentText"),eE="https://localhost:3000",{cookieConsent:eL}=(0,r.useContext)(v.A),{Analytics:eF,Advertising:eV}=eL,{url:eM,videoEl:eR}=(0,r.useMemo)(()=>{switch(o){case"file":return{url:i};case"youtube":return{url:"https://www.youtube.com/watch?v=".concat(t)};case"twitch-live":return{url:"https://www.twitch.tv/".concat(s)};case"twitch-vod":return{url:"https://www.twitch.tv/videos/".concat(t)};case"twitch-clip":return{videoEl:(0,a.jsx)("iframe",{src:"https://clips.twitch.tv/embed?clip=".concat(t,"&parent=").concat(eE.replace("https://","")),className:y().twitchClipIframe,height:"100%",width:"100%",frameBorder:"0",scrolling:"no",title:ev,allowFullScreen:!0})};default:return{url:null,videoEl:null}}},[o,s,ev,i,t]),[eA,eO]=(0,r.useState)(eM),eY=(0,r.useCallback)(()=>{I()},[I]),eK=(0,r.useCallback)(()=>{p().isEnabled&&ed.current&&(ec(),p().toggle(ed.current.wrapper.parentElement))},[ec]),eW=(0,r.useCallback)(()=>{F(),0===P?(T(D),ef.current.value=D):(E(P),T(0),ef.current.value=0)},[D,F,P]),eB=(0,r.useCallback)(()=>{if($(!0),U&&(K(0),X(!1)),"youtube"===o){let e=ed.current.getInternalPlayer();e&&(e.addEventListener("onApiChange",()=>{e.getOption("captions","tracklist").length&&el(!0)}),e.loadModule("captions"))}},[U,$,o]),eU=(0,r.useCallback)(()=>{$(!1)},[$]),eX=(0,r.useCallback)(()=>{if(["youtube","twitch-live","twitch-vod"].includes(o))return;let e=ed.current.getInternalPlayer();e&&"file"===o&&e.textTracks.length&&!ea&&(e.textTracks[0].mode="hidden")},[ea,o]),eq=(0,r.useCallback)(e=>{let t=parseFloat(e.currentTarget.value);T(t),V(0===t)},[V]),eH=(0,r.useCallback)(()=>{K(A),$(!1),X(!0),w&&(ed.current.showPreview(),N())},[A,w,$,N]),eZ=(0,r.useCallback)(()=>{N()},[N]),eG=(0,r.useCallback)(e=>{let{playedSeconds:t}=e;q||(B(Math.ceil(t)),K(Math.ceil(t)),ep.current.value=Math.ceil(t))},[q]),eJ=(0,f._6)(()=>{let e=Math.round(ep.current.value);B(e),K(e),ed.current.seekTo(e,"seconds"),H(!1)},100),eQ=(0,r.useCallback)(()=>{H(!0),eJ()},[eJ]),ez=(0,r.useCallback)(e=>{if(e===1/0)return void R(!1);O(e)},[]),e0=(0,r.useCallback)(e=>{e.preventDefault(),er()},[er]),e1=(0,r.useCallback)(e=>{if(e.preventDefault(),ei(),er(!1),eA===i){eO(c),G([z]);return}eO(i),G([J])},[eA,ei,i,c,z,J,er]),e3=(0,r.useCallback)(e=>{e.keyCode===b&&$(!1)},[$]),e2=(0,r.useCallback)(()=>{B(Y)},[Y]),e5=(0,r.useCallback)(e=>{let t=m.filter(t=>"en"===t.srcLang&&(!0===e&&t.id.endsWith("-ad")||!e));if(t.length){let[e]=t,l=e.src.split("/");return e.src="/api/getCaption/".concat(l[l.length-1]),e}return null},[m]);(0,r.useEffect)(()=>{k(!0);let e=e5(!1);if(e&&(Q(e),G([e])),"file"===o&&c){let e=e5(!0);e&&ee(e)}},[e5,c,o]),(0,r.useEffect)(()=>
1{if(!et||!ed.current||["twitch-live","twitch-vod"].includes(o))return;let e=ed.current.getInternalPlayer();if(e){if("file"===o&&e.textTracks.length)return void(ea?e.textTracks[0].mode="showing":e.textTracks[0].mode="hidden");if("youtube"===o)return void(ea?e.setOption("captions","track",{languageCode:"en"}):e.setOption("captions","track",{}))}},[ea,et,o]),(0,r.useEffect)(()=>{eu.current&&x&&eu.current.focus()},[x]);let e6=(0,f.a7)(Y),e4=(0,f.a7)(A),e9=(0,f.xf)(W),e7=(0,f.xf)(A),e8=(0,f.$f)("videoProgressLabel",{elapsedTime:e9,duration:e7}),te=(0,f.$f)("videoProgressTimerLabel",{elapsedTime:e9,duration:e7}),tt=(0,f.$f)("videoTimeLabel",{elapsedTime:e9}),tl=n()({[y().videoWrapper]:!0}),ta=n()(y().videoPlayer,g);return eM||eR?(0,a.jsx)("section",{ref:eu,className:ta,"aria-label":ev,children:(0,a.jsxs)("div",{className:tl,children:[!eM&&eR,!!eM&&C&&("youtube"===o&&eF&&eV||"youtube"!==o)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u(),{ref:ed,url:eA,className:y().player,height:"100%",width:"100%",controls:!1,playing:S,volume:P,muted:L,progressInterval:1e3,light:w,onClickPreview:eZ,playIcon:(0,a.jsx)(h.AY,{}),config:{youtube:{playerVars:{showinfo:0,rel:0,playsinline:1,modestbranding:1,start:d},onUnstarted:()=>{eh.current.focus()},embedOptions:{host:"https://www.youtube-nocookie.com"}},twitch:{options:{channel:s,video:t,width:"100%",height:"100%",time:d,parent:eE.replace("https://",""),controls:!1}},file:{forceVideo:!0,tracks:Z}},onPlay:eB,onPause:eU,onReady:eX,onEnded:eH,onProgress:eG,onDuration:ez,onError:e=>{console.error("Video Player Error",e)}}),j&&(0,a.jsx)("div",{className:y().playerControls,children:(0,a.jsxs)("div",{className:y().playerControlsContainer,children:[(0,a.jsxs)("div",{className:y().playerControlsLeft,children:[(0,a.jsx)("button",{ref:eh,onClick:eY,"aria-label":e_,title:S?ew:ey,children:S?(0,a.jsx)(h._Z,{className:y().playIcon}):(0,a.jsx)(h.Dq,{className:y().playIcon})}),M&&(0,a.jsxs)("div",{className:y().duration,tabIndex:"0","aria-label":e8,onKeyDown:e3,onFocus:e2,role:"timer",children:[(0,a.jsx)("span",{className:"sr-only",children:te}),(0,a.jsx)("span",{"aria-hidden":!0,children:e6}),(0,a.jsx)("span",{"aria-hidden":!0,children:" / "}),(0,a.jsx)("span",{"aria-hidden":!0,children:e4})]}),!M&&(0,a.jsx)("div",{className:y().duration,tabIndex:"0","aria-label":ej,onKeyDown:e3,role:"button",children:(0,a.jsx)("span",{role:"presentation",children:ej})})]}),M&&(0,a.jsxs)("div",{className:y().progressContainer,children:[(0,a.jsx)("progress",{className:y().progress,value:Y,max:A,"aria-hidden":!0}),(0,a.jsx)("input",{ref:ep,className:y().progressBarScrubber,type:"range",step:"any",defaultValue:Y,min:"0",max:A,onChange:eQ,onKeyDown:e3,onFocus:e2,"aria-label":em,"aria-valuenow":W,"aria-valuetext":e9,"aria-valuemin":"0","aria-valuemax":A,title:tt})]}),(0,a.jsxs)("div",{className:y().playerControlsRight,children:[(0,a.jsx)("button",{onClick:eW,className:y().muteControl,"aria-label":eb,title:L?eg:ex,children:L?(0,a.jsx)(h.qT,{className:y().muteIcon}):(0,a.jsx)(h.gC,{className:y().muteIcon})}),(0,a.jsx)("input",{ref:ef,className:y().volumeLevel,type:"range",step:"0.05",defaultValue:P,min:0,max:1,onChange:eq,onKeyDown:e3,"aria-label":eC,"aria-valuetext":ek,title:ek}),eo&&(0,a.jsx)("button",{onClick:e1,"aria-label":eI,title:es?e$:eI,children:es?(0,a.jsx)(h.fv,{className:y().audioDescriptionIcon}):(0,a.jsx)(h.Pr,{className:y().audioDescriptionIcon})}),et&&(0,a.jsx)("button",{onClick:e0,"aria-label":eN,title:ea?eS:eN,children:ea?(0,a.jsx)(h.ji,{className:y().closedCaptionIcon}):(0,a.jsx)(h.v0,{className:y().closedCaptionIcon})}),(0,a.jsx)("button",{onClick:eK,"aria-label":eP,title:en?eT:eP,children:en?(0,a.jsx)(h.SS,{className:y().fullScreenIcon}):(0,a.jsx)(h.iW,{className:y().fullScreenIcon})})]})]})})]}),!!eM&&C&&"youtube"===o&&(!eF||!eV)&&(0,a.jsx)("div",{className:y().consentMessage,children:eD})]})}):null};x.propTypes={videoId:s().string,videoFile:s().string,videoFileAD:s().string,videoTitle:s().string,videoService:s().oneOf(["youtube","twitch-vod","twitch-live","twitch-clip","file"]),channelName:s().string,videoStart:s().string,tracks:s().array,autoplay:s().bool,light:s().oneOfType([s().bool,s().string]),autoFocusVideo:s().bool,className:s().string};let g=x},6097:e=>{e.exports={videoPlayer:"video-player_videoPlayer__AhfUR bg-black max-w-full focus_outline-offset-4 focus_outline-black mb-componentSm lg_mb-componentLg focus_outline-1",videoWrapper:"video-player_videoWrapper___lPKT mx-auto max-h-screen90 aspect-video relative",twitchClipIframe:"video-player_twitchClipIframe__0YbdX absolute top-0 left-0",player:"video-player_player__IcF4q max-w-full",consentMessage:"video-player_consentMessage__ORsnf text-white flex h-full w-full items-center justify-center text-xl p-4 text-center",playerControls:"video-player_playerControls__ZCEVC flex flex-wrap absolute bottom-2 left-0 right-0 p-2",playIcon:"video-player_playIcon__N8O6O w-5 h-5 md_w-10 md_h-10",fullScreenIcon:"video-player_fullScreenIcon__Pg1yy w-5 h-5 md_w-10 md_h-10",muteIcon:"video-player_muteIcon__xWYHw w-
15 h-4 md_w-10 md_h-8",audioDescriptionIcon:"video-player_audioDescriptionIcon__n5U_1 w-8 h-4_5 md_w-16 md_h-9",closedCaptionIcon:"video-player_closedCaptionIcon__Y1G28 w-6 h-4_5 md_w-12 md_h-9",playerControlsContainer:"video-player_playerControlsContainer__vSXkX flex relative w-full items-center",icon:"video-player_icon__Pe7lZ","icon--video-mute":"video-player_icon--video-mute__sKElX","icon--video-muted":"video-player_icon--video-muted__h_DNe",playerControlsLeft:"video-player_playerControlsLeft__yApxa flex items-center",playerControlsRight:"video-player_playerControlsRight__mcFwe flex gap-1 right-0 py-2 pr-2 overflow-hidden",progressContainer:"video-player_progressContainer__KdHSJ relative h-1 grow",progress:"video-player_progress__1aaww h-1 absolute left-0 top-0 w-full back-white border-0 rounded-3xl",progressBarScrubber:"video-player_progressBarScrubber__TG3cU rounded-3xl h-1 absolute left-0 top-0 w-full",muteControl:"video-player_muteControl__55xS_",volumeLevel:"video-player_volumeLevel__tn9mQ self-center bg-white rounded-3xl opacity-0 h-1 w-0 focus_opacity-100 focus_w-12 hover_opacity-100 hover_w-12 transition-width transition-slowest ease",duration:"video-player_duration__nHO9K flex text-white text-base leading-5 ml-4 mr-4 focus_outline-white focus_outline-offset-4 md_text-lg"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.