1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[704],{2774:(e,l,i)=>{"use strict";i.d(l,{Aw:()=>p,Fy:()=>v});var s=i(7876),t=i(4232),r=i(3436),o=i(6548),n=i(5347),a=i(8707),c=i(9719),d=i(6943),u=i(1841);let x=e=>{let{num:l}=e;return(0,s.jsx)("div",{className:"h-full active:opacity-30 md:px-[1.25vw] lg:px-[1.0vw] flex flex-row justify-center items-center cursor-pointer",children:(0,s.jsxs)("div",{className:"flex px-[8px] py-[2px] bg-[--color-credit-menu-bg] items-center rounded-[30px]",children:[(0,s.jsx)(n.e,{...r.M.iconCoins,className:"w-[20px] h-[20px] mt-[2.5px]"}),(0,s.jsx)("div",{className:"text-[#fff] font-medium text-[16px]",children:null!=l?l:10})]})})},v=e=>{let{modalKey:l,img:i,imgLight:t,topTitle:a,topBar:c,children:u}=e,x=null!=t?t:i,v=()=>d.J.hideModal(l);return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"fixed z-[-1] inset-0 bg-black/60 backdrop-blur-[2px]"}),(0,s.jsxs)("div",{className:"relative w-[586px] flex flex-col sm:w-[calc(100vw-40px)] max-h-[70vh] sm:max-h-[75vh] rounded-[20px] bg-[var(--color-subcridet-modal-bg)] sm:bg-[var(--color-subcridet-modal-mobile-bg)] p-[20px] text-primary overflow-hidden",children:[i?(0,s.jsx)("div",{className:"absolute top-0 right-0 bottom-0 left-0",children:(0,o.SJ)(e=>(0,s.jsx)(n.e,{className:"",...e?i:x}))}):null,c||(0,s.jsxs)("div",{className:"relative flex justify-between",children:[a&&(0,s.jsx)("div",{className:"text-[22px] font-bold",children:a}),(0,o.SJ)(e=>(0,s.jsx)(n.e,{onClick:v,className:"w-[16px] h-[16px] ml-[10px] cursor-pointer",...e?r.M.iconBtnClose:r.M.iconBtnCloseLight}))]}),(0,s.jsx)("div",{className:"relative flex-1 overflow-y-auto min-h-0 touch-pan-y overscroll-contain [WebkitOverflowScrolling:touch] will-change-transform scrollbar-hide",style:{overscrollBehavior:"contain",WebkitOverflowScrolling:"touch",touchAction:"pan-y"},children:u||null})]})]})},m=[{id:0,desc:"ç²¾æä¹é¸",coins:100,price:20,oldPrice:""},{id:1,desc:"æåæ¡è¿ 10% OFF",coins:200,price:36,oldPrice:"40"},{id:2,desc:"è¶
å¼é¸æ 20% OFF",coins:300,price:48,oldPrice:"60"}],p=e=>{let{modalKey:l}=e,{t:i}=t.useContext(u.Fb),p=()=>d.J.hideModal(l),[g,f]=t.useState(m[2]),b=(0,a.Q)(),j=b.isMobile?r.M.imgCreditBg:r.M.imgCreditBgTab,w=b.isMobile?r.M.imgCreditBgLight:r.M.imgCreditBgTabLight;return(0,s.jsx)(v,{img:j,imgLight:w,modalKey:l,topBar:(0,s.jsxs)("div",{className:"relative flex justify-between text-primary",children:[(0,s.jsx)("div",{className:"text-[22px] font-bold",children:i("coins_plan")}),(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(x,{}),(0,o.SJ)(e=>(0,s.jsx)(n.e,{onClick:p,className:"w-[16px] h-[16px] ml-[10px] cursor-pointer",...e?r.M.iconBtnClose:r.M.iconBtnCloseLight}))]})]}),children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:"h-[11vh]"}),(0,s.jsx)("div",{className:"relative text-[22px] font-bold pb-[10px]",children:i("active_coins")}),(0,s.jsx)("div",{className:"relative text-[15px] pb-[20px]",children:i("active_coins_desc")}),m.map((e,l)=>{let i=l===g.id;return(0,s.jsxs)("div",{onClick:()=>f(e),className:"relative flex justify-between items-center text-primary p-[15px] mb-[20px] rounded-[20px] cursor-pointer",style:{background:"".concat(i?"rgba(255, 62, 0, 0.4)":"var(--color-subcridet-coinsitem-bg)"),border:"2px solid ".concat(i?"var(--color-select-orange)":"var(--color-subcridet-coinsitem-bg)")},children:[(0,s.jsx)("div",{className:"absolute text-[11px] px-[8px] py-[3px] top-[-12px] left-[12px] rounded-[24px] font-bold",style:{background:"".concat(i?"var(--color-select-orange)":"var(--color-primary)"),color:"".concat(i?"white":"var(--color-primary-inverse)")},children:e.desc}),(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(n.e,{className:"w-[24px] h-[24px]",...r.M.iconCoins}),(0,s.jsx)("div",{className:"text-[28px]",children:e.coins})]}),(0,s.jsxs)("div",{className:"text-right",children:[e.oldPrice&&(0,s.jsxs)("div",{className:"text-[var(--color-subcridet-coins-oldprice)] text-[15px] font-bold line-through decoration-[var(--color-select-orange)]",children:["HK$ ",e.oldPrice]}),(0,s.jsxs)("div",{className:"text-[22px] font-bold",children:["HK$ ",e.price]})]})]},l)}),(0,s.jsx)(c.YJ,{onClick:async()=>{h(i,"")},isActive:!0,className:"mt-[10px]",children:"購買 HK$".concat(g.price)}),(0,s.jsx)("div",{className:"text-[12px] mt-[10px] text-center",children:"æ¯çç´ 20 黿¸ï¼é»æ¸çµèº«ææ"}),(0,s.jsxs)("div",{className:"flex border-t-[1px] border-t-[var(--color-input-bg)] mt-[20px] pt-[20px]",children:[(0,s.jsx)("div",{className:"flex-1 text-center cursor-pointer",children:"Terms of Service"}),(0,s.jsx)("div",{className:"flex-1 text-center cursor-pointer",children:"Privacy Policy"})]})]})})},h=async(e,l)=>await d.J.confirm({icon:r.M.iconCoinsPop,title:e("use_coins_play"),message:e("use_coins_play_de
1sc"),confirmText:e("confirm_use")})},4076:(e,l,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/title/[id]",function(){return i(9486)}])},8211:(e,l,i)=>{"use strict";i(7876),i(4232),i(1841)},9486:(e,l,i)=>{"use strict";i.r(l),i.d(l,{__N_SSP:()=>P,default:()=>L});var s=i(7876),t=i(4232),r=i(8847),o=i.n(r),n=i(8297),a=i(1640),c=i(8707),d=i(1286),u=i(1841),x=i(7478),v=i(8167),m=i(9099),p=i(372),h=i(4074),g=i(9917),f=i(7715),b=i(5342),j=i(3235),w=i(7872),y=i(2752),N=i(9289),k=i(229),_=i(3535),C=i(5317),T=i(7999),E=i(9194);i(2774),i(8211),i(5976);let M=o()(()=>Promise.all([i.e(764),i.e(959)]).then(i.bind(i,9959)),{loadableGenerated:{webpack:()=>[9959]},ssr:!1,loading:()=>(0,s.jsx)("div",{children:"å è½½ææ¾å¨ä¸..."})});var P=!0;function L(e){let{title:l}=e,{loadMoreEpisodes:i,checkout:r,episode:o,nextEpisode:P,clearVodStore:L,fetchPostEpisodeHistory:I}=(0,b.v)(),D=(0,b.v)((0,w.k)(e=>{let{vodCheckout:l,setPlayHistory:i}=e;return{vodCheckout:l,setPlayHistory:i}})),[H,B]=t.useState(!1),[J,A]=t.useState(!1),[F,O]=t.useState(!1),K=null==l?void 0:l.name,R=S(l),z=R[0],V=R[1],W=null==l?void 0:l.synopsis,G=(0,c.Q)(),{t:Q,i18nt:U}=t.useContext(u.Fb),[$]=t.useState({effected:!1,playerInterval:null,seconds:300,currentDuration:0,currentHeadTime:0,showPlayer:!1,hasLogin:!1,nextEpisode:null,curCheckoutModel:null,trallerNotifier:new y.gT(!1)}),X=(0,m.useRouter)(),[Y,q]=t.useState(!1),[Z,ee]=t.useState(null),[el,ei]=t.useState(null),[es,et]=t.useState(0);t.useEffect(()=>{if(!$.effected&&(eN(),L(),l)){var e;$.effected=!0,l&&eg(l),h.D.fireProgramDetailScreenView(null!=(e=l.name.zh_hk)?e:"",l.id);let i=(0,v.gL)();i&&i.email?(A(!0),$.hasLogin=!0,eb(l.id)):$.hasLogin&&($.hasLogin=!1)}},[l]),t.useEffect(()=>()=>{en(),eo()},[]),t.useEffect(()=>{r&&ex(r)},[r]),t.useEffect(()=>{H?er():eo()},[H]);let er=()=>{!$.playerInterval&&$.seconds>0&&($.playerInterval=setInterval(()=>{$.seconds>0&&($.seconds=$.seconds-1),0==$.seconds&&($.seconds=300,$.currentHeadTime>0&&I($.currentHeadTime,$.currentDuration))},1e3))},eo=()=>{$.playerInterval&&(clearInterval($.playerInterval),$.playerInterval=null,$.seconds=300)};t.useEffect(()=>{$.nextEpisode=P},[P]),t.useEffect(()=>{if($.effected){let e=(0,v.gL)();e&&e.email&&ej(l.id)}return()=>{B(!1),eo(),L()}},[l]);let en=async()=>{$.showPlayer&&$.hasLogin&&$.currentHeadTime>5&&(I($.currentHeadTime,$.currentDuration),$.showPlayer=!1,$.currentDuration=0,$.currentHeadTime=0)},ea=async()=>{console.log("playNextEpisode=",$.nextEpisode),$.nextEpisode&&eu($.nextEpisode)},ec=async(e,l,i)=>{var s,t,r,o,n,a,c,d,u,x,v,m,p;let h=null==(s=e.series)?void 0:s.episode,g=null==(t=e.series)?void 0:t.videos,f=((null==l||null==(r=l.series)?void 0:r.episodes
1)||[]).filter(e=>e.id===h.id)[0];if(null==f){f=h;let l=null!=(d=null==e||null==(n=e.series)||null==(o=n.videos)?void 0:o.currentPlayHeadTIme)?d:0;(null==e||null==(c=e.series)||null==(a=c.videos)?void 0:a.duration)-l<2&&(l-=10),et(l),await eu(f,-1,!1,g)}else{let l=null!=(p=null==e||null==(x=e.series)||null==(u=x.videos)?void 0:u.currentPlayHeadTIme)?p:0;(null==e||null==(m=e.series)||null==(v=m.videos)?void 0:v.duration)-l<2&&(l-=10),et(l),await eu(f,-1,!1)}},ed=()=>{try{var e,l;let[i]=null!=(l=null==eh||null==(e=eh.series)?void 0:e.episodes)?l:null;i&&eu(i,-1)}catch(e){v.vF.log("playNowEvent==========err========",e)}},eu=async function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;console.log("handleEpisodeClick=",l),i&&0!=es&&et(0),q(!0),ee(null),(0,T.eG)(),await D.vodCheckout({titleId:eh.id,episode:e,program:eh,isAsc:"asc"==j.A.episodeOrder,video:s})},ex=async e=>{try{$.curCheckoutModel=e,$.adtag=await eP(o,e),B(!0),$.showPlayer=!0,ei(e.video.link)}catch(e){console.log("Error=",e)}finally{setTimeout(()=>{q(!1)},700)}},ev=()=>{J?ew?ec(ew,eh,ef):ed():(0,f.AR)(em,ed)},em=()=>{X.replace((0,T.Gc)(X))},{program:ep,detail:eh,setDetail:eg,isAsc:ef,checkFavouriteStatus:eb,checkHistoryStatus:ej,historyItem:ew,programList:ey,storeClean:eN}=(0,d.Q)(null==l?void 0:l.id)(),ek=t.useCallback(e=>{if(e===(null==ep?void 0:ep.id))return globalThis.location.reload();en(),B(!1),ei(""),$.effected=!1,X.push("/title/".concat(e));let l=globalThis.document.querySelector("#hoy-logo a");null==l||l.focus(),null==l||l.blur()},[ep]),e_=t.useMemo(()=>(0,s.jsx)(a.bE,{pushProgramDetail:ek,title:l,categoryBannerData:V},"".concat(null==l?void 0:l.id,"-bottom-list")),[]),eC=(null==l?void 0:l.thumbnail_orientation)=="portrait";t.useEffect(()=>{$.trallerNotifier.value=!!(null==l?void 0:l.previewVideoURL)},[l]);let eT=t.useMemo(()=>(0,s.jsx)("div",{className:"bg-[lightgreen]/30 rounded aspect-video max-h-fit rounded-[15px] overflow-hidden",children:(0,s.jsx)(M,{steam_url:null==l?void 0:l.previewVideoURL,playerListener:{onFinished:()=>{$.trallerNotifier.value=!1}}})}),[l]),eE=t.useMemo(()=>eC?(0,s.jsx)(a.j0,{images:null==l?void 0:l.images_portrait}):(0,s.jsx)(a.fY,{images:null==l?void 0:l.images}),[l]),eM=t.useMemo(()=>(0,s.jsx)(y.y0,{valueListener:$.trallerNotifier,render:e=>e?eT:eE}),[l]),eP=async(e,i)=>{var s,t,r,o;let a=(0,N.NR)({titleID:null==l?void 0:l.id,episodeNo:null==e?void 0:e.no,videoId:null==e?void 0:e.id,isPortrait:eC,collection:((null==i||null==(s=i.title)?void 0:s.collections)||[]).map(e=>{var l;return null==e||null==(l=e.name)?void 0:l.en}).join(","),categories:((null==i||null==(t=i.title)?void 0:t.categories)||[]).map(e=>e.id).join(","),userID:null==(r=k.f.getCurrentAsync())?void 0:r.uid,aid:(0,N.VD)()||"x",uid2:null!=(o=n.K?await n.K.getAdToken():void 0)?o:"x"});return v.vF.tagLog("INSTREAM-AD")("=======================generateADTag"),a};return l?(0,s.jsx)("div",{className:"w-[100vw] h-[100vh]",children:(0,s.jsx)(x.Layout,{title:"".concat(l.name.zh_hk," | ").concat(Q("hoy_program")),metadata:(0,p.uJ)(l),children:(0,s.jsxs)("div",{className:"w-full sm:px-[5.33vw] md:px-[4.69vw] lg:px-[11.04vw] bg-background min-h-[100vh] overflow-hidden",children:[(0,s.jsxs)("div",{className:"w-full flex flex-row pt-[100px] ".concat(G.isMobile?"pb-[20px]":"pb-[15px] min-h-[80vh]"),children:[(0,s.jsxs)("div",{className:"flex flex-1 w-full min-h-full bg-[yellow]/0 flex-col",children:[H?(0,s.jsx)("div",{className:"bg-[black] rounded aspect-video max-h-fit relative",children:(0,s.jsx)(E.J,{children:(globalThis.google&&globalThis.google.ima,(0,s.jsx)(M,{steam_url:el,adsTagurl:$.adtag,seekHistoryTime:es,playerListener:{onStart:()=>{setTimeout(()=>{(0,C.y)($.curCheckoutModel,o,U)},1e3)},onPlay:()=>{},onPause:(e,l,i)=>{if($.currentHeadTime>1)return void I($.currentHeadTime,$.currentDuration);e>4&&l>0&&I(e,l)},onTimeUpdate:e=>{try{var l,i;let s=null==e||null==(l=e.target)?void 0:l.currentTime,t=null==e||null==(i=e.target)?void 0:i.duration;s>=0&&($.currentHeadTime=s,$.currentDuration=t)}catch(e){}}},nextEpisode:ea}))})}):eM,(0,s.jsx)(a.mf,{title:l,titleName:K,categoryStr:z,titleSynopsis:W,responsive:G,hasLogin:J,showPlayer:H,onWatchNowBtnClick:ev,isPay:F}),(0,s.jsx)(E.J,{children:G.isMobile&&!H&&!F&&(0,s.jsx)("div",{className:"mt-[15px]",children:(0,s.jsx)(a.WS,{title:l,responsive:G,hasLogin:J,onClick:ev})})}),(0,s.jsx)(a.r7,{title:l,hasLogin:J,onLoginEvent:em})]},"detail-pi-".concat(l.id)),(0,s.jsx)(E.J,{children:!G.isMobile&&(eh?(0,s.jsx)("div",{className:"sm:w-full md:w-[373px] lg:w-[416px] overflow-hidden",children:(0,s.jsx)(g.i,{title:eh,responsive:G,onEpisodeItemClicked:eu,loading:Y})}):(0,s.jsx)("div",{className:"sm:w-full md:w-[373px] lg:w-[416px] h-[1px] overflow-hidden"}))})]}),G.isMobile&&eh&&(0,s.jsx)("div",{className:"mr-4 overflow-hidden pb-[30px]",children:(0,s.jsx)(g.i,{title:eh,responsive:G,onEpisodeItemClicked:eu,loading:Y})}),(0,s.jsxs)("div",{children:[ey.length>0&&(0,s.jsx)("div",{className:"text-[28px] text-primary font-bold",children:Q("recommendation")}),(0,s.jsx)(E.J,{children:(0,s.jsxs)("div",{className:"w-full bg-background flex flex-row",children:[ey.length>0&&e_,!G.isMobile&&(0,s.jsx)("div",{className:"h-[20px] sm:w-full md:w-[373px] lg:w-[21.67vw] overflow-hidden"})]})})]})]})})}):(0,s.jsx)("div",{className:"w-[100vw] h-[100vh] bg-[#151519]",children:(0,s.jsx)(x.Layout,{children:(0,s.jsx)("div",{className:"min-h-[80vh]",children:(0,s.jsx)(_.x,{t:Q,textColor:"text-[white]"})})})})}let S=e=>{let l="",i="";return e&&null!=e.categories&&e.categories.length>
10&&e.categories.forEach(e=>{""==l?(l=e.name.zh_hk,i=e.id):(l=l+" | "+e.name.zh_hk,i=i+","+e.id)}),[l,i]}}},e=>{e.O(0,[127,777,478,622,636,593,792],()=>e(e.s=4076)),_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.