1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2623,3012,8250],{54059:(e,l,t)=>{t.d(l,{c:()=>i,u:()=>o});var n=t(57761);let i=e=>{try{let l=((e||[]).map((e,l)=>"".concat(l,"_!").concat((null==e?void 0:e.id)||0,"_!").concat(((null==e?void 0:e.name)||"").substring(0,15)))||[]).join("#;");(0,n.A)({LogId:"511",Event:"LoadBlockDisplay",ItemName:l})}catch(e){}},o=(e,l)=>{try{let t=e.map((e,t)=>{let n=(null==l?void 0:l.type)==="recommend"||e.is_recommend?"1":"0";return"".concat(t,"_!").concat(e.id,"_!").concat(n,"#;")}).join(""),i=e.filter(e=>"1"===e.need_recommend||"2"===e.need_recommend);(0,n.A)({LogId:"522",Event:"LoadHighlightItem",ItemId:(null==l?void 0:l.id)||"",ItemName:t,SubMenuId:(null==l?void 0:l.name)||!(i.length>0)?(null==l?void 0:l.name)||"":"Recommend"})}catch(e){}}},63174:(e,l,t)=>{t.d(l,{V:()=>r});var n=t(14232),i=t(69473),o=t(16083),a=t(54059);let r=e=>{let{dataIndex:l,dataDefault:t,blockId:r,profile_id:d,cache_time:u,isLogged:c}=e,[s,v]=(0,n.useState)(!1),[m,f]=(0,n.useState)((null==t?void 0:t.data)||null),{setItem:p,getItem:_}=(0,i.Cj)(d,{}),{getBlockData:w}=(e=>{let{block:l,setIsEmpty:t,setIsError:i}=e,[a,r]=(0,n.useState)({}
1),[d,u]=(0,n.useState)(!1),[c,s]=(0,n.useState)(null),v=(0,n.useCallback)(async()=>{if(!(null==l?void 0:l.block_type)||!(null==l?void 0:l.id)){null==t||t(!0),null==i||i(!0);return}u(!0),s(null),null==i||i(!1);try{var e,n,a;let d=await (0,o.CS)({block:l||{}});return r(null==d?void 0:d.data),(null==d||null==(e=d.data)?void 0:e.code)===200&&(null==d||null==(a=d.data)||null==(n=a.data)?void 0:n.length)?null==t||t(!1):null==t||t(!0),null==i||i(!1),null==d?void 0:d.data}catch(e){return s(e instanceof Error?e:Error("Failed to fetch block data")),null==t||t(!0),null==i||i(!0),null}finally{u(!1)}},[l,t,i]);return{blockData:a,getBlockData:v,isLoading:d,error:c}})({block:l}),y=(0,n.useCallback)((e,l,t)=>{let n=[...e],i=[...l],o=new Set,a=0,r=0;for(let e of n)("1"===e.pin||void 0===e.pin)&&o.add(null==e?void 0:e.id);for(;(null==t?void 0:t.number_item_of_page)&&r<+(null==t?void 0:t.number_item_of_page)&&r<n.length||a<i.length;){var d,u,c,s,v,m,f;if(r>=n.length)o.has(i[a].id)?a++:(n.push(i[a]),o.add(i[a].id),r++);else if(o.has(null==(d=n[r])?void 0:d.id)&&"0"===n[r].pin)n.splice(r,1);else if(a>=i.length||"1"===n[r].pin||void 0===n[r].pin)o.add(null==(u=n[r])?void 0:u.id),r++;else for(;a<i.length&&n[r]&&i[a];)o.has(null==(c=i[a])?void 0:c.id)?a++:(null==(s=n[r])?void 0:s.pin)==="1"||void 0===(null==(v=n[r])?void 0:v.pin)?(o.add(null==(m=n[r])?void 0:m.id),r++):i[a]&&(i.push(n[r]),n[r]=i[a],o.add(null==(f=i[a])?void 0:f.id),a++,r++)}return n},[]);return{data:m,fetchRecommendBlock:(0,n.useCallback)(async e=>{try{var n,i;let{data:o}=JSON.parse(JSON.stringify(t)),d=null,s=_(),m=[];if(!c&&"undefined"!=typeof localStorage||((null==l?void 0:l.need_recommend)==="0"&&(null==s?void 0:s["".concat(r)])&&(null==s||delete s["".concat(r)],p(s,+u)),(null==l?void 0:l.need_recommend)==="0")){f(o||[]),v(!0);return}if(null==s?void 0:s["".concat(r)])(null==(d=s["".concat(r)])||null==(n=d.data)?void 0:n.length)&&(d.data=d.data.map(e=>({...e,is_recommend:!0})));else if((null==l?void 0:l.need_recommend)==="1"){if((null==(d=await w()||null)||null==(i=d.data)?void 0:i.length)&&(d.data=d.data.map(e=>({...e,is_recommend:!0,need_recommend:"1"}))),!(null==d?void 0:d.data)){f(o||[]),v(!0);return}if(200===d.code&&"undefined"!=typeof localStorage){let e={...s||{},["".concat(r)]:d};p(e,+u)}}else"2"===l.need_recommend&&(m=(null==o?void 0:o.map(e=>({...e,need_recommend:"2"})))||[]);let{data:g}=d||{};if(g){let l=y(o||[],g||[],e);m=l,f(l)}else f(o||[]);(null==m?void 0:m.length)>0&&(0,a.u)(m,l)}catch(l){let{data:e}=t;f(e||[]),v(!0)}finally{v(!0)}},[l,t,r]),isSortCompleted:s}}},63240:(e,l,t)=>{t.d(l,{FC:()=>o,UD:()=>a});let n=0,i=0,o=e=>{var l,t;let o=null==e||null==(l=e.type)?void 0:l.toLowerCase();if((null==e||null==(t=e.layout_type)?void 0:t.toLowerCase())!=="sport_match"&&(!o||!["event","eventtv"].includes(o))||!e.end_time)return!1;let a=(()=>{let e=Date.now();return e-i>1e3&&(n=Math.floor(e/1e3),i=e),n})(),r=parseInt(e.end_time,10);return!(!r||isNaN(r))&&a>r},a=e=>{if(!Array.isArray(e)||0===e.length)return e;let l=!1;for(let o=0;o<e.length;o++){var t,n,i,a;let r=null==(n=e[o])||null==(t=n.type)?void 0:t.toLowerCase();if((null==(a=e[o])||null==(i=a.layout_type)?void 0:i.toLowerCase())==="sport_match"||"event"===r||"eventtv"===r){l=!0;break}}return l?e.filter(e=>!o(e)):e}},69473:(e,l,t)=>{t.d(l,{Cj:()=>i,eU:()=>n});let n=()=>function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dd/MM/yyyy",t=l,n=new Date(e),i=e=>e.toString().padStart(2,"0");if(l.includes("DD")){let e="Thứ "+(n.getDay()+1);0===n.getDay()?e="Chá»§ nháºt":1===n.getDay()&&(e="Thứ 2"),t=t.replace("DD",e)}return l.includes("dd")&&(t=t.replace("dd",i(n.getDate()))),l.includes("MM")&&(t=t.replace("MM",i(n.getMonth()+1))),l.includes("yyyy")&&(t=t.replace("yyyy",n.getFullYear().toString())),l.includes("hh")&&(t=t.replace("hh",i(n.getHours()))),l.includes("mm")&&(t=t.replace("mm",i(n.getMinutes()))),l.includes("ss")&&(t=t.replace("ss",i(n.getSeconds()))),l.includes(".sss")&&(t=t.replace(".sss","."+n.getMilliseconds())),t};function i(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{setItem:function(l,t){try{let n=new Date().getTime()+1e3*t;window.localStorage.setItem(e,JSON.stringify({value:l,expiry:n}))}catch(e){}},getItem:function(){try{let t=window.localStorage.getItem(e);if(!t)return l;let n=JSON.parse(t);if(new Date().getTime()>n.expiry)return window.localStorage.removeItem(e),l;return n.value}catch(e){return l}},removeItem:function(){try{window.localStorage.removeItem(e)}catch(e){}}}}},83726:(e,l,t)=>{t.d(l,{H:()=>a,N:()=>o});var n=t(14232),i=t(60184);let o=()=>{let e=(0,i.GV)(e=>e.app.viewCountsMap),l=(0,n.useMemo)(()=>e?new Map(Object.entries(e)):new Map,[e]),t=(0,n.useMemo)(()=>e=>{if(!l.size||!(null==e?void 0:e.data))return e;let t=e.data.map(e=>{let t=e.highlight_id||e.id||e._id;if(!t)return e;let n=String(t).trim();if(!n)return e;let i=l.get(n);return i&&i.view_count_fmt&&"string"==typeof i.view_count_fmt&&""!==i.view_count_fmt.trim()?{...e,view_count:i.view_count,view_count_fmt:i.view_count_fmt}:e});return{...e,data:t}},[l]),o=(0,n.useCallback)(e=>{if(!(null==l?void 0:l.size))return e;let t=e.highlight_id||e.id||e._id;if(!t)return e;let n=String(t).trim();if(!n)return e;let i=l.get(n);return i&&i.view_count_fmt&&"string"==typeof i.view_count_fmt&&""!==i.view_count_fmt.trim()?{...e,view_count:i.view_count,view_count_fmt:i.view_count_fmt}:e},[l]);return(0,n.useMemo)(()=>({viewCountsMap:l,mapViewCountsToBlockData:t,mapViewCountToItem:o}),[l,t,o])},a=(e,l)=>{var t;let{mapViewCountsToBlockData:i,viewCountsMap:a}=o();(0,n.useEffect)(()=>
1{if(a.size&&(null==e?void 0:e.data)){var t;let n=i(e);(null==(t=n.data)?void 0:t.some((l,t)=>{var n;let i=null==(n=e.data)?void 0:n[t];return l.view_count!==(null==i?void 0:i.view_count)||l.view_count_fmt!==(null==i?void 0:i.view_count_fmt)}))&&l(n)}},[a,null==e||null==(t=e.data)?void 0:t.length,i])}},93012:(e,l,t)=>{t.r(l),t.d(l,{BlockPlayerTypes:()=>v.W,default:()=>m});var n=t(37876),i=t(60184),o=t(36410),a=t(14232),r=t(59115),d=t(53974),u=t(4772),c=t(72563),s=t(10715),v=t(25953);let m=e=>{let{url:l,isMuted:m,loop:f,type:p,onError:_,onPlaySuccess:w,onEnded:y,block:g,onTimeUpdate:h}=e,k=(0,a.useContext)(d.T),{isInViewport:b}=(0,a.useContext)(r.Q),{isInViewport:S}=k,C=(0,a.useRef)(null),M=(0,a.useRef)(null),P=(0,i.jL)(),E=(0,a.useCallback)(e=>{p===v.W.top_slider&&(window.topSliderPlayer=e),p===v.W.block_slider&&(window.blockPlayer=e),p===v.W.featured_media_spotlight&&(window.newVodPlayer=e)},[p]),I=(0,a.useCallback)(()=>{var e,l,t;let n=null;p===v.W.top_slider&&window.topSliderPlayer&&(n=null==(e=window.topSliderPlayer)?void 0:e.getMediaElement()),p===v.W.block_slider&&window.blockPlayer&&(n=null==(l=window.blockPlayer)?void 0:l.getMediaElement()),p===v.W.featured_media_spotlight&&window.newVodPlayer&&(n=null==(t=window.newVodPlayer)?void 0:t.getMediaElement()),n&&n.pause()},[p]),D=(0,a.useCallback)(()=>{if(p===v.W.top_slider&&!b&&window.topSliderPlayer){var e;let l=null==(e=window.topSliderPlayer)?void 0:e.getMediaElement();l&&l.pause()}},[p,b]),V=(0,a.useCallback)(()=>{if(p===v.W.featured_media_spotlight&&!S&&window.newVodPlayer){var e;let l=null==(e=window.newVodPlayer)?void 0:e.getMediaElement();l&&l.pause()}},[p,S]);(0,a.useEffect)(()=>{D()},[b,D]),(0,a.useEffect)(()=>{V()},[S,V]);(0,a.useEffect)(()=>(l&&(()=>{if("block_slider"===p){let e=document.getElementById("hover_slide_card");if(e&&(null==g?void 0:g.block_type)!=="ranked_poster_carousel"&&"0"===getComputedStyle(e).opacity)return}(e=>{var l,n,i,a,r,d;let{src:c}=e;if(window.blockPlayerVideo&&window.blockPlayerVideo.pause(),I(),!C.current)return;window.blockPlayerVideo=C.current,("top_slider"!==p||(null==g?void 0:g.block_type)==="featured_media_spotlight")&&P((0,o.u)(new Date().getTime()));let v=t(85351);(null==(l=(0,s.d)())?void 0:l.isSafari)&&((null==v||null==(a=v.polyfill)||null==(i=a.Orientation)?void 0:i.install)&&v.polyfill.Orientation.install(),(null==v||null==(d=v.polyfill)||null==(r=d.PatchedMediaKeysApple)?void 0:r.install)&&v.polyfill.PatchedMediaKeysApple.install()),(null==v||null==(n=v.polyfill)?void 0:n.installAll)&&v.polyfill.installAll();let m=new v.Player(C.current);M.current=m,m.addEventListener("error",e=>{_&&_(e)}),E(m),m.load(c).then(()=>{(()=>{if(C.current){let e=C.current.play();e&&e.then(()=>{}).catch(()=>{C.current&&(C.current.volume=0,C.current.muted=!0,P((0,u.cE)(!0)),C.current.play().then(()=>{}).catch(()=>{}))})}})()})})({src:l||""})})(),()=>{N()}),[]);let N=(0,a.useCallback)(()=>{var e,l,t;(null==(e=M.current)?void 0:e.unload)&&(null==(t=M.current)||null==(l=t.unload)||l.call(t),M.current=null)},[]);return(0,a.useEffect)(()=>{(null==C?void 0:C.current)&&(m?(C.current.volume=0,C.current.muted=!0):(C.current.volume=1,C.current.muted=!1))},[m]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"w-full h-full",children:(0,n.jsx)("video",{ref:C,className:" w-full h-auto",preload:"auto",muted:!0,playsInline:!0,loop:f,onPlaying:w,onEnded:y,onTimeUpdate:h,poster:c.Uk})})})}}}]);
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.