PageSourceSearch

https://www.trtpashto.com/_next/static/chunks/app/(routes)/layout-fce4886dc9d19ecb.js

js trtpashto.com collected 2026-10-02 14:28:03 UTC 16,712 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7717],{43632:function(e,t,n){Promise.resolve().then(n.bind(n,67651)),Promise.resolve().then(n.t.bind(n,14620,23)),Promise.resolve().then(n.bind(n,20031)),Promise.resolve().then(n.bind(n,66902)),Promise.resolve().then(n.t.bind(n,37321,23)),Promise.resolve().then(n.t.bind(n,9079,23)),Promise.resolve().then(n.t.bind(n,96101,23)),Promise.resolve().then(n.bind(n,64562)),Promise.resolve().then(n.bind(n,12696)),Promise.resolve().then(n.bind(n,45441)),Promise.resolve().then(n.bind(n,52764)),Promise.resolve().then(n.bind(n,20059)),Promise.resolve().then(n.bind(n,62570))},91900:function(e,t,n){"use strict";n.r(t),n.d(t,{Carousel:function(){return x},CarouselContent:function(){return m},CarouselItem:function(){return b},CarouselNext:function(){return v},CarouselPrevious:function(){return p},useCarousel:function(){return h}});var l=n(74023),i=n(83641),r=n(26670),a=n(84427),s=n(65273),o=n(12173);let u=(0,i.forwardRef)((e,t)=>{let{className:n,children:i,...r}=e;return(0,l.jsx)("button",{ref:t,className:(0,o.cn)("w-7 h-7 bg-[#FFFFFF4D] rounded-full",n),...r,children:i})});var c=n(31652),d=n(72542);let f=i.createContext(null);function h(){let e=i.useContext(f);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}let x=i.forwardRef((e,t)=>{let{orientation:n="horizontal",opts:a,setApi:s,plugins:u,className:h,children:x,...m}=e,b=(0,c.useLocale)(),[p,v]=(0,r.Z)({...a,direction:(0,d.dZ)(b)?"rtl":"ltr",axis:"horizontal"===n?"x":"y"},u),[g,w]=i.useState(!1),[N,y]=i.useState(!1),j=i.useCallback(e=>{e&&(w(e.canScrollPrev()),y(e.canScrollNext()))},[]),C=i.useCallback(()=>{null==v||v.scrollPrev()},[v]),k=i.useCallback(()=>{null==v||v.scrollNext()},[v]),E=i.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),C()):"ArrowRight"===e.key&&(e.preventDefault(),k())},[C,k]);return i.useEffect(()=>{v&&s&&s(v)},[v,s]),i.useEffect(()=>{if(v)return j(v),v.on("reInit",j),v.on("select",j),()=>{null==v||v.off("select",j)}},[v,j]),(0,l.jsx)(f.Provider,{value:{carouselRef:p,api:v,opts:a,orientation:n||((null==a?void 0:a.axis)==="y"?"vertical":"horizontal"),scrollPrev:C,scrollNext:k,canScrollPrev:g,canScrollNext:N},children:(0,l.jsx)("div",{ref:t,onKeyDownCapture:E,className:(0,o.cn)("relative carousel-container",h),role:"region","aria-roledescription":"carousel",...m,children:x})})});x.displayName="Carousel";let m=i.forwardRef((e,t)=>{let{className:n,containerClassName:i,children:r,...a}=e,{carouselRef:s,orientation:u}=h();return(0,l.jsx)("div",{ref:s,className:(0,o.cn)("overflow-hidden h-full",i),dir:"inherit",children:(0,l.jsx)("div",{ref:t,className:(0,o.cn)("flex",{"-mt-4 flex-col":"vertical"===u},n),...a,children:r})})});m.displayName="CarouselContent";let b=i.forwardRef((e,t)=>{let{className:n,...i}=e,{orientation:r}=h();return(0,l.jsx)("div",{ref:t,role:"group","aria-roledescription":"slide",className:(0,o.cn)("min-w-0 shrink-0 grow-0 basis-full",{"pt-4":"vertical"===r},n),...i})});b.displayName="CarouselItem";let p=i.forwardRef((e,t)=>{let{className:n,arrowClassName:i,...r}=e,{orientation:s,scrollPrev:c,canScrollPrev:d}=h();return(0,l.jsxs)(u,{ref:t,className:(0,o.cn)("absolute h-8 w-8 rounded-full bg-white-5","horizontal"===s?"top-1/2 -translate-y-1/2 rtl:rotate-180":"left-1/2 -translate-x-1/2 rotate-90",n,{"disabled opacity-50":!d}),onClick:c,...r,children:[(0,l.jsx)(a.Z,{className:(0,o.cn)("h-4 w-4 m-auto",i)}),(0,l.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});p.displayName="CarouselPrevious";let v=i.forwardRef((e,t)=>{let{className:n,arrowClassName:i,...r}=e,{orientation:a,scrollNext:c,canScrollNext:d}=h();return(0,l.jsxs)(u,{ref:t,className:(0,o.cn)(n,"absolute h-8 w-8 rounded-full bg-white-5","horizontal"===a?"top-1/2 -translate-y-1/2 rtl:rotate-180":"left-1/2 -translate-x-1/2 rotate-90",n,{"disabled opacity-50":!d}),onClick:c,...r,children:[(0,l.jsx)(s.Z,{className:(0,o.cn)("h-4 w-4 m-auto",i)}),(0,l.jsx)("span",{className:"sr-only",children:"Next slide"})]})});v.displayName="CarouselNext"},78893:function(e,t,n){"use strict";n.d(t,{FromNowDateClient:function(){return a}});var l=n(90733),i=n(7673),r=n(83641);let a=e=>{let{date:t,languageCode:n,onDateFound:a}=e,s=(0,l.MS)(),[o,u]=(0,r.useState)("");return(0,r.useEffect)(()=>{(async function(){u(await (0,i.tJ)(t,n||s.languageCode))})().then(()=>null==a?void 0:a())},[t,n]),o}},84358:function(e,t,n){"use strict";n.d(t,{DK:function(){return h},Fg:function(){return u},H$:function(){return c},Mv:function(){return d},Vu:function(){return s},Zs:function(){return r},cc:function(){return a},g5:function(){return o},g9:function(){return f},uM:function(){return i},zX:function(){return l}});let l="TRT-STICKY-HEADER",i="TRT-STICKY-HEADER-WRAPPER",r="TRT-CAROUSEL-BREAKING-NEWS",a="TRT-SECONDARY-MENU-HEADER",s="TRT-STICKY-WEBVIEW-HEADER",o="TRT-STICKY-WEBVIEW-MENU-ROW",u="TRT-SIMPLE-HEADER",c="trt-channel-logo-container",d="trt-channel-logo-multicolor",f="TRT-BREKINGNEWS-WRAPPER",h="TRT-TV-SCHEDULE-CURRENT-PROGRAM-ID"},12696:function(e,t,n){"use strict";n.r(t),n.d(t,{BreakingNewsContent:function(){return g}});var l=n(74023),i=n(52331),r=n(91900),a=n(95700),s=n(84358),o=n(83641),u=n(49442),c=n.n(u),d=n(94970),f=n(12173),h=n(78893),x=n(90733);let m=e=>{let{updatedAt:t,timestamp:n,title:i,description:r,id:a,setExpanded:u,setHeight:m,setIsOverflowing:b,containerRef:p}=e,v=(0,x.MS)(),g=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let e=document.getElementById(s.Zs),t=()=>{u(void 0);let t=g.current,n=p.current;n&&b(n.scrollHeight>100),t&&(e&&(t.style.width="".concat(e.getBoundingClientRect().width,"px")),m(t.clientHeight))},n=c()(t,100);
1return t(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[p,u,m,b]),(0,l.jsxs)("div",{id:"carousel-child-".concat(a),className:"fixed top-[-1000px] w-full grid gap-y-1 items-start z-[-1] opacity-0",ref:g,children:[(0,l.jsxs)("div",{className:"w-full grid relative",children:[(0,l.jsx)("div",{className:"font-body text-xs font-extrabold uppercase tracking-[1px] text-white text-nowrap",children:(0,l.jsx)(h.FromNowDateClient,{date:n||t,languageCode:null==v?void 0:v.languageCode})}),(0,l.jsx)("div",{className:"font-primary text-lg lg:text-1.5xl xl:text-2xl leading-normal lg:leading-custom_5 xl:leading-8 text-white font-medium",children:i})]}),(0,l.jsx)("p",{className:(0,f.cn)("block font-body text-xs2 font-light leading-normal text-white ease-in-out duration-200"),children:r}),(0,l.jsx)("button",{className:"flex justify-center pt-1 mx-auto relative z-10",children:(0,l.jsx)(d.K,{className:"text-white w-3 h-3"})})]})};function b(e){let{title:t,description:n,timestamp:i,updatedAt:r,emblaApi:a,setExpanded:s,setSelectedItemHeight:u,expanded:c,id:b}=e,p=(0,x.MS)(),[v,g]=(0,o.useState)(!1),w=(0,o.useRef)(null),[N,y]=(0,o.useState)(0),j=(0,o.useCallback)(()=>{if(!c)return;let e=null==a?void 0:a.plugins();(null==e?void 0:e.autoplay)&&(e.autoplay.options.delay=3e3,e.autoplay.play()),s(void 0)},[a,s,c]);return(0,o.useEffect)(()=>{if(a)return null==a||a.on("pointerUp",j),()=>{null==a||a.off("pointerUp",j)}},[a,j]),(0,l.jsxs)("div",{className:"grid relative",ref:w,children:[(0,l.jsxs)("div",{id:"carousel-child-".concat(b),className:"w-full h-full grid items-start relative z-[25]",children:[(0,l.jsxs)("div",{className:"w-full grid relative mb-1",children:[(0,l.jsx)("div",{className:"font-body text-xs font-extrabold uppercase tracking-[1px] text-white text-nowrap",children:(0,l.jsx)(h.FromNowDateClient,{date:i||r,languageCode:null==p?void 0:p.languageCode})}),(0,l.jsx)("div",{className:(0,f.cn)("font-primary text-lg lg:text-1.5xl xl:text-2xl leading-normal lg:leading-custom_5 xl:leading-8 text-white font-medium",{"line-clamp-1":!c&&v,"line-clamp-none":c}),children:t})]}),(0,l.jsx)("p",{className:(0,f.cn)("block font-body text-xs2 font-light leading-normal text-white ease-in-out duration-200",{"line-clamp-1 mb-1":v&&!c,"opacity-0 h-0 invisible p-0 m-0":!v||c}),children:n}),(0,l.jsx)("p",{className:(0,f.cn)("block font-body text-xs2 font-light leading-normal text-white ease-in-out duration-200",{"opacity-0 h-0 invisible mb-0":v&&!c,"opacity-1 h-auto mb-1":!v||c}),children:n}),v?(0,l.jsx)("button",{className:(0,f.cn)("absolute bottom-[-8px] md:bottom-[-12px] left-1/2 transform -translate-x-1/2 flex justify-center pt-1 relative z-10",{hidden:v&&c}),onClick:()=>{let e=null==a?void 0:a.plugins();if(null==e?void 0:e.autoplay){var t;e.autoplay.options.delay=1e9,null==e||null===(t=e.autoplay)||void 0===t||t.stop()}s(b),u(N+40)},children:(0,l.jsx)(d.K,{className:"text-white w-3 h-3"})}):null]}),v&&c?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("button",{className:"block self-center m-auto pt-2 w-full",onClick:j,children:(0,l.jsx)(d.f9,{className:"text-white m-auto"})})}):null,(0,l.jsx)(m,{updatedAt:r,timestamp:i,title:t,description:n,id:b,setHeight:y,setExpanded:s,setIsOverflowing:g,containerRef:w})]})}var p=n(45441);let v={loop:!0,axis:"y"};function g(e){let{breakingNews:t}=e,[n,u]=(0,o.useState)(void 0),[c,d]=(0,o.useState)(null),h=(0,o.useRef)((0,a.Z)({delay:3e3})),[x,m]=(0,o.useState)(0);return(0,l.jsxs)("div",{className:(0,f.cn)("bg-primary-blue-3 w-full flex transition-all duration-200 ease-in-out flex-row  overflow-hidden",{"max-h-[120px]":!n}),style:{...n&&{maxHeight:x}},id:s.g9,children:[(0,l.jsx)(p.BreakingNewsDots,{emblaApi:c,breakingNews:t}),(0,l.jsx)("div",{className:"flex flex-col justify-center px-3 md:px-4 pt-3 pb-2 sm:pt-[11px] sm:pb-[11px] lg:pt-3 lg:pb-5 xl:pt-5 xl:pb-5",children:(0,l.jsx)(r.Carousel,{setApi:e=>d(e),opts:v,plugins:[h.current],orientation:"vertical",className:"w-full",id:s.Zs,children:(0,l.jsx)(r.CarouselContent,{className:"mt-0 !h-full transition-[height] duration-200 ease-in-out",children:null==t?void 0:t.map((e,t)=>(0,l.jsx)(r.CarouselItem,{className:(0,i.Z)("flex items-center pt-0 select-none"),id:"carousel-".concat(t),children:(0,l.jsx)(b,{...e,emblaApi:c,setExpanded:u,setSelectedItemHeight:m,expanded:n})},e.id))})})})]})}},45441:function(e,t,n){"use strict";n.r(t),n.d(t,{BreakingNewsDots:function(){return a}});var l=n(74023),i=n(52331),r=n(83641);function a(e){let{emblaApi:t,breakingNews:n}=e,[a,s]=(0,r.useState)(0),o=(0,r.useCallback)(()=>{t&&s(t.selectedScrollSnap())},[t]);return((0,r.useEffect)(()=>{t&&t.on("select",o)},[t,o]),!n||n.length<=1)?null:n&&(null==n?void 0:n.length)>1&&(0,l.jsx)("div",{className:"ms-4",children:(0,l.jsx)("div",{className:"flex justify-center items-center h-full gap-[7px] flex-col",children:n.map((e,t)=>(0,l.jsx)("div",{className:(0,i.Z)("bg-white rounded-full ease-in-out duration-500 aspect-square",{"w-1.5 h-1.5":t===a,"w-1 h-1 opacity-50":t!==a})},"dot-".concat(e.id)))})})}},52764:function(e,t,n){"use strict";n.r(t),n.d(t,{BreakingWrapper:function(){return m}});var l=n(74023),i=n(96487),r=n(83641),a=n(94970),s=n(71283);let o=()=>{let[e,t]=(0,r.useState)(null),[n,l]=(0,r.useState)([]),[i,a]=(0,r.useState)([]),o=(0,r.useCallback)(()=>{let e=(0,s.ZP)("https://prod-socket-service.trtglobal.io",{auth:{token:"Bearer ".concat("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoic29ja2V0LXNlcnZpY2UifQ.Be-JZgeyZSQT3QO8bvWCg60fi3jo8twgaG5tgFDhbFY")}
1,reconnection:!0,reconnectionAttempts:5,reconnectionDelay:1e3,timeout:2e4,transports:["websocket"],autoConnect:!1});return e.on("connect",()=>{e.on("breaking-news",e=>{l(t=>[...t,e])}),e.on("live-coverage",e=>{a(t=>[...t,e])})}),e.on("disconnect",e=>{}),e.on("error",e=>{}),e.on("connect_error",e=>{}),e},[]);return(0,r.useEffect)(()=>{let e=!0;{let n=o(),l=()=>{e&&n.connect()};return window.requestAnimationFrame(()=>{setTimeout(l,100)}),t(n),()=>{e=!1,n&&(n.removeAllListeners(),n.disconnect())}}},[o]),{socket:e,breakingNewsUpdates:n,liveCoverageUpdates:i}};var u=n(31652),c=n(57678);let d=(0,i.default)(()=>Promise.resolve().then(n.bind(n,12696)).then(e=>e.BreakingNewsContent),{loadableGenerated:{webpack:()=>[12696]},ssr:!1});function f(e){let{initialBreakingNews:t,channel:n}=e,i=(0,u.useTranslations)(),{breakingNewsUpdates:s}=o(),[f,h]=(0,r.useState)([]);if((0,r.useEffect)(()=>{t&&h((0,c.A)(t))},[t]),(0,r.useEffect)(()=>{let e=setInterval(()=>{h((0,c.A)(f))},6e4);return()=>clearInterval(e)},[f]),(0,r.useEffect)(()=>{let e=s.filter(e=>e.channel===(null==n?void 0:n.id));if(e.length>0){let t=e[e.length-1];(null==f?void 0:f.findIndex(e=>e.id===(null==t?void 0:t.id)))<0?h(e=>[...e,t]):h(null==f?void 0:f.map(e=>e.id===t.id?t:e))}},[s]),(null==f?void 0:f.length)===0)return null;let x=null==f?void 0:f.slice(0,4);return x&&0!==x.length?(0,l.jsxs)("div",{className:"z-[10] relative w-full flex flex-col lg:flex-row min-h-[80px] lg:min-h-[60px]",children:[(0,l.jsxs)("div",{className:"xl:min-w-[214px] lg:min-w-[188px] flex flex-row justify-center gap-[9px] bg-grey-3",children:[(0,l.jsx)("div",{className:"my-auto",children:(0,l.jsx)(a.F1,{className:"text-breaking-text"})}),(0,l.jsx)("div",{className:"font-body text-xl md:text-2xl font-extrabold text-breaking-text uppercase my-auto",children:i("breaking")})]}),(0,l.jsx)(d,{breakingNews:x})]}):null}var h=n(53883),x=n(97769);function m(e){let{channel:t}=e,[n,i]=(0,r.useState)(void 0),a=(0,x.usePathname)();return((0,r.useEffect)(()=>{(null==t?void 0:t.id)&&(null==t?void 0:t.languageCode)&&(async()=>{try{let e=await fetch("/api/breaking-news?channelId=".concat(t.id,"&languageCode=").concat((0,h.hi)(t.languageCode)));if(!e.ok){i(void 0);return}let n=await e.json();i(n)}catch(e){i(void 0)}})()},[t]),a.includes("/video/tv"))?null:(0,l.jsx)(f,{initialBreakingNews:n,channel:t})}},7673:function(e,t,n){"use strict";n.d(t,{tJ:function(){return p},jv:function(){return b}});var l=n(54059),i=n.n(l),r=n(97699),a=n.n(r),s=n(35323),o=n.n(s),u=n(53770),c=n.n(u),d=n(12847),f=n.n(d);let h={"en-af":()=>n.e(8051).then(n.t.bind(n,88051,23)),"fr-af":()=>n.e(1303).then(n.t.bind(n,71303,23)),uz:()=>n.e(6866).then(n.t.bind(n,36866,23)),ro:()=>n.e(382).then(n.t.bind(n,70382,23)),pt:()=>n.e(5414).then(n.t.bind(n,35414,23)),it:()=>n.e(3607).then(n.t.bind(n,93607,23)),hu:()=>n.e(3657).then(n.t.bind(n,43657,23)),el:()=>n.e(1181).then(n.t.bind(n,31181,23)),ka:()=>n.e(6875).then(n.t.bind(n,16875,23)),zh:()=>n.e(3574).then(n.t.bind(n,43574,23)),bg:()=>n.e(7397).then(n.t.bind(n,87397,23)),hy:()=>n.e(766).then(n.t.bind(n,80766,23)),ja:()=>n.e(4677).then(n.t.bind(n,34677,23)),no:()=>n.e(9186).then(n.t.bind(n,9186,23)),da:()=>n.e(9854).then(n.t.bind(n,39905,23)),pl:()=>n.e(3081).then(n.t.bind(n,73081,23)),fi:()=>n.e(7353).then(n.t.bind(n,7353,23)),id:()=>n.e(6596).then(n.t.bind(n,6596,23)),ms:()=>n.e(8836).then(n.t.bind(n,88836,23)),nl:()=>n.e(4074).then(n.t.bind(n,64074,23)),sv:()=>n.e(8307).then(n.t.bind(n,8307,23)),ko:()=>n.e(7899).then(n.t.bind(n,67899,23)),ur:()=>n.e(6222).then(n.t.bind(n,36222,23)),sq:()=>n.e(844).then(n.t.bind(n,90844,23)),de:()=>n.e(9189).then(n.t.bind(n,49189,23)),ru:()=>n.e(4998).then(n.t.bind(n,94998,23)),mk:()=>n.e(2095).then(n.t.bind(n,92095,23)),sw:()=>n.e(9830).then(n.t.bind(n,39830,23)),fa:()=>n.e(9431).then(n.t.bind(n,89431,23)),"fa-AF":()=>n.e(9431).then(n.t.bind(n,89431,23)),he:()=>n.e(8581).then(n.t.bind(n,28581,23)),hi:()=>n.e(4636).then(n.t.bind(n,54636,23)),es:()=>n.e(902).then(n.t.bind(n,19344,23)),ar:()=>n.e(115).then(n.t.bind(n,80115,23)),fr:()=>n.e(1303).then(n.t.bind(n,71303,23)),en:()=>n.e(8051).then(n.t.bind(n,88051,23)),tr:()=>n.e(6097).then(n.t.bind(n,16097,23))},x={az:()=>n.e(7437).then(n.bind(n,77437)),tat:()=>n.e(2772).then(n.bind(n,42772)),ps:()=>n.e(4025).then(n.bind(n,94025)),kg:()=>n.e(2427).then(n.bind(n,12427)),kk:()=>n.e(2387).then(n.bind(n,72387)),"fa-AF":()=>n.e(5474).then(n.bind(n,65474)),so:()=>n.e(8352).then(n.bind(n,18352)),pcm:()=>n.e(725).then(n.bind(n,725)),ha:()=>n.e(3819).then(n.bind(n,73819)),bs:()=>n.e(1681).then(n.bind(n,91681)),uig:()=>n.e(2777).then(n.bind(n,62777)),tuk:()=>n.e(1173).then(n.bind(n,61173))};async function m(e){try{if(e&&e in h){let t=h[e];await t(),i().locale(null!=e?e:"en")}else if(e&&e in x){let t=x[e],n=(await t()).default(i());i().locale(n,{},!0)}else await n.e(8051).then(n.t.bind(n,88051,23)),i().locale("en")}catch(e){await n.e(8051).then(n.t.bind(n,88051,23)),i().locale("en")}return i()()}function b(e){return i().locale(null!=e?e:"en"),i()().locale(null!=e?e:"en").tz("Etc/GMT")}i().extend(o()),i().extend(a()),i().extend(c()),i().extend(f());let p=async(e,t)=>{if(!e||"Invalid Date"===new Date(e).toString())return"";let n=null!=t?t:"en",l=await m(t),r=Intl.DateTimeFormat().resolvedOptions().timeZone,a=i().utc(e).tz(r);return l.diff(a,"hours")>=24?a.locale(n).format("LL"):a.locale(n).fromNow()}}},function(e){e.O(0,[4174,5910,605,1508,2817,508,8979,3457,1652,6574,3772,6663,5014,4620,8230,733,7364,4695,743,4652,9097,1744],function(){return e(e.s=43632)}),_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.