PageSourceSearch

https://www.tvguide.co.uk/_next/static/chunks/app/search/page-19d469f08a883c8f.js

js tvguide.co.uk collected 2026-10-01 11:40:45 UTC 16,663 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2797],{204:function(e,t,n){Promise.resolve().then(n.bind(n,8434))},8434:function(e,t,n){"use strict";n.d(t,{default:function(){return C}});var s=n(7437),r=n(2265),a=n(785),l=n(331),o=n(3199),i=n(4017),c=n(2171),d=n(8482),u=n(7280),h=n(3338),m=n(1994),x=n(1371),f=n(2871);function p(e){let{title:t="Channel"}=e,{items:n,refine:a,searchForItems:l,canToggleShowMore:o,isShowingMore:i,toggleShowMore:c}=(0,h.c)({attribute:"channel_name",showMore:!0}),d=(0,r.useRef)(null),[u,p]=(0,r.useState)(!1),g=(0,r.useCallback)(e=>{var t;p(!0),null===(t=d.current)||void 0===t||t.focus()},[]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h2",{className:"flex justify-between border-b border-stone-600 text-sm font-bold uppercase text-stone-600 dark:border-stone-400 dark:text-stone-400",children:[t,(0,s.jsx)("button",{title:"Search channel list",className:"hover:text-stone-400 dark:hover:text-stone-200",onClick:g,children:(0,s.jsx)(x.Z,{className:"h-4 w-4"})})]}),u&&(0,s.jsx)("input",{type:"search",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",autoFocus:!0,spellCheck:!1,maxLength:128,placeholder:"Search channels...",onChange:e=>l(e.currentTarget.value),className:"w-full bg-white p-1 text-sm text-stone-800 outline-red-600 dark:bg-black/50 dark:text-white",ref:d}),(0,s.jsx)("ul",{children:n.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("div",{className:"group flex cursor-pointer items-center gap-1 p-0.5 text-sm text-stone-600 dar
1k:text-stone-300",title:e.isRefined?"Remove ".concat(e.label," filter"):"Filter by channel ".concat(e.label),onClick:()=>a(e.value),children:[e.isRefined&&(0,s.jsx)(f.Z,{className:"h-4 w-4 text-stone-800 dark:text-stone-100"}),(0,s.jsx)("div",{className:(0,m.Z)("line-clamp-1 group-hover:underline",e.isRefined&&"font-semibold dark:text-stone-100"),children:e.label}),(0,s.jsx)("div",{className:"flex h-4 scale-90 items-center justify-center rounded-full bg-stone-300 px-1 text-xs text-stone-800 dark:bg-stone-800 dark:text-stone-400",children:e.count})]})},e.label))}),o&&(0,s.jsxs)("div",{className:"relative z-10 -mt-4",children:[(0,s.jsx)("div",{className:"to- h-2 bg-gradient-to-b from-transparent to-white dark:to-stone-700"}),(0,s.jsx)("button",{onClick:c,disabled:!o,className:"block w-full bg-white text-sm text-stone-700 hover:bg-stone-200 dark:bg-stone-700 dark:text-stone-200 dark:hover:bg-stone-800",children:i?"Show less":"Show more"})]})]})}var g=n(7648),b=n(1294),v=n(2302),w=n(4452),j=n(4916);function N(e){let{hit:t}=e,n=t.start_timestamp&&(0,w.XV)(1e3*t.start_timestamp),{id:r,title:a}=t,l=n?(0,w.hB)({pa_id:r,title:a}):(0,w._m)({id:r,title:a});return(0,s.jsxs)("div",{className:"group/hit-item relative flex h-full flex-col overflow-hidden rounded bg-stone-100 shadow-md hover:shadow-lg dark:bg-stone-900 dark:text-white",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("div",{className:"overflow-hidden",children:[(0,s.jsx)("img",{src:t.image||j.qZ,className:"aspect-video w-full border-b border-white/30 object-cover object-center transition duration-1000 group-hover/hit-item:scale-110 group-hover/hit-item:brightness-125",loading:"lazy",alt:"",width:1024,height:576}),(0,s.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-4 bg-gradient-to-b from-transparent dark:to-stone-950/20"}),(0,s.jsx)("div",{className:"absolute inset-x-0 top-0 h-4 bg-gradient-to-t from-transparent dark:to-black/30"}),(0,s.jsx)("img",{src:t.channel_logo_url,loading:"lazy",className:"absolute left-2 top-2 h-auto w-16 rounded-sm border border-white",alt:"".concat(t.channel_name," logo"),title:t.channel_name,width:320,height:180}),n&&(0,s.jsxs)("div",{className:"absolute bottom-2 left-2 rounded-sm bg-white/95 p-1 leading-none dark:bg-black/75",children:[(0,s.jsx)("span",{className:"font-bold",children:n.format("h:mm")}),(0,s.jsx)("span",{className:"pl-0.5 text-xs font-semibold tracking-tight ",children:n.format("A")})," ",(0,s.jsxs)("div",{className:"text-center text-xs uppercase",children:[(0,w.zk)(n)?"Today":n.format("dddd"),n.isAfter((0,w.XV)().add(6,"days"))&&(0,s.jsxs)("span",{className:"text-stone-300",children:[", ",n.format("D MMM")]})]})]})]}),(0,s.jsx)("img",{src:t.image||j.qZ,className:"absolute -scale-y-[1] opacity-50 blur-sm brightness-50 saturate-200 transition duration-1000 group-hover/hit-item:-scale-y-[1.1] group-hover/hit-item:brightness-100",loading:"lazy",alt:"",width:1024,height:576})]}),(0,s.jsxs)("div",{className:"relative flex-grow p-2",children:[(0,s.jsx)("div",{className:"absolute inset-0 bottom-0 bg-white dark:bg-stone-700/90 dark:bg-gradient-to-b dark:from-stone-900/75 dark:via-stone-900/60 dark:via-30% dark:to-stone-900"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(b.y,{hit:t,attribute:"title",className:"text-lg font-bold leading-none group-hover/hit-item:underline"}),t.summary&&(0,s.jsx)(v.p,{hit:t,attribute:"summary",className:"my-1 line-clamp-2 text-sm leading-tight text-stone-600 dar
1k:text-stone-300"})]})]}),(0,s.jsx)(g.default,{href:l,prefetch:!1,className:"absolute inset-0"})]})}var k=n(597);function y(e){let{classNames:t,options:n}=e,{items:r,refine:a}=(0,h.c)({attribute:"channel_name",...n}),l=r.filter(e=>e.isRefined);return(0,s.jsx)("ul",{className:(0,m.Z)(null==t?void 0:t.root,null==t?void 0:t.list),children:l.map(e=>{let{label:n,value:r}=e;return(0,s.jsx)("li",{className:null==t?void 0:t.item,children:(0,s.jsxs)("span",{className:null==t?void 0:t.category,children:[(0,s.jsx)("span",{className:null==t?void 0:t.categoryLabel,children:n}),(0,s.jsx)("button",{type:"button",className:null==t?void 0:t.delete,onClick:()=>a(r),children:"✕"})]})},r)})})}var _=n(808);function S(e){let{classNames:t,collapsible:n=!0,showItems:a=3,hitComponent:l,options:o}=e,[i,c]=(0,r.useState)(!1),{hits:d,results:u,sendEvent:h}=(0,_.O)(o),x=d.slice(0,n&&i?void 0:a),f=l||(e=>{let{hit:t}=e;return(null==t?void 0:t.objectID)||null});return d.length<=a&&(n=!1),(0,s.jsx)("div",{className:(0,m.Z)(null==t?void 0:t.root),children:x.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("ul",{className:(0,m.Z)(n&&"collapsible",i&&"is-open",null==t?void 0:t.list),children:x.map((e,n)=>(0,s.jsx)("li",{className:(0,m.Z)(null==t?void 0:t.item),children:(0,s.jsx)(f,{hit:e,sendEvent:h})},(null==e?void 0:e.objectID)||n))}),n&&(0,s.jsx)("div",{className:"text-center",children:(0,s.jsx)("button",{className:"cursor-pointer py-2 text-stone-800 underline hover:no-underline dark:text-white",onClick:()=>c(!i),children:i?"Show less":"Show more"})})]}):(0,s.jsx)("div",{className:"text-center text-2xl text-stone-800 dark:text-white",children:"No results"})})}let T=(0,d.instantMeiliSearch)("https://api-s.tvguide.co.uk","0bd556c1a50edab4c2bb6a248cc31ef39e6fa6c16e981ba8cabc4ae03cdf92fa",{primaryKey:"id"});function C(e){let{channels:t}=e,[n,l]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=e=>{let t=document.querySelector(".ais-SearchBox-input");t&&t!==document.activeElement&&"/"===e.key&&(e.preventDefault(),t.focus())};return document.addEventListener("keypress",e),()=>document.removeEventListener("keypress",e)},[]);let o=(0,r.useRef)(null);return(0,s.jsx)(a.p,{searchClient:T.searchClient,indexName:"schedules",future:{preserveSharedStateOnUnmount:!1},onStateChange:e=>{let{uiState:t,setUiState:n}=e;o.current&&clearTimeout(o.current);let s=t.schedules.query;n(t);let r=setTimeout(()=>{l(!0),(0,k.cw)(s).then(()=>{r===o.current&&(setTimeout(()=>{l(!1)},100),o.current=null)})},0);o.current=r},children:(0,s.jsx)(E,{shouldRefresh:n})})}let E=e=>{let{shouldRefresh:t=!1}=e,{refresh:n,indexUiState:a}=(0,l.b)(),[d,h]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{n()},[t]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mx-auto max-w-lg",children:(0,s.jsx)("div",{className:"relative mb-6 mt-5 sm:mb-10",children:(0,s.jsx)(o.R,{classNames:{root:"",form:"relative max-w-lg mx-auto",input:"w-full block text-lg sm:text-2xl pl-10 placeholder:text-base placeholder:text-stone-700 dark:placeholder:text-slate-400 text-stone-800 py-1 sm:py-2 focus:outline-none border-b-2 border-transparent focus:border-red-600 rounded dark:text-stone-50 bg-white/95 dark:bg-black/20 ring ring-1 dark:ring-2 ring-stone-500 dark:ring-black/50 dark:focus:bg-black/50 duration-500",submit:"absolute left-1 top-1 sm:top-2 p-1 pointer-events-none",submitIcon:"w-5 h-5 sm:w-6 sm:h-6 mt-0.5 fill-stone-500 dark:fill-stone-200",reset:"absolute right-2 top-2 sm:top-4 p-1 z-10",resetIcon:"w-3 h-3 fill-stone-500 dark:fill-stone-200",loadingIndicator:"hidden"},autoFocus:!0,placeholder:"Search by programme title and actors..."})})}),a.query&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mb-4 block flex flex-1 justify-center sm:hidden",children:(0,s.jsxs)("div",{className:"flex w-full overflow-hidden border border-stone-800 dark:border-white sm:w-64",children:[(0,s.jsx)("button",{onClick:()=>h(!0),className:(0,m.Z)("flex-1 px-2 py-1 text-center",d?"cursor-default bg-stone-800 font-bold text-stone-200 dark:bg-white dark:text-stone-700":"text-stone-800 hover:bg-red-700 hover:text-white dark:text-white"),children:"Live TV"}),(0,s.jsx)("button",{onClick:()=>h(!1),className:(0,m.Z)("flex-1 px-2 py-1 text-center",d?"text-stone-800 hover:bg-red-700 hover:text-white dark:text-white":"cursor-default bg-stone-800 font-bold text-stone-200 dark:bg-white dark:text-stone-700"),children:"Streaming"})]})}),(0,s.jsx)("h2",{className:"hidden pb-4 text-left text-4xl font-semibold text-stone-800 dark:text-white sm:block",children:"Live TV"}),(0,s.jsx)(i.g,{indexName:"schedules:start_timestamp:asc",children:(0,s.jsxs)("div",{className:(0,m.Z)(d?"items-start sm:flex":"hidden sm:flex"),children:[(0,s.jsx)(c.T,{hitsPerPage:21,attributesToSnippet:["summary:20"],filters:"start_timestamp>".concat(Math.round(new Date().valueOf()/1e3)," OR start_timestamp IS NULL")}),(0,s.jsx)("div",{className:"hidden w-40 flex-none pr-4 sm:block lg:w-48",children:(0,s.jsx)(p,{})}),(0,s.jsxs)("div",{className:"flex-1 pb-4 sm:pb-0",children:[(0,s.jsx)(y,{classNames:{list:"flex gap-2 flex-wrap",label:"hidden",item:"flex items-start flex-wrap gap-2",category:"bg-red-800 rounded-full text-stone-200 text-sm overflow-hidden",categoryLabel:"px-1",delete:"bg-red-900 px-1 hover:bg-red-800 text-white"}}),(0,s.jsx)(S,{hitComponent:N,classNames:{root:"pt-4",list:"grid grid-cols-1 xs:grid-cols-2 lg:grid-cols-3 group gap-4",item:"group-[.collapsible:not(.is-open)]:[&:nth-child(n+3)]:hidden lg:group-[.collapsible:not(.is-open)]:[&:nth-child(n+3)]:list-item"}})]})]})}),(0,s.jsxs)("h2",{className:"hidden pb-4 pt-8 text-left text-4xl font-semibold text-stone-800 dark:text-white sm:block",children:["Streaming",t&&(0,s.jsx)(u.Z,{className:"ml-4 inline-block h-6 w-6 animate-spin"})]}),(0,s.jsx)(i.g,{indexName:"streaming:popularity:desc",children:(0,s.jsxs)("div",{className:(0,m.Z)(d?"hidden sm:flex":"items-start sm:flex"),children:[(0,s.jsx)(c.T,{hitsPerPage:21,attributesToSnippet:["summary:20"]}),(0,s.jsxs)("div",{className:"hidden w-40 flex-none pr-4 sm:block lg:w-48",children:[(0,s.jsx)(p,{title:"Platform"}),(0,s.jsxs)("div",{className:"flex justify-between pt-4",children:[(0,s.jsx)(g.default,{className:"flex-none",href:"https://www.themoviedb.org",children:(0,s.jsx)("img",{className:"h-2.5",alt:"The Movie Database",src:"https://www.themoviedb.org/assets/2/v4/logos/v2/blue_short-8e7b30f73a4020692ccca9c88bafe5dcb6f8a62a4c6bc55cd9ba82bb2cd95f6c.svg"})}),(0,s.jsx)(g.default,{className:"flex-none",href:"https://www.justwatch.com/",children:(0,s.jsx)("img",{className:"h-2.5 w-16",alt:"JustWatch",src:"https://widget.justwatch.com/assets/JW_logo_color_10px.svg"})})]})]}),(0,s.jsxs)("div",{className:"flex-1 pb-4 sm:pb-0",children:[(0,s.jsx)(y,{classNames:{list:"flex gap-2 flex-wrap",label:"hidden",item:"flex items-start flex-wrap gap-2",category:"bg-red-800 rounded-full text-stone-200 text-sm overflow-hidden",categoryLabel:"px-1",delete:"bg-red-900 px-1 hover:bg-red-800 text-white"}}),(0,s.jsx)(S,{hitComponent:N,classNames:{root:"pt-4",list:"grid grid-cols-1 xs:grid-cols-2 lg:grid-cols-3 group gap-4",item:"group-[.collapsible:not(.is-open)]:[&:nth-child(n+3)]:hidden lg:group-[.collapsible:not(.is-open)]:[&:nth-child(n+3)]:list-item"}})]})]})})]})]})}},4916:function(e,t,n){"use strict";n.d(t,{Pb:function(){return i},S2:function(){return u},_n:function(){return m},a1:function(){return d},aM:function(){return a},bZ:function(){return x},fu:function(){return o},i2:function(){return r},qZ:function(){return h},rm:function(){return l},tC:function(){return c}});var s=n(257);let r="grid",a="list",l="popular",o="london",i=7,c=11,d=300,u=129600,h="/img/no-channel-image.png",m=s.env.LIVE_URL||"https://www.tvguide.co.uk",x=640},597:function(e,t,n){"use strict";n.d(t,{Ky:function(){return d},MP:function(){return i},Zz:function(){return c},ao:function(){return a},cK:function(){return r},cw:function(){return o},ex:function(){return l}});let s="https://api-2.tvguide.co.uk";if(!s)throw Error("Missing NEXT_PUBLIC_API_BASE_URL");async function r(){return u("/hero")}async function a(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return u("/listings",{...e,details:t})}async function l(e,t){let n={term:e};return t&&(n.filter=t),u("/group",n)}async function o(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return u("/search-db",{term:e,trigger:t})}async function i(e){return u("/single",{pa_id:e})}async function c(e,t){return await u("/articles",{term:e,limit:t})}async function d(){return u("/channels")}async function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=new URL(e,r.baseUrl||s);
1t&&Object.keys(t).forEach(e=>{a.searchParams.set(e,t[e])});let l=await fetch(a.toString(),{...n,next:{revalidate:60}});try{if(200===l.status)return await l.json();throw Error("".concat(l.status," ").concat(l.statusText))}catch(e){throw Error("API call failed (".concat(a,"): ").concat(e.message))}}},4452:function(e,t,n){"use strict";n.d(t,{e8:function(){return y},dP:function(){return p},zk:function(){return N},Pm:function(){return k},vT:function(){return j},k7:function(){return g},hB:function(){return b},_m:function(){return v},lV:function(){return f},XV:function(){return x},Qd:function(){return w},BW:function(){return _}});var s=n(1096),r=n.n(s),a=n(6206),l=n.n(a),o=n(7360),i=n.n(o),c=n(4916);n(2265),n(4514),n(6748);var d=n(4817),u=n(257);let h=!u.env.SANITY_TOKEN;u.env.SANITY_PROJECT_ID&&u.env.SANITY_DATASET&&(0,d.eI)({projectId:u.env.SANITY_PROJECT_ID,dataset:u.env.SANITY_DATASET,useCdn:h,perspective:h?"published":"previewDrafts",apiVersion:"2022-03-07",token:u.env.SANITY_TOKEN||void 0}),r().extend(l()),r().extend(i()),r().extend((e,t,n)=>{t.prototype.addInTz=function(e,t){let s=this.$x.$timezone;if(!s)throw Error("No timezone set");return n.tz(n(this.toDate()).tz(s).add(e,t).format("YYYY-MM-DD HH:mm:ss"),s)},t.prototype.subtractInTz=function(e,t){let s=this.$x.$timezone;if(!s)throw Error("No timezone set");return n.tz(n(this.toDate()).tz(s).subtract(e,t).format("YYYY-MM-DD HH:mm:ss"),s)}});let m=x().subtract(c.Pb,"days").startOf("day");function x(e){return r()(e).tz("Europe/London")}function f(e){return"string"!=typeof e?"":String(e).toLowerCase().replace(/\+/g,"-plus-").replace(/&/g,"-and-").replace(/'/g,"").replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/(^-|-$)/g,"")}function p(e){return"string"==typeof e?e===c.rm:e.slug===c.rm}function g(e){return x("".concat(e.date,"T").concat(String(e.hour).padStart(2,"0"),":00:00+0000"))}function b(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&e.pa_id&&e.title?(t?c._n:"")+"/schedule/".concat(e.pa_id,"/").concat(f(e.title)):""}function v(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!e||!e.id||!e.title)return"";let[r=e.id,a=e.show_type,l=s]=(null===(t=e._id)||void 0===t?void 0:t.split("_"))||String(e.id).split("_")||[e.id,e.show_type,s].filter(Boolean);return(n?c._n:"")+"/streaming/".concat([a,r,l].filter(Boolean).join("/"),"/").concat(f(e.title))}function w(e){return Math.round((x(e).valueOf()-m.valueOf())/36e5*c.a1)}function j(e){return"/channel/".concat(e)}function N(e){return x(e).isSame(x(),"day")}function k(e){return x(e).isSame(x().add(1,"day"),"day")}function y(){return void 0!==navigator.share}function _(e){return e.replace(/-/g," ").replace(/(?: |^)([a-z])/g,e=>e.toUpperCase())}}},function(e){e.O(0,[8311,2972,5577,7593,2971,5030,1744],function(){return e(e.s=204)}),_N_E=e.O()}]);

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.