"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[3255],{14363:(e,t,o)=>{o.d(t,{f:()=>d});var n=o(2787),r=o(40099),i=o(30600),l=o(88091),a=o(62186),s=o(72153);const c=(0,a.default)("div",{target:"ea9s2gj0"})((({theme:{colors:e}})=>[{width:"48px",height:"48px",borderRadius:"24px",backgroundColor:e.BGPlaceholderDefault,marginBottom:"32px"},(0,s.jJ)({max:l.f5.Small,style:{width:"32px",height:"32px"}})]),"label:ActionItemPlaceHolder;"),d=({num:e=5})=>{const t=(0,r.useMemo)((()=>Array.from({length:e},((e,t)=>(0,n.Y)(c,{},`action-item-placeholder_${t}`)))),[e]);return(0,n.Y)(i.G5,{style:{justifyContent:"center"},children:t})}},30600:(e,t,o)=>{o.d(t,{G5:()=>i});var n=o(75431),r=o(62186);o(10594);const i=(0,r.default)("section",{target:"ees02z00"})((()=>[{display:"flex",flexDirection:"column",alignItems:"center",gridArea:"action-bar"}]),"label:SectionActionBarContainer;");(0,n.i7)({"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.67)"},"100%":{transform:"scale(1)"}}),(0,n.i7)({"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.33)"},"100%":{transform:"scale(1)"}})},14281:(e,t,o)=>{o.d(t,{X:()=>f});var n=o(2787),r=o(40099),i=o(62186),l=o(72153);const a=(0,i.default)("div",{target:"e1tlw9r90"})((({center:e})=>[{display:"flex",marginRight:"68px",paddingTop:"24px"},e?{marginRight:"0px",margin:"0 auto"}:null]),"label:DivOneColSkeletonContainer;"),s=(0,i.default)("div",{target:"e1tlw9r91"})({width:"56px",height:"56px",flex:"0 0 56px",borderRadius:"100%"},(({theme:{direction:e,colors:t}})=>Object.assign({background:t.BGPlaceholderDefault},(0,l.mp)({direction:e,marginEnd:"12px"}))),(0,l.jJ)({max:479,style:{display:"none"}}),"label:DivOneColSkeletonAvatar;"),c=(0,i.default)("div",{target:"e1tlw9r92"})({display:"flex",flexDirection:"row",alignItems:"center",[`${s}`]:{width:"40px",height:"40px",flex:"0 0 40px",display:"none"}},(0,l.jJ)({max:479,style:{[`${s}`]:{display:"block"}}}),"label:DivOneColSkeletonContentContainer;"),d=(0,i.default)("div",{target:"e1tlw9r93"})({paddingTop:"10px",flex:"1 1 auto"},"label:DivOneColSkeletonWrapper;"),u=(0,i.default)("div",{target:"e1tlw9r94"})((({styles:{width:e,marginBottom:t,marginTop:o},theme:n})=>({width:e,marginBottom:t,marginTop:o,maxWidth:"100%",height:"16px",background:n.colors.BGPlaceholderDefault,borderRadius:"2px"})),"label:DivOneColSkeletonContent;"),p={width:"200px",marginBottom:"6px"},g={width:"160px"},m={width:"478px",marginBottom:"5px",marginTop:"15px"},_={width:"478px",marginBottom:"0px"},f=(0,r.memo)((function({center:e,style:t}){return(0,n.FD)(a,{style:t,center:e,children:[(0,n.Y)(s,{}),(0,n.FD)(d,{children:[(0,n.FD)(c,{children:[(0,n.Y)(s,{}),(0,n.FD)("div",{children:[(0,n.Y)(u,{styles:p}),(0,n.Y)(u,{styles:g})]})]}),(0,n.Y)(u,{styles:m}),(0,n.Y)(u,{styles:_})]})]})}))},78787:(e,t,o)=>{o.d(t,{U:()=>u});var n=o(2787),r=o(88920),i=o(14281),l=o(14363),a=o(62186);const s=(0,a.default)("div",{target:"eeqkilz0"})((()=>[{height:"100%",margin:"0 auto",paddingTop:"24px",display:"flex",alignItems:"end",gap:"16px"}]),"label:DivOneColSkeletonContainer;"),c=(0,a.default)("div",{target:"eeqkilz1"})((({theme:{colors:e}})=>[{height:"100%",aspectRatio:"9 / 16",borderRadius:"16px",backgroundColor:e.BGPlaceholderDefault}]),"label:DivOneColSkeletonCard;"),d=({style:e})=>(0,n.FD)(s,{style:e,children:[(0,n.Y)(c,{}),(0,n.Y)(l.f,{num:5})]}),u=()=>{const{isInProductHoldout:e}=(0,r.Vv)();return e?(0,n.Y)(i.X,{}):(0,n.Y)(d,{})}},17437:(e,t,o)=>{o.d(t,{Cj:()=>r,WI:()=>i,hg:()=>n});const n=96,r=[{text:"pc_web_explorePage_all",name:"All",type:120},{text:"pc_web_explorePage_topics_singing_dancing",name:"Singing & Dancing",type:119},{text:"pc_web_explorePage_topics_comedy",name:"Comedy",type:104},{text:"pc_web_explorePage_topics_sports",name:"Sports",type:112},{text:"pc_web_explorePage_topics_anime_comics",name:"Anime & Comics",type:100},{text:"pc_web_explorePage_topics_relationship",name:"Relationship",type:107},{text:"pc_web_explorePage_topics_shows",name:"Shows",type:101},{text:"pc_web_explorePage_topics_lipsync",name:"Lipsync",type:110},{text:"pc_web_explorePage_topics_daily_life",name:"Daily Life",type:105},{text:"pc_web_explorePage_topics_beauty_care",name:"Beauty Care",type:102},{text:"pc_web_explorePage_topics_games",name:"Games",type:103},{text:"pc_web_explorePage_topics_society",name:"Society",type:114},{text:"pc_web_explorePage_topics_outfit",name:"Outfit",type:109},{text:"pc_web_explorePage_topics_cars",name:"Cars",type:115},{text:"pc_web_explorePage_topics_food",name:"Food",type:111},{text:"pc_web_explorePage_topics_animals",name:"Animals",type:113},{text:"pc_web_explorePage_topics_family",name:"Family",type:106},{text:"pc_web_explorePage_topics_drama",name:"Drama",type:108},{text:"pc_web_explorePage_topics_fitness_health",name:"Fitness & Health",type:117},{text:"pc_web_explorePage_topics_education",name:"Education",type:116},{text:"pc_web_explorePage_topics_technology",name:"Technology",type:118}];var i;!function(e){e.NORMAL="0",e.NEW="1",e.HOT="2",e.RECOM="3",e.EXCLUSIVE="4",e.LOCAL="5",e.BURST="6",e.BOIL="7",e.WENDA_CLUE="8",e.LONG_VIDEO="9",e.LIVE="10",e.UPDATE="15",e.BUBBLE_WORDS="16",e.SAV="17",e.MUSIC="18",e.SEARCH_AGAIN="19",e.COUPON="20"}(i||(i={}))},25778:(e,t,o)=>{o.d(t,{C1:()=>E,E0:()=>P,Ys:()=>O,b1:()=>D,pn:()=>S,tZ:()=>k});var n=o(40099),r=o(58305),i=o(45297),l=o(19442),a=o(44926),s=o(49730),c=o(32862),d=o(88920),u=o(60484),p=o(48615),g=o(49057),m=o(71281),_=o(93608),f=o(94294),v=o(30085),y=o(79995),h=o(96563),x=o(32125),b=o(48977),w=o(97515),C=o(17437),L=function(e,t,o,n){return new(o||(o=Promise))((function(r,i){function l(e){try{s(n.next(e))}catch(e){i(e)}}function a(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(l,a)}s((n=n.apply(e,t||[])).next())}))};const E=e=>{const{currentCategoryType:t,currentCategory:o}=(0,w.eO)((e=>({currentCategoryType:e.currentCategoryType,currentCategory:e.currentCategory})),x.bN),[r,i]=(0,v.V2)((t=>{var o,n,r,i,l,a;return{loading:null!==(n=null===(o=t[null!=e?e:0])||void 0===o?void 0:o.loading)&&void 0!==n&&n,hasMore:null===(i=null===(r=t[null!=e?e:0])||void 0===r?void 0:r.hasMore)||void 0===i||i,list:null!==(a=null===(l=t[null!=e?e:0])||void 0===l?void 0:l.list)&&void 0!==a?a:[]}}),x.bN),[l,a]=(0,y.IO)((e=>({loading:e.loading,hasMore:e.hasMore,list:e.list})),x.bN),{loading:s,hasMore:c,list:d}=void 0!==e?r:l,u=void 0!==e?i:a,p=(0,n.useRef)(void 0);return(0,n.useCallback)((()=>{s||(!c||d.length>=200?p.current!==t&&(f.H.handleBottomNoMoreVideosShow({tab_name:o}),p.current=t):(f.H.handleExploreLoadMore({enter_from:`category_${o}`}),u.getExploreList({categoryType:null!=e?e:t})))}),[s,c,d.length,u,e,t,o])};function O(){const[{mute:e},t]=(0,w.g_)((e=>({mute:e.mute})),x.bN);(0,n.useEffect)((()=>{const e=(0,r._S)(i.y3);e?t.setMute(Number(e)>0):t.setMute(!1)}),[]);const o=(0,n.useCallback)((o=>{o.preventDefault(),o.stopPropagation(),(0,r.AP)(i.y3,e?"0":"1"),t.setMute(!e)}),[t,e]);return{mute:e,handleToggleMute:o,volume:.7}}function D(e,t){const o=(0,w.eO)((e=>e.currentCategory),x.bN);return 19!==t?null:{enter_method:"category_video_display",enter_tab:o,diversify_id:null==e?void 0:e.diversificationId}}function P(){return(0,n.useMemo)((()=>({enter_from:"explore_page",search_position:"explore_page",words_source:"explore_all",words_type:"explore_all",group_id:"",previous_page:_.f.commonParams.previous_page})),[])}function S(e){var t;const{enterIndex:o}=(0,l.JD)((e=>({enterIndex:e.enterIndex})),x.bN),{enterItemId:r}=(0,a.d8)((e=>{var t;return{enterItemId:null!==(t=e.browserList[o])&&void 0!==t?t:""}}),x.bN),i=E(e),d=(0,b.Ft)(),u=(0,h.ND)(),p=(0,s.sL)(),[g,m]=(0,n.useState)(!1),_=(0,n.useCallback)((e=>L(this,void 0,void 0,(function*(){yield u.getRelatedList({itemId:e})}))),[u]),f=null!==(t=(0,c.GA)("browser_content_logic"))&&void 0!==t?t:"v1",v=(0,n.useMemo)((()=>{const e=[{itemListKey:"explore",limit:1}];return"v1"!==f&&"v4"!==f&&e.push({itemListKey:"video",limit:4}),"v2"===f||"v4"===f?(e.push({itemListKey:"foryou",limit:1/0}),e.push({itemListKey:"explore",limit:1/0})):e.push({itemListKey:"explore",limit:1/0}),{sources:e}}),[f]);return(0,n.useEffect)((()=>()=>{u.resetRelatedList(),p.resetRecommendList({loading:!1}),m(!1)}),[u,p,r]),{loadMoreConfig:v,loadMoreHandler:(0,n.useCallback)((e=>{switch(e){case"explore":default:i();break;case"video":if(g)return!1;m(!0),_(r);break;case"foryou":d()}return!0}),[i,_,d,r,g])}}const k=()=>{var e;const{maxCategories:t}=(0,d.ry)(),{config:o}=(0,u.L$)((0,p.U)((()=>["config"]),[])),{exploreCategoryList:r}=(0,u.L$)(o),{abTestVersion:i}=(0,u.L$)((0,g.W)((()=>["abTestVersion"]),[])),l=null!==(e=(0,m.qt)(i,"explore_category_ranking"))&&void 0!==e?e:"v0";let a=C.Cj;r&&r[l]&&(a=r[l]);const s=a.slice(0,t).map((e=>Object.assign(Object.assign({},e),{type:Number(e.type)})));return(0,n.useMemo)((()=>s),[])}},97515:(e,t,o)=>{o.d(t,{eO:()=>s,g_:()=>a});var n=o(14374),r=o(71111),i=o(31209);const l=(0,n._)((0,r.atom)({currentCategory:"",currentCategoryType:0,mute:!0}),{rehydrationKey:"desktop.explorePage.root"});l.debugLabel="exploreAtom";const{useAtomService:a,useServiceState:s,useServiceDispatchers:c}=(0,i.i)(l,((e,t)=>({setCurrentCategory(e){t(l,(t=>Object.assign(Object.assign({},t),{currentCategory:e})))},setCurrentCategoryType(e){t(l,(t=>Object.assign(Object.assign({},t),{currentCategoryType:e})))},setMute(e){t(l,(t=>Object.assign(Object.assign({},t),{mute:e})))}})))},48977:(e,t,o)=>{o.d(t,{$h:()=>I,Bj:()=>Y,Ft:()=>B,LB:()=>V,Nc:()=>A,eF:()=>F});var n=o(2787),r=o(40099),i=o(11060),l=o(99789),a=o.n(l),s=o(4474),c=o(60144),d=o(60484),u=o(49057),p=o(49730),g=o(45266),m=o(19442),_=o(45212),f=o(97086),v=o(30247),y=o(36272),h=o(67842),x=o(43626),b=o(25616),w=o(32744),C=o(52333),L=o(82715),E=o(41271),O=o(97071),D=o(8046),P=o(14107),S=o(21367),k=o(78787),T=o(13544),M=o(28369),R=o(934),N=o(16085),j=o(32125);function B(){const{pathname:e}=(0,i.zy)(),{streamDeviceType:t}=(0,c.A)(),{user:o,abTestVersion:n,language:l}=(0,d.L$)((0,u.W)((()=>["user","language","abTestVersion"]),[])),[a,s]=(0,p.NY)((e=>null!=e?e:{list:[],loading:!1,hasMore:!0}),[]),{loading:h,hasMore:x}=a,b=(0,g.s)(),w=(0,m.JD)((e=>e.showingBrowserMode)),C=(0,N.Z9)((e=>e.isOpen)),E=C?"immersive_player":w?"browser_mode":"one_column",{fypFeederItemId:O}=(0,R.ip)(),{enableVVAvgPerDayStrategy:D,defaultRecommendFetchCount:P}=(0,_.id)();return(0,r.useCallback)(((r=!1,i)=>{var a,c;if((h||!x)&&!r)return;const d=(0,f.fU)()?"":(0,v.ey)(),u=(0,y.tR)().getPortraitTarget("vv_avg_per_day");s.getRecommendList({key:"foryou",routeName:null!==(c=null===(a=(0,L.jN)(e))||void 0===a?void 0:a.name)&&void 0!==c?c:L.eU.foryou,user:o,abTestVersion:n,language:l,fromPage:"fyp",watchLiveLastTime:d,device_type:t,ttamParams:b,playModeForTea:E,fypFeederItemId:O,sideEffect:i,fetchCount:D?u:P})}),[n,s,x,t,l,h,e,o,b,E,O])}function I(){const e=(0,p.Lu)((e=>null!=e?e:{list:[],loading:!1,hasMore:!0,statusCode:0}),[]),t=(0,h.b1)(),{statusCode:o,hasMore:n}=e;return(0,r.useCallback)((()=>{n||10404!==o||t.openModal({isSignup:!1,query:{redirect_url:window.location.href,enter_method:"vv_limit"}})}),[t,o,n])}const A=()=>{const{search:e}=(0,i.zy)(),t=(0,S.VP)(),{isBrowserModeShowing:o}=(0,r.useContext)(x.g),{hasSidebar:n,hasFloatingPanel:l}=(0,M.jN)(),c=(0,s.stringifyUrl)({url:"/foryou",query:a()((0,s.parse)(e),"sender_device","sender_web_id","item_id")},{skipNull:!0});(0,r.useEffect)((()=>{n||l||t>0&&!o&&window.history.replaceState(window.history.state,"foryou",c)}),[c,t,o,l,n])},Y=({iconEle:e,handleRefresh:t})=>{const o=(0,b.s)();return(0,n.Y)(T.x,{children:(0,n.Y)(w.W,{iconElem:e,title:o("server_error_title"),desc:o("server_error_sub"),buttonText:o("refresh"),onButtonClick:t})})},V=()=>(0,n.Y)(k.U,{}),F=()=>{const e=(0,p.Lu)((e=>null==e?void 0:e.list),[]),t=(0,E.P)(C.k),o=(0,m.JD)((e=>e.showingBrowserMode),j.bN),n=(0,N.Z9)((e=>e.isOpen),j.bN);(0,r.useEffect)((()=>{var r;if(e&&0!==e.length)for(let i=0;i{o.d(t,{Y:()=>i,x:()=>l});var n=o(62186),r=o(72153);const i=(0,n.default)("div",{target:"ec6jhlz0"})((({theme:{direction:e}})=>[(0,r.mp)({direction:e,marginEnd:24}),{position:"relative",margin:"0 auto",width:"100%",minWidth:"420px",flexShrink:1,display:"flex",justifyContent:"flex-start",flexDirection:"column",alignItems:"center"}]),"label:DivMainContainer;"),l=(0,n.default)("div",{target:"ec6jhlz1"})({padding:"210px 0"},"label:DivErrorWrapper;")},91872:(e,t,o)=>{o.d(t,{O:()=>i});var n=o(40099),r=o(90159);function i({elementRef:e,threshold:t=1e3,onHitBottom:o,onPageBottom:i,shouldRunOnMount:l,onScroll:a}){const s=(0,n.useRef)(null),c=(0,n.useRef)(0),d=(0,n.useRef)(0),u=(0,n.useRef)(!l),p=(0,n.useCallback)((()=>{"undefined"!=typeof window&&window.clearInterval(d.current)}),[]),g=(0,r._g)((()=>{var n,r,l,d,g,m,_;if(!s)return;let f,v;if(e)f=null!==(l=null===(r=e.current)||void 0===r?void 0:r.scrollTop)&&void 0!==l?l:0,v=(null!==(g=null===(d=e.current)||void 0===d?void 0:d.scrollHeight)&&void 0!==g?g:0)-(null!==(_=null===(m=e.current)||void 0===m?void 0:m.clientHeight)&&void 0!==_?_:0)-f;else{const e=document.documentElement||document.body.parentNode||document.body;f=void 0!==window.pageYOffset?window.pageYOffset:e.scrollTop,v=Number(null===(n=s.current)||void 0===n?void 0:n.scrollHeight)-f-window.innerHeight}0!==f&&(null==a||a(f)),!u.current&&v>0&&p(),v-t<=0&&c.current<=f&&(null==o||o(),!u.current&&p()),v<=-60&&f-c.current>=18&&(null==i||i()),c.current=f}),[o,t,i,e,p],100),m=(0,n.useRef)(g);return m.current=g,(0,n.useEffect)((()=>{l&&(d.current=window.setInterval((()=>{var e;null===(e=m.current)||void 0===e||e.call(m)}),100))}),[]),(0,n.useEffect)((()=>{var t;const o=null!==(t=null==e?void 0:e.current)&&void 0!==t?t:window;return o.addEventListener("scroll",g),()=>{o.removeEventListener("scroll",g)}}),[g,e]),s}},11417:(e,t,o)=>{o.d(t,{h:()=>c});var n=o(24643),r=o(40099),i=o(60322),l=o(84827),a=o(90159);const s=function({onShow:e}){const t=(0,r.useRef)(null),o=(0,a._g)((()=>{if(t.current){const{top:o}=t.current.getBoundingClientRect();o>=0&&o{o()}),[]),(0,r.useEffect)((()=>(window.addEventListener("scroll",o),()=>{window.removeEventListener("scroll",o)})),[o]),(0,n.jsx)("div",{ref:t,children:(0,n.jsx)(l.R,{center:!0,maskKey:"self-detector"})})};function c(){return function(e){const t=t=>{const{ssrLimitDisable:o=!1}=t,[i,l]=(0,r.useState)(!o),a=(0,r.useCallback)((()=>{l(!1)}),[]);(0,r.useEffect)((()=>{void 0!==window.requestIdleCallback?window.requestIdleCallback(a):setTimeout((()=>{a()}),0)}),[a]);const c=(0,r.useMemo)((()=>{var e;return"undefined"!=typeof window?t.itemList:i&&!o?t.itemList.slice(0,null!==(e=t.ssrLimit)&&void 0!==e?e:2):t.itemList}),[i,t.itemList,t.ssrLimit,o]),d=Object.assign(Object.assign({},t),{itemList:c,frozen:i});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e,Object.assign({},d)),i&&(0,n.jsx)(s,{onShow:a})]})};return t.displayName=`WithLimitedListSSR(${(0,i.x)(e)})`,t}}},94294:(e,t,o)=>{o.d(t,{H:()=>r});var n=o(93608);const r={handleClickCategory:e=>{n.f.sendEvent("click_category",e)},handleNoMoreVideosShow:e=>{n.f.sendEvent("no_more_videos_show",e)},handleBottomNoMoreVideosShow:e=>{n.f.sendEvent("bottom_no_more_videos_show",e)},handleExploreLoadMore:e=>{n.f.sendEvent("load_more",e)},handleExploreClickCategoryArrow:e=>{n.f.sendEvent("category_arrow_click",e)},handleTrendingTopicPlay:e=>{n.f.sendEvent("trending_topic_video_play",e)},handleTrendingToBrowserMode:e=>{n.f.sendEvent("trending_topic_video_click",e)},handleTrendingTopicSwitch:e=>{n.f.sendEvent("trending_topic_scroll",e)},handleTrendingTopicEmpty:()=>{n.f.sendEvent("trending_topic_empty")}}}}]);