"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[3279],{20103:(e,t,n)=>{n.d(t,{B3:()=>y,gx:()=>m,o0:()=>_});var s=n(2787),a=n(46682),i=n(41271),o=n(40099),r=n(11060),l=n(60484),d=n(49057),c=n(79983),u=n(12055),p=n(82715),g=n(37367),h=n(63849);function m(e){const{language:t="en",abTestVersion:n,user:s}=(0,l.L$)((0,d.W)((()=>["language","abTestVersion","user"]),[])),[i,r]=(0,a.S)(c.O,{selector:e=>{var t;return null!==(t=e.video_playlist)&&void 0!==t?t:u.q},dependencies:[]}),p=(0,h.V6)(),{loading:g,hasMore:m}=i;return(0,o.useCallback)((()=>{!g&&m&&(p.fetchPlaylistItemList({mixId:e,itemListKey:"video_playlist"}),r.getPlaylistVideoList({mixId:e,key:"video_playlist",abTestVersion:n,user:s,language:t}))}),[g,m,p,e,r,n,s,t])}const y=()=>{const{mixInfo:e}=(0,i.P)(g.N,{selector:e=>({mixInfo:e.mixInfo}),dependencies:[]}),{id:t="",name:n="",creator:s}=(0,l.L$)(e),{uniqueId:a=""}=(0,l.L$)(s),d=(0,r.W6)(),{pathname:c}=(0,r.zy)(),{id:u}=(0,r.g)();(0,o.useEffect)((()=>{if(!a||!t)return;const e=p.$T.videoPlaylist({id:t,uniqueId:a,content:n});if(n&&u===t&&e!==c){const t=`${e}${location.search}`;d.replace(t)}}),[t,c,d,n,u,a])},_=e=>(0,o.useMemo)((()=>{const t=e.length-e.trimStart().length;return t?(0,s.Y)(s.FK,{children:new Array(t).fill(0).map(((e,t)=>(0,s.Y)(o.Fragment,{children:" "},`${t}`)))}):null}),[e])},37367:(e,t,n)=>{n.d(t,{N:()=>b});var s=n(58632),a=n(64162),i=n(4126),o=n(93995),r=n(23999),l=n(55582),d=n(63700),c=n(26324),u=n(8536),p=n(35572),g=n(20259),h=n(74690),m=n(80339),y=n(76435),_=n(60484),v=n(90950),f=n(79983),I=n(97446),C=n(7672),x=n(55099);let L=class{constructor(e){this.fetch=e}getPlaylistDetail(e){return this.fetch.get("/api/mix/detail/",{query:e,baseUrlType:2})}};L=(0,s.__decorate)([(0,C._)(),(0,s.__metadata)("design:paramtypes",[x.p])],L);let b=class extends a.E{constructor(e,t,n){super(),this.service=e,this.seoModule=t,this.itemList=n,this.defaultState={statusCode:0,mixInfo:void 0,loading:!0}}setPlaylistInfo(e,t){const{statusCode:n=0,mixInfo:s}=(0,_.L$)(t);e.statusCode=n,e.mixInfo=s}resetData(e){e.loading=!0,e.statusCode=0,e.mixInfo=void 0}setLoading(e,t){e.loading=t}setPlaylistDetail(e,t){(0,I._J)().setPlaylistDetail(t)}resetPlaylistData(e){return e.pipe((0,u.Z)((()=>(0,r.of)(this.getActions().dispose$(),this.getActions().resetData(),this.itemList.getActions().dispose$(),this.itemList.getActions().resetItemList({key:"video_playlist"})))))}getVideoPlaylistPageData(e){return e.pipe((0,p.p)((({mixId:e,language:t,abTestVersion:n,user:s,appType:a})=>this.service.getPlaylistDetail({mixId:e,language:t,scene:147}).pipe((0,g.W)((()=>(0,r.of)({statusCode:-1}))),(0,u.Z)((i=>{const{statusCode:o,mixInfo:c={}}=i,u=[(0,r.of)(this.getActions().setPlaylistInfo(i),this.getActions().setLoading(!1),this.getActions().setPlaylistDetail(c))],p=new l.h;if(0===o){const a=this.itemList.getPlaylistVideoList$({mixId:e,key:"video_playlist",abTestVersion:n,user:s,language:t},{onVideoList(e){p.next(e),p.complete()}});u.push(a)}else p.next([]),p.complete();return(0,d.h)(...u,this.setSEO(i,p,t,a))})),(0,h.Z)(this.getActions().setLoading(!0)),(0,m.q)(this.getActions().setLoading(!1),this.terminate()),(0,y.Q)(this.dispose$),(0,g.W)((e=>(console.error(e),(0,r.of)(this.noop()))))))))}setSEO(e,t,n,s){return t.pipe((0,u.Z)((t=>this.seoModule.setVideoPlaylistSEOProps({mixInfo:e.mixInfo,statusCode:e.statusCode},t,{language:null!=n?n:"en"},s))))}};(0,s.__decorate)([(0,i.uk)(),(0,s.__metadata)("design:type",c.c)],b.prototype,"dispose$",void 0),(0,s.__decorate)([(0,i.h5)(),(0,s.__metadata)("design:type",Function),(0,s.__metadata)("design:paramtypes",[Object,Object]),(0,s.__metadata)("design:returntype",void 0)],b.prototype,"setPlaylistInfo",null),(0,s.__decorate)([(0,i.h5)(),(0,s.__metadata)("design:type",Function),(0,s.__metadata)("design:paramtypes",[Object]),(0,s.__metadata)("design:returntype",void 0)],b.prototype,"resetData",null),(0,s.__decorate)([(0,i.h5)(),(0,s.__metadata)("design:type",Function),(0,s.__metadata)("design:paramtypes",[Object,Boolean]),(0,s.__metadata)("design:returntype",void 0)],b.prototype,"setLoading",null),(0,s.__decorate)([(0,i.h5)(),(0,s.__metadata)("design:type",Function),(0,s.__metadata)("design:paramtypes",[Object,Object]),(0,s.__metadata)("design:returntype",void 0)],b.prototype,"setPlaylistDetail",null),(0,s.__decorate)([(0,i.Mj)(),(0,s.__metadata)("design:type",Function),(0,s.__metadata)("design:paramtypes",[c.c]),(0,s.__metadata)("design:returntype",void 0)],b.prototype,"resetPlaylistData",null),(0,s.__decorate)([(0,i.Mj)({payloadGetter:1}),(0,s.__metadata)("design:type",Function),(0,s.__metadata)("design:paramtypes",[c.c]),(0,s.__metadata)("design:returntype",void 0)],b.prototype,"getVideoPlaylistPageData",null),b=(0,s.__decorate)([(0,o.n)("VideoPlaylistPageModule"),(0,s.__metadata)("design:paramtypes",[L,v.E,f.O])],b)},89435:(e,t,n)=>{n.d(t,{y:()=>o});var s=n(18047),a=n(52837),i=n(40099),o=(0,a.r)((function(e){return i.createElement("svg",(0,s._)({fill:"currentColor"},e,{viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:e.className}),i.createElement("path",{d:"M36 36c2.8 0 4.2 0 5.27-.55a5 5 0 0 0 2.18-2.18C44 32.2 44 30.8 44 28V12c0-2.8 0-4.2-.55-5.27a5 5 0 0 0-2.18-2.19C40.2 4 38.8 4 36 4H20c-2.8 0-4.2 0-5.27.54a5 5 0 0 0-2.19 2.19C12 7.8 12 9.2 12 12c-2.8 0-4.2 0-5.27.54a5 5 0 0 0-2.19 2.19C4 15.8 4 17.2 4 20v16c0 2.8 0 4.2.54 5.27a5 5 0 0 0 2.19 2.18C7.8 44 9.2 44 12 44h16c2.8 0 4.2 0 5.27-.55a5 5 0 0 0 2.18-2.18C36 40.2 36 38.8 36 36Zm0-28c1.47 0 2.33 0 2.96.05.32.03.47.06.53.08a1 1 0 0 1 .38.38c.02.06.05.21.08.53.05.63.05 1.5.05 2.96v16c0 1.47 0 2.33-.05 2.96-.03.32-.06.47-.08.53a1 1 0 0 1-.38.38c-.06.02-.21.05-.53.08-.63.05-1.5.05-2.96.05V20c0-2.8 0-4.2-.55-5.27a5 5 0 0 0-2.18-2.19C32.2 12 30.8 12 28 12H16c0-1.47 0-2.33.05-2.96.03-.32.06-.47.08-.53a1 1 0 0 1 .38-.38c.06-.02.21-.05.53-.08C17.67 8 18.54 8 20 8h16Zm-19.87.49Zm.36-.36Zm-1.83 13.6a.9.9 0 0 1 1.39-.77l10.03 6.46a.9.9 0 0 1 0 1.51l-10.03 6.45a.9.9 0 0 1-1.39-.76v-12.9Z"}))}))},90217:(e,t,n)=>{n.d(t,{B:()=>a});var s=n(40099);function a({intersectionHandler:e,outerSectionHandler:t,element:n,threshold:a,root:i,rootMargin:o="0px",unobserveAfterIntersect:r,skip:l}){const d=(0,s.useRef)();return(0,s.useEffect)((()=>{if(l)return;const s=n=>{var s;const a=n[0];a.isIntersecting&&e?(e(a),r&&(null===(s=d.current)||void 0===s||s.unobserve(a.target))):!a.isIntersecting&&t&&t(a)};try{const e={rootMargin:o,threshold:a};(null==i?void 0:i.current)&&(e.root=i.current),d.current=new IntersectionObserver(s,e),(null==n?void 0:n.current)&&d.current&&d.current.observe(n.current)}catch(e){console.error(e)}return()=>{var e;null===(e=d.current)||void 0===e||e.disconnect()}}),[n,e,t,a,r,l,o,i]),d}},99019:(e,t,n)=>{n.d(t,{V:()=>y});var s=n(24643),a=n(60484),i=n(95358),o=n(47172),r=n(11072),l=n(4474),d=n(97086),c=n(70539);function u({to:e,location:{search:t}={search:""}},n={}){var s;const a=null!==(s=(0,l.parse)(t).lang)&&void 0!==s?s:"",o=function(e){var t,n,s,a,o,r,u;let p=!1;if(!(0,d.fU)())return!1;try{const{seoAbtest:d,isSearchEngineBot:g,featureFlags:h}=(0,c.w)();if(!g)return!1;const m=null!==(n="string"==typeof e?null===(t=(0,l.parseUrl)(e))||void 0===t?void 0:t.url:null==e?void 0:e.pathname)&&void 0!==n?n:"",y=Boolean((null==h?void 0:h.music_canonical_url)&&(0,i.Iy)(m)),_=Boolean((null==h?void 0:h.user_canonical_url)&&(0,i.cj)(m)),v=Boolean((null==h?void 0:h.hashtag_canonical_url)&&(0,i.Ke)(m)),f=null==d?void 0:d.parameters,I=function(e){try{return new URL(e).pathname}catch(t){return e}}(null!==(s=null==d?void 0:d.canonical)&&void 0!==s?s:""),C=null!==(o=null===(a=null==f?void 0:f.kep_canonical_abtest)||void 0===a?void 0:a.vid)&&void 0!==o?o:"v0",x=null!==(u=null===(r=null==f?void 0:f.video_canonical_abtest)||void 0===r?void 0:r.vid)&&void 0!==u?u:"v0",L="v1"===C&&(0,i.pz)(I),b="v1"===x&&(0,i.Fj)(I);p=(y||_||v)&&!(b||L)}catch(e){console.error("Error: while geting Canonical Url Experiment get base bot/abtest result")}return p}(e);if("string"==typeof e){const{url:t,query:s}=(0,l.parseUrl)(e);return o?t:(0,l.stringifyUrl)({url:t,query:Object.assign({lang:a},s)},Object.assign({skipEmptyString:!0},n))}const{pathname:r="",search:u={},hash:p}=e,g=p?`#${p}`:"";return o?r:`${(0,l.stringifyUrl)({url:r,query:Object.assign({lang:a},u)},Object.assign({skipEmptyString:!0},n))}${g}`}const p={fontWeight:700},g={fontWeight:600},h={},m=(e,t,n={})=>(0,s.jsx)("span",{style:Object.assign({fontWeight:400},n),"data-e2e":"new-desc-span",children:e},e+t),y=e=>{var t,n;const{item:l,desc:d,textExtra:c,DuetComp:y,LinkComp:_,QuestionComp:v,shouldReport:f,reportParams:I,styleType:C,mode:x,useGetVideoPath:L,onSearchResultClick:b,onBrowserModeClose:k,onLinkClick:P}=e,{authorId:j,id:D}=(0,a.L$)(l),O=null!==(n=null!==(t=(0,r.ik)(D))&&void 0!==t?t:d)&&void 0!==n?n:"",w=(0,r.M)(D),A=(0,r.sX)(D),E=w&&A,S=(0,o.useLocation)(),$=L();if(!d)return null;let q=h;switch(C){case"kep":q=p;break;case"explore":q=g}if(!(null==c?void 0:c.length))return m(E?O:d,0,q);const V=[...c].sort(((e,t)=>e.start-t.start)).reduce(((t,n,a,o)=>{const{start:r,end:l,awemeId:c,userUniqueId:p,hashtagName:g,type:h,subType:L,userId:O,hashtagId:w,questionId:A="",questionContent:V=""}=n,M=0===a?0:o[a-1].end,T=r,B=d.substring(M,T);B&&!E&&t.push(m(B,t.length-1,q));const R=7===(F=L)||5===F;var F;const U=d.substring(r,l);if(0===h&&R){const e=u({to:{pathname:(0,i.WD)({questionId:A,questionContent:V})},location:S});t.push((0,s.jsx)(v,{href:e,text:null!=p?p:"",index:t.length-1,id:A,type:"question",target:"_self",authorId:j,groupId:D,shouldReport:f,reportParams:I,styleType:"question",inline:"compact"===x,onLinkClick:P,onSearchResultClick:b},U+a))}else if(0===h&&c){const n=u({to:{pathname:$({uniqueId:null!=p?p:"",videoId:c})},location:S});t.push((0,s.jsx)(y,{href:n,text:U,index:t.length-1,id:c,type:"video",target:"_self",authorId:j,groupId:D,shouldReport:f,reportParams:I,styleType:"duet",onLinkClick:e.onLinkClick,onSearchResultClick:e.onSearchResultClick},U+a))}else if(0===h&&O){const n=u({to:{pathname:(0,i.fJ)({uniqueId:null!=p?p:""})},location:S});t.push((0,s.jsx)(_,{href:n,text:U,index:t.length-1,id:O,type:"user",target:"_self",authorId:j,groupId:D,shouldReport:f,reportParams:I,styleType:C,ariaLabel:`Watch more videos from user ${U}`,onLinkClick:e.onLinkClick,onSearchResultClick:e.onSearchResultClick,onBrowserModeClose:e.onBrowserModeClose},U+a))}else if(1===h&&g){const e=u({to:{pathname:(0,i.AT)({tagName:g})},location:S});t.push((0,s.jsx)(_,{href:e,text:U,index:t.length-1,id:null!=w?w:"",type:"tag",target:"_self",authorId:j,groupId:D,shouldReport:f,reportParams:I,styleType:C,ariaLabel:`Watch more videos of the ${U} category`,onLinkClick:P,onSearchResultClick:b,onBrowserModeClose:k},U+a))}else E||t.push(m(U,t.length-1,q));return a!==o.length-1||E||t.push(m(d.substring(l),t.length,q)),t}),[]);return E&&V.unshift(m(O,-1,q)),(0,s.jsx)(s.Fragment,{children:V})}}}]);