1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[522],{2939:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return _}});var r=n(7812),o=n(9499),a=n(1163),i=n(7294),s=n(9008),c=n.n(s),l=n(9669),d=n.n(l),u=n(2154),f=n(3967),m=n(4576),h=n(3829),p=n(8046),g=n(4323),y=n(5893);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=!0;t.default=function(e){var t=e.defaultMetaTagData,n=(0,i.useState)(""),o=n[0],s=n[1],l=(0,a.useRouter)().query,v=l.pageSection,_=l.category,x=void 0===_?"":_,b=l.sort,w=void 0===b?"":b,C=(0,i.useState)(v),O=(C[0],C[1]),P=(0,i.useState)(t),k=P[0],N=(P[1],(0,i.useState)({section:v,category:x,sort:w,offset:0,limit:p.ui})),S=N[0],E=N[1],A=(0,i.useState)([]),D=A[0],Z=A[1],T=(0,i.useState)(!1),U=T[0],L=T[1];return(0,i.useEffect)((function(){window.document.addEventListener("scroll",(0,g.G)((function(){window.innerHeight+Math.ceil(window.pageYOffset)>=document.body.offsetHeight&&E((function(e){var t=e.offset+e.limit,n=j({},e);return D.length===t?(n.offset=t,n):e}))}),{}))}),[D]),(0,i.useEffect)((function(){console.log("\ud83d\udd04 pageQueryParams changed:",S);var e=(0,h.j)(S.offset,S.sort,S.section,S.category),t={method:"get",url:e.href,timeout:3e3};L(!0),d()(t).then((function(t){var n=t.data.map((function(e){var t=S.category||"total",n=S.sort;return{type:"poster",img:e.pgm_img_url,info:{title:e.pgm_nm},label:[],link:e.link_url,isNew:"Y"===e.new_yn,data:{pgm_nm:e.pgm_nm},isfree:e.free_part_yn,relateType:"tv_free",link_new_yn:e.link_new_yn,clickParams:"div=tv_".concat(t,"_").concat(n)}})),o=Number.parseInt(e.searchParams.get("offset"))||0;Z(0===o?n:function(e){return[].concat((0,r.Z)(e),(0,r.Z)(n))})})).catch((function(e){console.error("API error:",e)})).finally((function(){L(!1)}))}),[S]),(0,y.jsxs)("div",{className:"contents",children:[(0,y.jsxs)(c(),{children:[(0,y.jsx)("link",{rel:"stylesheet",href:"".concat("/styles/2021/pc/sbsmain-2021-pc-0.0.1.min.css","?v=").concat("1789365220659")},"css_pc_url"),(0,y.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"},"viewport"),(0,y.jsx)("script",{type:"text/javascript",src:"//static.cloud.sbs.co.kr/common/js/sbs-gnb-app-4.0.0.min.js"},"gnb_js_url"),(0,y.jsx)("meta",{name:"description",content:k.shareDescription}),(0,y.jsx)("meta",{name:"keywords",content:k.keywords}),(0,y.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,y.jsx)("meta",{property:"og:type",content:"website"}),(0,y.jsx)("meta",{property:"og:locale",content:"ko_KR"}),(0,y.jsx)("meta",{property:"og:site_name",content:"SBS"}),(0,y.jsx)("meta",{property:"og:title",content:k.shareTitle||""}),(0,y.jsx)("meta",{property:"og:description",content:k.shareDescription||""}),(0,y.jsx)("meta",{property:"og:image",content:k.shareImageUrl||""}),(0,y.jsx)("meta",{property:"og:url",content:k.currentUrl||""}),(0,y.jsx)("meta",{name:"nate:site_name",content:"SBS"}),(0,y.jsx)("meta",{name:"nate:title",content:k.shareTitle||""}),(0,y.jsx)("meta",{name:"nate:description",content:k.shareDescription||""}),(0,y.jsx)("meta",{name:"nate:image",content:k.shareImageUrl||""}),(0,y.jsx)("meta",{name:"nate:url",content:k.currentUrl||""}),(0,y.jsx)("title",{children:k.shareTitle})]}),(0,y.jsxs)("div",{role:"main",id:"container",className:"tv_listcontents_wrap",children:[(0,y.jsx)(u.Z,{sectionCode:v,categoryCode:x,sortCode:w,onChange:function(e){var t=e.sectionCode,n=void 0===t?"":t,r=e.categoryCode,o=void 0===r?"":r,a=e.sortCode,i=void 0===a?"":a;console.log("onPageQueryParamsChanged \u2192",{sectionCode:n,categoryCode:o,sortCode:i}),s(function(e){switch(e){case"new":return"\ucd5c\uc2e0";case"top":return"\uc778\uae30";case"abc":return"\uac00\ub098\ub2e4";case"theme":return"\ucd94\ucc9c";case"all":return"\uc804\uccb4";case"N":return"\ubc29\uc601 \uc608\uc815";case"Y":return"\ubc29\uc601 \uc911";default:return""}}(i));var c={section:n,category:o,sort:i,offset:0,limit:p.ui};E(c),O(n)}}),(0,y.jsx)("div",{className:"contents_area_tvlist",children:(0,y.jsxs)("div",{className:"tv_list_w",children:[(0,y.jsx)("h3",{className:"hide",children:o}),(0,y.jsx)("ul",{className:"tv_list_inner",children:D.map((function(e,t){return(0,y.jsx)("li",{className:"tv_list_cont",children:(0,y.jsx)(f.Z,j({view:!0},e))},t)}))})]})}),U&&(0,y.jsx)(m.Z,{})]})]})}},3829:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var r=n(3008),o=n(8046),a=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.m4,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:o.ui,l=!s,d=r.es.findIndex((function(e){return e.code===i}));d<0&&(d=0);var u,f=r.es[d],m=r.gy[f.sortType],h=new URL("https://apis.sbs.co.kr/main-api/section/"),p=l?f.api.subPath.all:f.api.subPath.category;if(h.pathname+=p,m&&Array.isArray(m.searchParamList)&&m.searchParamList.length>0&&(u=a?m.searchParamList.find((function(e){return e.code===a})):m.searchParamList[0]),f.api.pgmSct&&h.searchParams.set("pgm_sct",f.api.pgmSct),s)try{var g=f.category.find((function(e){return e.code===s})),y=g.relatedCategory,v=g.pgmSct||"";
1v&&h.searchParams.set("pgm_sct",v),y.forEach((function(e){h.searchParams.append("thema_cd",e)}))}catch(j){}return null!==(e=u)&&void 0!==e&&e.isSkipParam||null===(t=u)||void 0===t||!t.code||h.searchParams.set(m.searchParamKey,u.code),h.searchParams.set("offset",n),h.searchParams.set("limit",c),h}},4576:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});n(7294);var r=n(5893);function o(){return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"module_loading_w",children:[(0,r.jsx)("div",{className:"loading1"}),(0,r.jsx)("div",{className:"loading2"}),(0,r.jsx)("div",{className:"loading3"})]})})}},2154:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(7294),o=n(3008),a=n(1664),i=n.n(a),s=n(5893);var c=n(9499),l=n(1163);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,c.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t,n){var o=(0,r.useState)(!1),a=o[0],c=o[1],d=(0,r.useState)(null),f=d[0],m=d[1],h=(0,l.useRouter)(),p=(0,r.useState)(""),g=p[0],y=p[1],v=function(t){"function"===typeof e.onChange&&e.onChange(t),m(t)};return(0,r.useEffect)((function(){e.data.map((function(t,n){t.code===e.categoryCode&&y(t.text)}))}),[]),(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"category_linkselect_w ".concat(a?"current":""),onClick:function(){return c(!a)},onMouseLeave:function(){return c(!1)},children:[(0,s.jsx)("h3",{className:"cl_title",id:"dropdown-box",children:(0,s.jsxs)("a",{className:"cl_link",role:"button","aria-labelledby":f?f.text:e.data[0].text,"aria-expanded":"".concat(a?"true":"false"),href:"#",children:[(0,s.jsx)("span",{className:"cl_link_text",children:f?f.text:g}),(0,s.jsx)("i",{className:"category_icon_arrow",children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"6",viewBox:"0 0 10 6",children:(0,s.jsx)("path",{className:"a",d:"M11.189,13.055l3.781,3.971a.688.688,0,0,0,1.009,0,.783.783,0,0,0,0-1.062l-4.284-4.5a.689.689,0,0,0-.985-.022L6.4,15.961a.781.781,0,0,0,0,1.062.688.688,0,0,0,1.009,0Z",transform:"translate(-6.188 -11.246)"})})})]})}),(0,s.jsx)("div",{className:"category_linkselect_inner",children:(0,s.jsx)("ul",{className:"cl_list",role:"listbox","aria-labelledby":"dropdown-box",children:e.data.map((function(e,t){var n,r,o,c=null!==(n=e.link)&&void 0!==n&&n.outUrl?{pathname:e.link.outUrl}:{pathname:h.pathname,query:u(u({},h.query),null===e||void 0===e||null===(r=e.link)||void 0===r?void 0:r.query)},l=!(null===(o=e.link)||void 0===o||!o.outUrl);return(0,s.jsx)("li",{role:"option",className:"cll_inner",onClick:function(){return v(e)},onKeyUp:function(t){13===t.keyCode&&v(e)},children:l?(0,s.jsx)("a",{className:"cll_link",href:"#",children:e.text}):(0,s.jsx)(i(),{href:c,children:(0,s.jsx)("a",{className:"cll_link",href:"#",style:{display:a?"":"none"},children:e.text})})},"dropdown_item_".concat(t))}))})})]})})};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var h=function(e){e.sectionCode,e.categoryCode,e.sortCode;var t=e.sorts,n=e.currentCode,o=e.onChange,a=(e.pageChange,(0,l.useRouter)()),d=t.find((function(e){return"top"===e.code}))||(Array.isArray(t)&&t.length>0?t[0]:{}),u=(0,r.useState)(n||(Array.isArray(t)&&t.length>0?t[0].code:"")),f=u[0],h=u[1];(0,r.useEffect)((function(){h(d.code),"function"===typeof o&&o(d.code)}),[d]);var p=function(e,t){"function"===typeof o&&o(e.code),h(e.code)};return(0,s.jsx)("div",{className:"sorting_btn_w",children:t.map((function(e,t){var n=e.link,r=e.text,o=e.code,l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?m(Object(n),!0).forEach((function(t){(0,c.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a.query);return l.sort=n,(0,s.jsx)(i(),{href:{pathname:a.pathname,query:l},children:(0,s.jsx)("a",{className:"sorting_btn_cont ".concat(f===o&&"current"),title:"".concat(f===o?"\uc120\ud0dd\ub428":"\uc120\ud0dd\uc548\ub428"),role:"link",onClick:function(){return p({link:n,text:r,code:o})},onKeyUp:function(e){13===e.keyCode&&p({link:n,text:r,code:o})},children:(0,s.jsx)("span",{className:"sorting_btn_text ",children:r})})},"sort_category_item_".concat(t))}))})};var p=function(e){var t,n,o=e.sectionCode,a=e.categories,i=e.categoryCode,c=e.sorts,l=e.sortCode,d=e.onChange,u=e.pageChange,m=(0,r.useState)(i||(Array.isArray(a)&&a.length>0?null===(t=a[0])||void 0===t?void 0:t.code:"")),p=m[0],g=m[1],y=(0,r.useState)(l||(Array.isArray(c)&&c.length>0?null===(n=c[0])||void 0===n?void 0:n.code:"")),v=y[0],j=y[1];return(0,r.useEffect)((function(){"function"===typeof d&&d({categoryCode:p,sortCode:v})}),[p,v]),(0,s.jsxs)("div",{className:"category_list_w",children:[Array.isArray(a)&&a.length>0&&(0,s.jsx)(f,{data:a,sectionCode:o,categoryCode:i,onChange:function(e){g(e.code)}}),Array.isArray(c)&&c.length>0&&(0,s.jsx)(h,{sectionCode:o,categoryCode:i,sortCode:v,pageChange:u,sorts:c,onChange:function(e){j(e)}})]})};var g=function(e){var t,n=e.sectionCode,a=void 0===n?o.m4:n,i=e.categoryCode,c=e.sortCode,l=e.onChange,d=o.es.find((function(e){return e.code===a})),u=(0,r.useState)(d),f=u[0],m=(u[1],(0,r.useState)({categoryCode:"",sortCode:""})),h=(m[0],m[1],(0,r.useState)(!1)),g=h[0],y=(h[1],(0,r.useState)("")),v=(y[0],y[1]),j=(0,r.useState)("/html/pc/tv.htm"),_=j[0],x=j[1];return(0,r.useEffect)((function(){var e=window.location.pathname.split("/").filter(Boolean),t=e[e.length-1];switch(v(t),t){case"drama":x("/html/pc/tv_drama.htm");break;case"enter":x("/html/pc/tv_enter.htm");break;case"culture":x("/html/pc/tv_culture.htm");break;case"sports":x("/html/pc/tv_sports.htm");break;case"free":x("/html/pc/tv_free.htm");break;default:x("/html/pc/tv.htm")}}),[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{className:"hide",children:"TV"}),(0,s.jsx)("div",{className:"contents_side_ad",children:(0,s.jsx)("div",{className:"side_ad_inner",children:(0,s.jsx)("iframe",{title:"\ubc30\ub108\uad11\uace0",display:"block",src:_,width:"120px",height:"247px",scrolling:"no",frameBorder:"0",align:"middle",marginWidth:"0",marginHeight:"0"})})}),(0,s.jsx)("div",{className:"contents_side_ad sideAd_right",children:(0,s.jsx)("div",{className:"side_ad_inner",children:(0,s.jsx)("iframe",{title:"\ubc30\ub108\uad11\uace0",display:"block",src:"/html/pc/tv_right.htm",width:"120px",height:"600px",scrolling:"no",frameBorder:"0",align:"middle",marginWidth:"0",marginHeight:"0"})})}),(0,s.jsx)("div",{className:"contents_area_sorting",children:(0,s.jsx)(p,{sectionCode:a,categories:null===f||void 0===f?void 0:f.category,categoryCode:i,sorts:null===(t=o.gy[null===f||void 0===f?void 0:f.sortType])||void 0===t?void 0:t.searchParamList,sortCode:c,onChange:function(e){var t=e.sectionCode,n=void 0===t?null===f||void 0===f?void 0:f.code:t,r=e.categoryCode,o=void 0===r?"":r,a=e.sortCode;l({sectionCode:n,categoryCode:o,sortCode:void 0===a?"":a})},pageChange:g})})]})}},4323:function(e,t,n){"use strict";function r(e,t){var n=t.dismissCondition,r=void 0===n?function(){return!1}:n,o=t.triggerCondition,a=void 0===o?function(){return!0}:o;if(!e)throw Error("Invalid required arguments");var i=!1;return function(t){if(!i)return i=!0,window.requestAnimationFrame((function(){if(!r())return a()?(i=!1,e()):void 0;i=!1}))}}n.d(t,{G:function(){return r}})},7726:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tv/[pageSection]",function(){return n(2939)}])},7812:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(2587);var o=n(2937);function a(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}}},function(e){e.O(0,[9669,5675,8970,9774,2888,179],(function(){return t=7726,e(e.s=t);var t}));var t=e.O();_N_E=t}]); 2//# sourceMappingURL=[pageSection]-d4a7a4ff3f0a7801.js.map
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.