1 line
77 KiB
Plaintext
1 line
77 KiB
Plaintext
"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["73356"],{593697:function(e,i,t){let n,l,o;t.d(i,{t:function(){return et}});var r=t("629686"),d=t("402748"),a=t("811603");t("490629"),t("559352"),t("374954");var u=t("320165"),s=t("101199"),v=t("469935"),c=t.n(v),f=t("499059"),h=t("463295");t("932651");var p=t("283791"),m=t.n(p),_=t("59850");t("706056");var g={horizontal:0,0:"horizontal",vertical:1,1:"vertical",unknow:2,2:"unknow"};let y=e=>"string"==typeof e?e:`${e}px`,w=(e,i,t,n)=>{e.style.transform=`translate3d(${[i,t,n].map(e=>y(e)).join(",")})`};function I(){var e;let i=(null===(e=f.Le.getConfig(f.gI.AbtestData))||void 0===e?void 0:e.slideShowOpt)||0,t=this.el.offsetWidth||this.elWidth,n=(this.el.offsetHeight||this.elHeight)+i;this.elWidth=t,this.elHeight=n,this.touchData.containerWidth=t+(this.direction===g.horizontal?this.spaceBetween:0),this.touchData.containerHeight=n+(this.direction===g.vertical?this.spaceBetween:0),this.el.childNodes.forEach(e=>{Array.from(e.classList).includes("dySwiperSlide")&&(e.style[this.direction===g.vertical?"height":"width"]=`${this.direction===g.vertical?n:t}px`,e.style[this.direction===g.vertical?"marginBottom":"marginRight"]=`${this.spaceBetween}px`)});let l=this.activeIndex,o=this.loop?l+1:l,r=-(this.touchData.containerWidth*o),d=-(this.touchData.containerHeight*o);this.touchData.x=this.direction===g.horizontal?r:0,this.touchData.y=this.direction===g.vertical?d:0,this.transitionCallback&&(this.transitionCallback(),this.transitionCallback=null),w(this.el,this.touchData.x,this.touchData.y,0)}var x=t("908219"),b=t.n(x),E=t("273372");if("object"==typeof performance&&"function"==typeof performance.now)n=()=>performance.now();else{let e=Date,i=e.now();n=()=>e.now()-i}let T={touchStart:"touchStart",touchMove:"touchMove",touchEnd:"touchEnd",slideChange:"slideChange",transitionStart:"transitionStart",transitionEnd:"transitionEnd",activeIndexChange:"activeIndexChange"},C=["INPUT","SELECT","OPTION","TEXTAREA","BUTTON","VIDEO","LABEL"],D=e=>{var i,t;return null==e?void 0:null===(t=e.target)||void 0===t?void 0:null===(i=t.closest)||void 0===i?void 0:i.call(t,"#pc-editor-container")},k=e=>{var i,t,n,l;let o=null==e?void 0:null===(t=e.target)||void 0===t?void 0:null===(i=t.closest)||void 0===i?void 0:i.call(t,".douyin-player-volume-slider");return(null==e?void 0:null===(l=e.target)||void 0===l?void 0:null===(n=l.closest)||void 0===n?void 0:n.call(l,".douyin-player-progress"))||o},S=e=>{var i,t;return null==e?void 0:null===(t=e.target)||void 0===t?void 0:null===(i=t.closest)||void 0===i?void 0:i.call(t,".soda-side-card")};function P(e){var i,t;if(!(this.isDisabled()||k(e)))this.eventEmitter.emit(T.touchStart),this.touchData.isTouchDown=!0,this.touchData.touchStartX="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,this.touchData.touchStartY="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,this.touchData.startX=this.touchData.x,this.touchData.startY=this.touchData.y,this.touchData.lastDetectTime=n(),!(C.includes(null==e?void 0:null===(i=e.target)||void 0===i?void 0:i.nodeName)||(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.isContentEditable)||D(e)||S(e))&&e.preventDefault()}function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y";return this.touchData[this.direction===g.horizontal?e:i]}t("591964");let R=[],M=(e,i)=>(R.push([e,i]),R.splice(0,R.findIndex(i=>e-i[0]<=300)),R.reduce((e,i)=>e+i[1],0)/R.length),N=(e,i)=>Math.min(e,Math.abs(i))===e?(i>=0?1:-1)*e:i;function j(){return(null===this||void 0===this?void 0:this.data)&&(null===this||void 0===this?void 0:this.activeIndex)&&!this.data[this.activeIndex-1]?-this.touchData.containerHeight*this.activeIndex:0}function A(){return-(this.data.length-1)*this.touchData[this.direction===g.horizontal?"containerWidth":"containerHeight"]}function B(e,i){var t,n;this.touchData.x=this.direction===g.horizontal?this.touchData.startX+N(this.touchData.containerWidth,e):0,this.touchData.y=this.direction===g.vertical?this.touchData.startY+N(this.touchData.containerHeight,i):0;let l=j.call(this);L.call(this)>l?this.touchData[this.direction===g.horizontal?"x":"y"]=l-1+(-l+L.call(this,"startX","startY")+(this.direction===g.horizontal?e:i))**(null!==(t=this.resistanceRatio)&&void 0!==t?t:.7):L.call(this)<A.call(this)&&(this.touchData[this.direction===g.horizontal?"x":"y"]=A.call(this)+1-(A.call(this)-L.call(this,"startX","startY")-(this.direction===g.horizontal?e:i))**(null!==(n=this.resistanceRatio)&&void 0!==n?n:.7))}function O(e){if(!this.isDisabled()){if(this.touchData.isTouchDown){e.cancelable&&e.preventDefault();let i="touchmove"===e.type&&e.targetTouches&&(e.targetTouches[0]||e.changedTouches[0]),t="touchmove"===e.type?i.pageX:e.pageX,l="touchmove"===e.type?i.pageY:e.pageY,o=(t-this.touchData.touchStartX)*this.touchRatio,r=(l-this.touchData.touchStartY)*this.touchRatio;if(Math.max(Math.abs(o),Math.abs(r))>=30&&this.touchData.userIntendDirection===g.unknow&&(this.touchData.userIntendDirection=Math.max(Math.abs(o),Math.abs(r))===Math.abs(o)?g.horizontal:g.vertical),this.touchData.userIntendDirection===this.direction){let e=n(),i=this.direction===g.horizontal?this.touchData.x:this.touchData.y;B.call(this,o,r),this.touchData.gestureSwipeSpeed=M(e,Math.floor((this.touchData[this.direction===g.horizontal?"x":"y"]-i)/((e-this.touchData.lastDetectTime)/1e3))),this.touchData.lastDetectTime=e,w(this.el,this.touchData.x,this.touchData.y,"0"),this.eventEmitter.emit(T.touchMove),this.touchData.isTouchMove=!0,this.transitionCallback&&(this.transitionCallback(),this.transitionCallback=null)}}}}let F=(e,i)=>{e.style.transitionDuration="string"!=typeof i?`${i}ms`:i};function V(e,i,t,n,l){this.touchData.isTouchDown=!1,this.touchData.isTouchMove=!1,this.touchData.userIntendDirection=g.unknow,0<=e&&this.data.length;let o=this.loop?e+1:e,r=-(this.touchData.containerWidth*o),d=-(this.touchData.containerHeight*o);if(this.direction===g.horizontal?this.touchData.x===r:this.touchData.y===d)return!n&&(this.activeIndex=e,this.updateCallback(e,{from:t})),!1;let a=null!=i?i:this.speed;if(F(this.el,a),this.touchData.x=this.direction===g.horizontal?r:0,this.touchData.y=this.direction===g.vertical?d:0,w(this.el,this.touchData.x,this.touchData.y,0),!n&&(this.activeIndex=e,this.updateCallback(e,{from:t})),0!==a)return this.touchData.animating=!0,this.eventEmitter.emit(T.transitionStart),this.transitionCallback=()=>{this.touchData.animating=!1,this.eventEmitter.emit(T.transitionEnd),F(this.el,0),null==l||l(),this.el.removeEventListener("transitionend",this.transitionCallback),this.el.removeEventListener("webkitTransitionEnd",this.transitionCallback)},this.el.addEventListener("transitionend",this.transitionCallback),this.el.addEventListener("webkitTransitionEnd",this.transitionCallback),!0;this.touchData.animating=!1}function z(){V.call(this,this.activeIndex,250)}function $(){return Math.abs(L.call(this)-L.call(this,"startX","startY"))>=L.call(this,"containerWidth","containerHeight")/2}function U(e){return e-this.touchData.lastDetectTime>=100}function W(e){let i=$.call(this),t=Math.abs(this.touchData.gestureSwipeSpeed)>=50,n=U.call(this,e),l=0===this.activeIndex&&L.call(this)>0||this.activeIndex===this.data.length-1&&L.call(this)<A.call(this),o=L.call(this)-L.call(this,"startX","startY")<0==this.touchData.gestureSwipeSpeed<0||0===this.touchData.gestureSwipeSpeed;return(i||t&&!n)&&!l&&o}function Y(){let e=L.call(this)-L.call(this,"startX","startY")<0?1:-1,i=this.activeIndex+e;return this.data[i]?i:this.activeIndex}function Z(e){if(!this.isDisabled()){if(this.touchData.isTouchDown&&this.touchData.userIntendDirection===this.direction){this.eventEmitter.emit(T.touchEnd);let e=n();W.call(this,e)?V.call(this,Y.call(this),250,"drag"):z.call(this)}this.touchData.isTouchDown=!1,this.touchData.isTouchMove=!1,this.touchData.userIntendDirection=g.unknow}}var H=t("795653");function K(){return!l&&(l=function(){let e=(0,H.O)();return{pointerEvents:!!window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0,observer:"MutationObserver"in window||"WebkitMutationObserver"in window,smoothScroll:document.documentElement&&"scrollBehavior"in document.documentElement.style,touch:!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||e),passiveListener:function(){let e=!1;try{let i=Object.defineProperty({},"passive",{get(){e=!0}});window.addEventListener("testPassiveListener",null,i)}catch(e){}return e}(),gestures:"ongesturestart"in window}}()),l}t("240148"),t("759943");let G={start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"},X={start:"pointerdown",move:"pointermove",end:"pointerup"};function J(e){this.touchData.animating&&(e.stopPropagation(),e.stopImmediatePropagation())}let Q=(e,i)=>{let t=K(),n=(!o&&(o=function(){let e=K(),{platform:i}=window.navigator,t=window.navigator.userAgent,n={ios:!1,android:!1},l=window.screen.width,o=window.screen.height,r=t.match(/(Android);?[\s\/]+([\d.]+)?/),d=t.match(/(iPad).*OS\s([\d_]+)/),a=t.match(/(iPod)(.*OS\s([\d_]+))?/),u=!d&&t.match(/(iPhone\sOS|iOS)\s([\d_]+)/),s="MacIntel"===i;return!d&&s&&e.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${l}x${o}`)>=0&&(!(d=t.match(/(Version)\/([\d.]+)/))&&(d=[0,1,"13_0_0"]),s=!1),r&&"Win32"!==i&&(n.os="android",n.android=!0),(d||u||a)&&(n.os="ios",n.ios=!0),n}()),o),l=[P,O,Z,b()(I,50,{leading:!0,trailing:!0})].map(e=>e.bind(i)),r=J.bind(i);if(!t.touch&&t.pointerEvents){e.addEventListener(X.start,l[0],!1),document.addEventListener(X.move,l[1],!1),document.addEventListener(X.end,l[2],!1),e.addEventListener("click",r,!0);let i=E.Z.bind(e,l[3]);return()=>{e.removeEventListener(X.start,l[0],!1),document.removeEventListener(X.move,l[1],!1),document.removeEventListener(X.end,l[2],!1),e.removeEventListener("click",r,!0),i&&i()}}{let i="touchstart"===G.start&&!!t.passiveListener&&{passive:!0,capture:!1};t.touch&&(e.addEventListener(G.start,l[0],i),e.addEventListener(G.move,l[1],!!t.passiveListener&&{passive:!1,capture:!1}),e.addEventListener(G.end,l[2],i),e.addEventListener(G.cancel,l[2],i)),(!n.ios&&!n.android||!t.touch&&n.ios)&&(e.addEventListener("mousedown",l[0],!1),document.addEventListener("mousemove",l[1],!1),document.addEventListener("mouseup",l[2],!1));let o=E.Z.bind(e,l[3]);return e.addEventListener("click",r,!0),()=>{t.touch&&(e.removeEventListener(G.start,l[0],i),e.removeEventListener(G.move,l[1],!1),e.removeEventListener(G.end,l[2],i),e.removeEventListener(G.cancel,l[2],i)),(!n.ios&&!n.android||!t.touch&&n.ios)&&(e.removeEventListener("mousedown",l[0],!1),document.removeEventListener("mousemove",l[1],!1),document.removeEventListener("mouseup",l[2],!1)),o&&o(),e.removeEventListener("click",r,!0)}}},q=e=>{let{spaceBetween:i,speed:t,resistanceRatio:n,direction:l,touchRatio:o,onActiveIndexChange:r,onSwiper:d,initIndex:a,data:u,loop:v,isDisabled:c,orderOptimize:f}=e,h=(0,s.useMemo)(()=>new(m()),[]),p=(0,s.useRef)(null),y=(0,s.useRef)({}),w=(0,s.useRef)(-1),[x,b]=(0,s.useState)(a),E=(0,_.Z)((e,i)=>{let{from:t=""}=i;x!==e&&(f||null==r||r(e),b(e),h.emit(T.slideChange,{from:t}),h.emit(T.activeIndexChange,{index:e}),f&&(null==r||r(e)))});return y.current=Object.assign(y.current,{data:u,activeIndex:x,speed:t,resistanceRatio:n,spaceBetween:i,slides:u,loop:v,direction:l,touchRatio:o}),(0,s.useEffect)(()=>{var e;let t=l===g.horizontal,n=l===g.vertical,o={isTouchDown:!1,isTouchMove:!1,animating:!1,x:0,y:0,startX:0,startY:0,touchStartX:0,touchStartY:0,gestureSwipeSpeed:0,userIntendDirection:g.unknow,containerWidth:p.current.offsetWidth+(t?i:0),containerHeight:p.current.offsetHeight+(n?i:0)};y.current=Object.assign(y.current,{el:p.current,updateCallback:E,eventEmitter:h,touchData:o,on:h.on.bind(h),once:h.once.bind(h),emit:h.emit.bind(h),off:h.off.bind(h),slideTo:V.bind(y.current),slideToSync:e=>{w.current=e,E(e,{from:""})},update:()=>null,isDisabled:c,slideNext:()=>{var e;if(c())return;let i=y.current;if(i.touchData.animating&&document&&!document.hidden)return;let t=i.activeIndex+1;t<(null==i?void 0:null===(e=i.data)||void 0===e?void 0:e.length)?i.slideTo(t):i.loop&&i.slideTo(t,i.speed,void 0,!0,()=>{i.slideTo(0,0)})},slidePrev:()=>{var e;if(c())return;let i=y.current;if(i.touchData.animating&&document&&!document.hidden)return;let t=i.activeIndex-1;if(t>=0&&(null==i?void 0:null===(e=i.data)||void 0===e?void 0:e[t])){i.slideTo(t);return}-1===t&&i.loop&&i.slideTo(t,i.speed,void 0,!0,()=>{i.slideTo(i.data.length-1,0)})}});let r=c()?()=>{}:Q(p.current,y.current);return null==d||d(y.current),null===(e=y.current)||void 0===e||e.slideTo(x,0),()=>{r()}},[]),(0,s.useEffect)(()=>{-1!==w.current&&y.current.slideTo(w.current,0)},[u]),(0,s.useEffect)(()=>{let e=setTimeout(()=>{I.call(y.current)});return()=>{clearTimeout(e)}},[i,u]),{activeIndex:x,swiperContainerRef:p,dySwiperStatusRef:y}},ee=e=>{let{dySwiperStatusRef:i,data:t}=e;(0,s.useEffect)(()=>{var e;(null===(e=i.current)||void 0===e?void 0:e.activeIndex)>(null==t?void 0:t.length)-1&&(null==t?void 0:t.length)>0&&V.call(i.current,(null==t?void 0:t.length)-1,0)},[t])};t("679308");var ei=t("160843");let et=(0,s.forwardRef)((e,i)=>{var t;let{direction:n,children:l,className:o,data:v,spaceBetween:p=0,style:m,speed:_,isDisabled:y,resistanceRatio:w,onSwiper:I,slideKey:x,onActiveIndexChange:b,touchRatio:E=1,initIndex:T=0,loop:C=!1,isVideoSupportMP4:D=!0}=e,k=(0,a._)(e,["direction","children","className","data","spaceBetween","style","speed","isDisabled","resistanceRatio","onSwiper","slideKey","onActiveIndexChange","touchRatio","initIndex","loop","isVideoSupportMP4"]),[S,P]=function(e){let i=[],t={"wrapper-start":[],"wrapper-end":[],"wrapper-right":[]};return s.Children.toArray(e).forEach(e=>{if(e.type&&e.type.displayName===ei.o.displayName)i.push(e);else if(e.props&&e.props.slot&&t[e.props.slot])t[e.props.slot].push(e);else if(e.props&&e.props.children){let n=function e(i){let t=[];return s.Children.toArray(i).forEach(i=>{i.type&&i.type.displayName===ei.o.displayName?t.push(i):i.props&&i.props.children&&e(i.props.children).forEach(e=>t.push(e))}),t}(e.props.children);n.length>0?n.forEach(e=>i.push(e)):t["wrapper-end"].push(e)}else t["wrapper-end"].push(e)}),[i,t]}(l),L=S[0],{activeIndex:R,dySwiperStatusRef:M,swiperContainerRef:N}=q({data:v,initIndex:T,spaceBetween:p,speed:_,resistanceRatio:w,touchRatio:E,direction:n,onActiveIndexChange:b,onSwiper:I,loop:C,isDisabled:()=>(null==y?void 0:y())||!D,orderOptimize:(null===(t=f.Le.getConfig(f.gI.AbtestData))||void 0===t?void 0:t.firstFrameOrder)===1}),j=(0,s.useMemo)(()=>{if(!L)return null;let e=v.map((e,i)=>s.cloneElement(L,{activeIndex:R,currentIndex:i,slideData:e,key:null==x?void 0:x(e,i)}));if(C&&v.length>1){let i=v[0],t=v[v.length-1],n=v.length,l=s.cloneElement(L,{activeIndex:R,currentIndex:-1,slideData:t,key:null==x?void 0:x(t,-1)}),o=s.cloneElement(L,{activeIndex:R,currentIndex:n,slideData:i,key:null==x?void 0:x(t,n)});e.unshift(l),e.push(o)}return e},[L,C,v,R]);return(0,s.useImperativeHandle)(i,()=>M.current,[]),ee({dySwiperStatusRef:M,data:v}),(0,u.jsxs)("div",(0,d._)((0,r._)({className:c()(h.default.container,o),style:m},k),{children:[(0,u.jsxs)("div",{ref:N,className:c()(h.default.wrapper,{[h.default.vertical]:n===g.vertical}),children:[P["wrapper-start"],j,P["wrapper-end"]]}),P["wrapper-right"]]}))})},160843:function(e,i,t){t.d(i,{o:function(){return v}});var n=t(629686),l=t(402748),o=t(811603);t(490629);var r=t(320165),d=t(101199),a=t(469935),u=t.n(a),s=t(275986);let v=(0,d.memo)(e=>{let{activeIndex:i,currentIndex:t,children:d,slideData:a,style:v,className:c}=e,f=(0,o._)(e,["activeIndex","currentIndex","children","slideData","style","className"]);return(0,r.jsx)("div",(0,l._)((0,n._)({style:v,className:u()(s.default.container,"dySwiperSlide",c)},f),{children:"function"==typeof d?d({activeIndex:i,currentIndex:t,slideData:a}):d}))});v.displayName="SwiperSlide"},439827:function(e,i,t){t.d(i,{l:function(){return o}});var n=t(101199),l=t(33095);let o=()=>{let{contextEvent:e}=(0,n.useContext)(l.E);return e}},420253:function(e,i,t){t.d(i,{Z:function(){return J}});var n=t(629686),l=t(402748);t(112459),t(759943),t(706056);var o=t(101199),r=t(350856),d=t.n(r),a=t(121998),u=t(734123),s=t(68608),v=t(72430),c=t(265950),f=t(426038),h=t(426112),p=t(74639),m=t(499059),_=t(335924),g=t(550506),y=t(923440),w=t(759894),I=t(162164),x=t(880327),b=t(409250),E=t(474221),T=t(889429),C=t(49242),D=t(226846),k=t(449716),S=t(995270),P=t(991742),L=t(237869),R=t(672734),M=t(414061),N=t(995898),j=t(532375),A=t(31992),B=t(332911),O=t(755890),F=t(958395),V=t(332009),z=t(32712),$=t(908750),U=t(767192),W=t(889094),Y=t(921626),Z=t(193143),H=t(917737),K=t(443782),G=t(911159);let X=(e,i)=>{let t=(0,Y.I)();if(t.playtime.used=!0,t.playtime.data){let e=t.playtime.data;return t.playtime.data=null,e}return e?e:i.paused?0:Date.now()};function J(e){let{player:i,awemeInfo:t,isActive:r}=e,{getLogInfo:Y,getSpecialParams:J}=e,Q=(0,o.useRef)(0),q=(0,o.useRef)(!0);q.current=(0,s.U)(),(0,o.useEffect)(()=>{if(i&&r){var e,o,s,ee,ei,et,en,el;let r=0,eo=0,er=X(Q.current,i);(null==i?void 0:i.isQuickPlayer)&&(null===(ei=window.__QUICK_PLAYER)||void 0===ei?void 0:ei.playerStartTime)&&(er=null===(et=window.__QUICK_PLAYER)||void 0===et?void 0:et.playerStartTime,null===(en=window.__QUICK_PLAYER)||void 0===en||delete en.playerStartTime),window.__JX_BIG_CARD_QUICK_PLAYER_START_TIME&&(er=window.__JX_BIG_CARD_QUICK_PLAYER_START_TIME,delete window.__JX_BIG_CARD_QUICK_PLAYER_START_TIME);let ed=0,ea=0,eu=0,es=!1,ev=!1,ec=!1,{vtype:ef}=i,eh="init",ep="init",em=(null===(e=m.Le.getConfig(m.gI.IsInLookMiniModal))||void 0===e?void 0:e.isInMiniModal)||V.s.getPlayerScene(null==i?void 0:i.playerId)===v.lT.Modal,e_=null!==(el=null===(o=window)||void 0===o?void 0:o.ROUTE_PARAMS)&&void 0!==el?el:(0,a.parse)(null===(ee=window)||void 0===ee?void 0:null===(s=ee.location)||void 0===s?void 0:s.search),eg=(0,A.zD)()||(null==e_?void 0:e_.tab_name)||(0,_.Rs)("tab_name")||"",ey={startTime:0,acc:0},ew=e=>{if(er=Date.now(),ev=!1,em&&!(null==i?void 0:i.paused)&&(es=!1),!!(null==i?void 0:i.video))eo=i.currentTime,ef=i.vtype,eh="string"==typeof e?e:"play"},eI=()=>{em&&(es=!1),ea=1},ex=(e,o)=>{var d,a,u,s,v,N,j,A,X,Q,q,ee,ei,et,en,el,es,ev,ec,em,e_,ew,eI,ex,eb,eE,eT,eC,eD,ek,eS,eP,eL;let{author_id:eR,group_id:eM,playlet_id:eN,log_pb:ej,isFromNextAutoPlay:eA,vduration:eB,extraParams:eO,pic_cnt:eF,aweme_type:eV,isMini:ez,trending_topic:e$,first_tag_name:eU,top:eW,is_click_cover:eY,is_pure:eZ,is_insert_wallpaper:eH,is_landscape:eK,bitRate:eG,latest_group_id:eX,if_first_big_card:eJ,is_first_large_card_outflow:eQ,sub_tab_name:eq,filter_name:e0}=Y(),e1=J(),e2=Date.now()-er,e3=i.cumulateTime-ed;if(m.Le.getConfig(m.gI.IsSearchOuterAsync)){m.Le.setConfig(m.gI.IsSearchOuterAsync,!1);return}if(!er||!i||!eM||Date.now()-eu<100||e2<100)return;let e9=0;((0,_.Rs)("modeFrom")===c.MODE_FROM||(0,_.Rs)("modeFrom")===c.MODE_FROM_SEARCH)&&(e9=1);let e5=(0,_.Rs)("if_from_widget"),e4=r>0?er-r:0;r=0;let{isH265:e6}=(0,z.Z)({awemeInfo:t,player:i}),e7=(null==i?void 0:null===(d=i.curDefinition)||void 0===d?void 0:d.bitrate)||eG||0,e8=(null===(a=i.curDefinition)||void 0===a?void 0:a.realBitrate)||0,ie=(0,g.e)(e2/1e3*e8),ii=(null==i?void 0:null===(v=i.plugins)||void 0===v?void 0:null===(s=v.autoplaysettingplugin)||void 0===s?void 0:null===(u=s.config)||void 0===u?void 0:u.nextAutoPlay)||(null==i?void 0:null===(A=i.plugins)||void 0===A?void 0:null===(j=A.searchautoplaysettingplugin)||void 0===j?void 0:null===(N=j.config)||void 0===N?void 0:N.nextAutoPlay),it=String(void 0===ii?null!=eA?eA:0:ii),{memory:il={},battery:io}=(0,y.J)()||{};ey.startTime&&(ey.acc+=Date.now()-ey.startTime,ey.startTime=0);let ir=(null===(X=window.EXPOSE_DATA)||void 0===X?void 0:X.landingPage)==="discover",id=(null===(Q=window.EXPOSE_DATA)||void 0===Q?void 0:Q.landingPage)==="follow",ia=ir&&(null===(q=window.EXPOSE_DATA)||void 0===q?void 0:q.landingMode)!==2&&(null===(ee=window.EXPOSE_DATA)||void 0===ee?void 0:ee.landingMode)!==3,iu=null!==(ek=null!==(eD=(0,_.Rs)("enter_method"))&&void 0!==eD?eD:ir||id?"default_landing":void 0)&&void 0!==ek?ek:"other";B.Z.sendLog("playTime",(0,l._)((0,n._)((0,l._)((0,n._)((0,l._)((0,n._)((0,l._)((0,n._)((0,l._)((0,n._)((0,l._)((0,n._)({is_click_cover:eY,is_insert_wallpaper:eH,is_visible:String(e?1:0),duration:e2,duration_moving:e3,duration_waiting:ey.acc,report_reason:o,duration_error:e4,play_time:er,from_percent:1e3*eo/eB,to_percent:(null==i?void 0:i.currentTime)*1e3/eB,percentage:(null==i?void 0:i.currentTime)*1e3/eB,play_start_time:Math.floor(eo||0),play_end_time:Math.floor((null==i?void 0:i.currentTime)||0),is_auto_play:it,urlParamList:["trending_topic","previous_page"],enter_method:iu,tab_name:eg,author_id:eR,enter_from:(0,w.mo)(),enter_from_merge:(0,I.z)(""),group_id:eM,playlet_id:eN,log_pb:ej,video_detail_enter_from:(0,I.z)("web_link"),is_highlight_show:(0,H.Z)({awemeInfo:t})?1:0,speed:String(null==i?void 0:i.playbackRate),is_loop:String(ea),is_full_screen:(0,x.r)()?"1":"0",is_full_webscreen:V.s.getIsPageFullscreen()?"1":"0",is_author_card_expand:(null===(ei=m.Le.getConfig(m.gI.IsCollapseAuthorCard))||void 0===ei?void 0:ei.isCollapseAuthorCard)?0:1,from_follow_list:(null===(et=m.Le.getConfig(m.gI.FromFollowList))||void 0===et?void 0:et.tag)?"1":"0",from_push:b.Q.getItem({sKey:f.CookieKeys.FromClientPush})?1:0,is_mute:(null==i?void 0:i.muted)?"1":"0"},(0,E.t)()),{mute_type:null===(en=m.Le.getConfig(m.gI.ForceMuted))||void 0===en?void 0:en.currentMuteType,from_academy:e9,pic_cnt:eF,aweme_type:eV,trending_topic:e$,first_tag_name:eU,top:eW,is_pure:eZ,is_from_ad:(0,h.Jt)(t)?1:0,is_bytevc1:e6,browser_height:(0,T.P6)(),browser_width:(0,T.wi)(),browser_ratio:(0,T.P6)()/(0,T.wi)()}),(0,C.v)(t)),{is_landscape:eK,stage:`${eh}-${ep}`}),(0,$.Z)(),eO,e1.playTime||{}),{is_force:(null===(el=m.Le.getConfig(m.gI.ForceMuted))||void 0===el?void 0:el.currentMuteType)==="browser"?"1":"0",video_time:(0,D.n)(null==t?void 0:null===(es=t.video)||void 0===es?void 0:es.duration),auto_play_mode:null===(ev=m.Le.getConfig(m.gI.InnerAutoPlay))||void 0===ev?void 0:ev.mode,seo_vids:k.t("seo_vids")||"",video_play_method:null!==(eS=m.Le.getConfig(m.gI.VideoPlayMethod))&&void 0!==eS?eS:"auto",if_invisible:(0,S.Vr)()?"1":"0",is_small_window:(0,Z.f)()?"1":"0",small_window_scene:(0,Z.f)()?G.w_.getState().smallWindowScene:"",is_top:(0,S.k)()?"1":"0",url_source:null!==(eP=null==t?void 0:null===(ec=t.continationInfo)||void 0===ec?void 0:ec.urlSource)&&void 0!==eP?eP:["recommend","personal_homepage"].includes((0,w.vM)())?b.Q.getItem({sKey:f.CookieKeys.UrlSourceForBrowserPlugin}):"",play_order:(0,U.G)(),play_size:ie,video_bitrate:e7,audio_bitrate:(null===(e_=i.curDefinition)||void 0===e_?void 0:null===(em=e_.audioDefinition)||void 0===em?void 0:em.bitrate)||0,real_bitrate:e8,latest_group_id:eX,vduration:eB,vtype:ef}),(null==i?void 0:null===(ex=i.plugins)||void 0===ex?void 0:null===(eI=ex.srplugin)||void 0===eI?void 0:null===(ew=eI.getStat)||void 0===ew?void 0:ew.call(eI))||{}),{video_quality:null==i?void 0:null===(eb=i.curDefinition)||void 0===eb?void 0:eb.qualityType,gear_name:null==i?void 0:null===(eE=i.curDefinition)||void 0===eE?void 0:eE.gearName,sr_sharpness_strength:(null==i?void 0:null===(eT=i.curDefinition)||void 0===eT?void 0:eT.srSharpnessStrength)||-1,if_continued_play:m.Le.getConfig(m.gI.PlayRecord)?(0,O.v)(t.awemeId)?1:0:"",rate:m.Le.getConfig(m.gI.PlayRecord)?(null==i?void 0:i.currentTime)/(null==i?void 0:i.duration):""}),(0,W.m)({player:i}),(0,W.B)({player:i}),(0,p.K)(t)),{if_from_widget:e5?1:0,from_click_group_id:null!==(eL=null==t?void 0:t.insertId)&&void 0!==eL?eL:"",column_type:(null==eO?void 0:eO.column_type)||(null==eO?void 0:null===(eC=eO.search_params)||void 0===eC?void 0:eC.column_type),memory_js_heap_size_limit:il.jsHeapSizeLimit,memory_used_js_heap_size:il.usedJSHeapSize,memory_total_js_heap_size:il.totalJSHeapSize,memory_free_js_heap_size:il.freeJSHeapSize,memory_free_level:il.freeLevel,memory_use_level:il.usedLevel,battery_charging:null==io?void 0:io.charging,battery_level:null==io?void 0:io.level,if_first_big_card:eJ,is_ai_note:(0,K.Z)({awemeInfo:t})?1:0,sidebar_status:(0,P.GE)()}),(0,L.Wc)()),{is_recommend:"default_landing"===iu?Number(ia):void 0,is_selected_label:(null==t?void 0:t.weeklyRecommend)?1:0,is_first_large_card_outflow:eQ,sub_tab_name:eq,filter_name:e0}),!1),i.playTime=((null==i?void 0:i.playTime)||0)+e2,"seeking"!==o&&(0,R.y)((e,i)=>B.Z.sendLog(e,i,!1)),er=Date.now(),eu=Date.now(),ed=i.cumulateTime,ef=i.vtype,eh="reported",(0,F.y)(i,ea,t),ey.acc=0,"discover"===(0,w.mo)()&&M.emit(M.EVENT.selectDuration,{duration:e2})},eb=d()(()=>{if(!ec&&(null==i?!void 0:!i.paused))ep="seeking",ex("visible"===document.visibilityState,"seeking")},500,{leading:!0,trailing:!1}),eE=d()(()=>{ew("seeked"),ec=!1},500,{leading:!1,trailing:!0}),eT=e=>{ep=e,ex("visible"===document.visibilityState,e),ew(e)},eC=()=>{if(em&&(es=!0),!q.current&&!(0,N.Nr)(location.pathname)){ev=!0;return}eT("pause"),ev=!0},eD=()=>{em&&!es&&eT("destroy")},ek=e=>{i.video&&!(null==i?void 0:i.paused)&&(ep="changetab",ex(e,"page_visibility_change"),ew("changetab"))},eS=()=>{if(!ev&&!i.isSeeking)eT("degrade")},eP=()=>{if(!i.paused)eT("changeurl"),ec=!0},eL=()=>{r=Date.now()},eR=()=>{if(!i.isSeeking&&!i.paused)ey.startTime=Date.now()},eM=()=>{ey.startTime&&(ey.acc+=Date.now()-ey.startTime,ey.startTime=0)};return i.on("error",eL),i.on("seeked",eE),i.on("play",ew),i.on("replay",eI),i.on("seeking",eb),i.on("pause",eC),i.on("degrade",eS),i.on("urlchange",eP),(0,j.vP)(ek),i.once("destroy",eD),i.on(u.Events.WAITING,eR),i.on(u.Events.PLAYING,eM),i.on(u.Events.TIME_UPDATE,eM),()=>{i.off("error",eL),i.off("seeked",eE),i.off("seeking",eb),i.off("play",ew),i.off("replay",eI),i.off("pause",eC),i.off("destroy",eD),i.off("degrade",eS),i.off("urlchange",eP),i.off(u.Events.WAITING,eR),i.off(u.Events.PLAYING,eM),i.off(u.Events.TIME_UPDATE,eM),!ev&&eT("unmount"),(0,j.xC)(ek),Q.current=0}}},[t,i,r]),(0,o.useEffect)(()=>{if(i){let e=()=>{i.errored=0,!Q.current&&(Q.current=Date.now())};return i.on(u.Events.PLAY,e),()=>{i.off(u.Events.PLAY,e)}}},[i])}},792903:function(e,i,t){var n=t(629686),l=t(499059),o=t(709705),r=t(759894),d=t(618759),a=t(272726),u=t(426038);let s=(e,i)=>{let t=l.Le.getConfig(l.gI.BitrateResult);if(t&&t[e]&&i){var n;let l=null!==(n=t[e].find(e=>e.selectRate===i))&&void 0!==n?n:{};return{bitrateselector_type:l.type,bitrateselector_mode:l.mode,bitrateselector_speed:l.speed,bitrateselector_ori_rate_cnt:l.oriRateCnt,bitrateselector_filter_rate_cnt:l.filterRateCnt,bitrateselector_is_ori_max_rate:l.isOriMaxRate,bitrateselector_is_filter_max_rate_adapt:l.isFilterMaxRateAdapt,bitrateselector_adapt_tar_rate:l.adaptTarRate,bitrateselector_select_rate:l.selectRate,bitrateselector_bitrate_set:l.bitrateSetSelector,bitrateselector_quality:l.qualityBitrateSelector,bitrateselector_index_offset:l.bitrateselector_index_offset,bitrateselector_playlist_factor:l.bitrateselector_playlist_factor,playlist:l.playlist}}return{}};i.Z=e=>{try{var i,t,l,v,c,f,h,p,m,_,g,y,w,I,x,b,E,T,C;let D=(0,o.$o)(u.LocalStorageKeys.IsSupportHevc),{bitrate:k,realBitrate:S}=(null==e?void 0:e.curDefinition)||{};return(0,n._)({enter_from:(0,r.mo)(),internet_speed_dl:null===(t=navigator)||void 0===t?void 0:null===(i=t.connection)||void 0===i?void 0:i.downlink,cpu_core:null===(l=navigator)||void 0===l?void 0:l.hardwareConcurrency,memory_size:(0,d.Bl)(),UA_info:null===(v=navigator)||void 0===v?void 0:v.userAgent,webdriver:navigator&&navigator.webdriver?1:0,is_long_not_use_refresh_vid:!!(null==e?void 0:null===(c=e.config)||void 0===c?void 0:c.notUseRefreshVid),preplay_stat:(null==e?void 0:e.preplayStat)?1:0,prepause_stat:(null==e?void 0:e.prepauseStat)?1:0,player_start_time:(null==e?void 0:null===(f=e.config)||void 0===f?void 0:f.startTime)||0,video_codec:null==e?void 0:null===(h=e.mediaCodec)||void 0===h?void 0:h.videoCodec,audio_codec:null==e?void 0:null===(p=e.mediaCodec)||void 0===p?void 0:p.audioCodec,is_player_v2:0,player_id:null==e?void 0:e.playerId,chosenType:null==e?void 0:null===(m=e.curDefinition)||void 0===m?void 0:m.chosenType,chosenReason:null==e?void 0:null===(_=e.curDefinition)||void 0===_?void 0:_.chosenReason,audio_quality:(null==e?void 0:null===(y=e.curDefinition)||void 0===y?void 0:null===(g=y.audioDefinition)||void 0===g?void 0:g.audioQuality)||0,danmaku_getbounding_counts:(null==e?void 0:e.danmakuGetBoundingCounts)||0,danmu_el_create_counts:(null==e?void 0:e.danmuElCreateCounts)||0,danmaku_readdata_times:(null==e?void 0:null===(w=e.danmaku)||void 0===w?void 0:w.readDataTimes)>0?(null==e?void 0:null===(I=e.danmaku)||void 0===I?void 0:I.readDataTimes)-(null==e?void 0:e.firstframe):-1,danmaku_attach_times:(null==e?void 0:null===(x=e.danmaku)||void 0===x?void 0:x.attachTimes)>0?(null==e?void 0:null===(b=e.danmaku)||void 0===b?void 0:b.attachTimes)-(null==e?void 0:e.firstframe):-1,danmaku_startmove_times:(null==e?void 0:null===(E=e.danmaku)||void 0===E?void 0:E.startMoveTimes)>0?(null==e?void 0:null===(T=e.danmaku)||void 0===T?void 0:T.startMoveTimes)-(null==e?void 0:e.firstframe):-1,is_video_support:Number((0,a.k)().isSupport)},s(null==e?void 0:null===(C=e.config)||void 0===C?void 0:C.vid,(null==e?void 0:e.vtype)==="DASH"?S:k),D||{})}catch(e){return{}}}},908750:function(e,i,t){var n=t(992378);i.Z=()=>{var e,i,t;return{gpu_vendor:null===(e=(0,n.$h)())||void 0===e?void 0:e.vendor,gpu_score:null===(i=(0,n.$h)())||void 0===i?void 0:i.score,gpu_info:null===(t=(0,n.$h)())||void 0===t?void 0:t.info}}},889094:function(e,i,t){t.d(i,{B:function(){return a},m:function(){return d}});var n=t(629686),l=t(618759),o=t(499059),r=t(819765);let d=e=>{var i,t;let{player:n}=e,l=null==n?void 0:null===(t=n.definitionList)||void 0===t?void 0:null===(i=t.find)||void 0===i?void 0:i.call(t,e=>{var i;return(null==e?void 0:e.definition)===(null==n?void 0:null===(i=n.curDefinition)||void 0===i?void 0:i.orgDefinition)});if(n.orgDefinition=l,!l)return{};let{bitrate:o,definition:r,gearName:d,qualityType:a,size:u}=l;return{video_bitrate_origin:o,gear_name_origin:d,video_quality_origin:a,video_size_origin:u,definition_origin:r}},a=e=>{let{player:i}=e;try{var t,d,a,u,s,v,c,f,h,p,m,_,g,y;if(!(0,l.DT)())return(0,n._)({is_super_resolution:(null===(s=i.plugins)||void 0===s?void 0:null===(u=s.srplugin)||void 0===u?void 0:null===(a=u.getStat)||void 0===a?void 0:null===(d=a.call(u))||void 0===d?void 0:d.usingSR)?1:0,is_sr:(null===(h=i.plugins)||void 0===h?void 0:null===(f=h.srplugin)||void 0===f?void 0:null===(c=f.getStat)||void 0===c?void 0:null===(v=c.call(f))||void 0===v?void 0:v.usingSR)?1:0,is_sr_dowgrade_permanently:null!==(g=(0,r.i)())&&void 0!==g?g:0,is_sr_dowgrade_once:null!==(y=o.Le.getConfig(o.gI.SrDegrade))&&void 0!==y?y:0},(null==i?void 0:null===(_=i.plugins)||void 0===_?void 0:null===(m=_.srplugin)||void 0===m?void 0:null===(p=m.getStat)||void 0===p?void 0:p.call(m))||{});if(i.video&&(null===(t=window.TTCommon)||void 0===t?void 0:t.executeWithElement)){let e=JSON.parse(window.TTCommon.executeWithElement(i.video,"getSrCurrentInfo",""))||{};return(0,n._)({is_super_resolution:((null==e?void 0:e.sr_enable)!==3||(null==e?void 0:e.sr_local_error)!==0)&&((null==e?void 0:e.sr_local_error)||!((null==e?void 0:e.proc_avg)>0))?0:1,is_sr_called:(null==i?void 0:i.sr)?1:0,is_need_sr:(null==i?void 0:i.claritySr)?1:0,is_sr_canceled:i.cancelSR?1:0},e)}}catch(e){}return{is_super_resolution:0}}},32712:function(e,i,t){t.d(i,{Z:function(){return l}});var n=t(197427);function l(e){var i;let{awemeInfo:t,player:l}=e,o=(0,n.U)({awemeInfo:t,player:l});return{isH265:o,codecFormat:2===o?"bytevc2":1===o?"bytevc":"h264",videoFormat:null!==(i=null==l?void 0:l.playerType)&&void 0!==i?i:"mp4"}}},917737:function(e,i,t){t.d(i,{Z:function(){return l}});var n=t(499059);function l(e){var i;let{awemeInfo:t}=e,{douyinPCHighlight:l,selectAnchorExpandedContent:o}=t||{},{firstText:r,version:d}=l||{};return!!(null===(i=n.Le.getConfig(n.gI.AbtestData))||void 0===i?void 0:i.aiEntry)&&!!((r&&d?1:0)||(o?1:0))}},443782:function(e,i,t){t.d(i,{Z:function(){return n}});function n(e){let{awemeInfo:i}=e,t=(null==i?void 0:i.douyinPcVideoExtra)||{};return!!(null==t?void 0:t.aiNoteV2)}},958395:function(e,i,t){t.d(i,{y:function(){return d}}),t(706056);var n=t(499059),l=t(414061),o=t(687581),r=t(442379);let d=(e,i,t)=>{try{var d,a,u,s;if(!t||!e)return;let{list:o="",store:v}=null!==(a=n.Le.getConfig(n.gI.WatchLater))&&void 0!==a?a:{};if(!(t.watchLaterInfo||o.includes(t.awemeId)))return;let c=Math.floor((null!==(u=null==e?void 0:e.currentTime)&&void 0!==u?u:0)*1e3),f=null!==(s=null==t?void 0:null===(d=t.playProgress)||void 0===d?void 0:d.watch_times)&&void 0!==s?s:0,h=i||(null==e?void 0:e.ended),p=f||h?Math.max(f,1):0;if((0,r.ih)({actionType:2,itemToPlayinfo:{[t.awemeId]:{play_duration:Math.floor((null==e?void 0:e.currentTime)*1e3),loop_status:p}}}),!v||"object"!=typeof v)return;v[t.awemeId]={progress:c,loop:p},l.emit(l.EVENT.WatchLaterProgressChange)}catch(e){o.oe.event.info({name:o.Mo.PlayTimeBack,report:{code:null==e?void 0:e.code,message:null==e?void 0:e.message}})}}},333131:function(e,i,t){t.d(i,{A:function(){return T}});var n=t("629686"),l=t("402748");t("490629"),t("228983"),t("759943"),t("362051");var o=t("320165"),r=t("101199"),d=t("469935"),a=t.n(d),u=t("121998"),s=t("476534"),v=t("638052"),c=t("119778"),f=t("550514"),h=t("687581"),p=t("759894"),m=t("601034"),_=t("335924"),g=t("135947"),y=t("760537"),w=t("176449");let I=(0,r.forwardRef)((e,i)=>(0,o.jsx)("svg",(0,l._)((0,n._)({width:28,height:28,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:i},e),{children:(0,o.jsx)("path",{d:"M19.59 9.59a.833.833 0 1 0-1.18-1.18L14 12.822l-4.41-4.41a.833.833 0 0 0-1.18 1.178L12.822 14l-4.41 4.41a.833.833 0 1 0 1.178 1.18L14 15.177l4.41 4.411a.833.833 0 1 0 1.18-1.178L15.177 14l4.411-4.41z",fill:"#161823"})}))),x=(0,r.forwardRef)((e,i)=>(0,o.jsxs)("svg",(0,l._)((0,n._)({width:50,height:50,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:i},e),{children:[(0,o.jsxs)("g",{filter:"url(#ic_tick-circle_svg__filter0_d_747_17320)",shapeRendering:"crispEdges",children:[(0,o.jsx)("path",{d:"M25.001 44.992c11 0 20-9 20-20s-9-20-20-20-20 9-20 20 9 20 20 20z",fill:"#fff"}),(0,o.jsx)("path",{d:"M25.001 45.492c11.276 0 20.5-9.224 20.5-20.5s-9.224-20.5-20.5-20.5-20.5 9.224-20.5 20.5 9.224 20.5 20.5 20.5z",stroke:"#000",strokeOpacity:".1",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,o.jsx)("path",{d:"M30.303 30.303a7.5 7.5 0 1 1 0-10.607c.691.691 2.197 2.387 2.197 2.387",stroke:"#333",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M32.5 18.333v3.75h-3.75",stroke:"#333",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("defs",{children:(0,o.jsxs)("filter",{id:"ic_tick-circle_svg__filter0_d_747_17320",x:".001",y:"-.008",width:50,height:50,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,o.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,o.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,o.jsx)("feOffset",{}),(0,o.jsx)("feGaussianBlur",{stdDeviation:2}),(0,o.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,o.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),(0,o.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_747_17320"}),(0,o.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_747_17320",result:"shape"})]})})]})));var b=t("983218"),E=t("800513");let T=e=>{let{awemeInfo:i,onClose:t,onPaySuccess:d,onPayTimeout:T,logParams:C,shareScene:D}=e,[k,S]=(0,r.useState)(""),P=(0,r.useRef)(),L=(0,r.useRef)(0),R=(0,r.useRef)(!1),[M,N]=(0,r.useState)(void 0),[j,A]=(0,r.useState)(!1),B=(0,r.useCallback)(async()=>{var e,t,o,r,d,a,v;if(N(void 0),S(""),"subscribe"===(0,E.$m)(i)){s.toDataURL(`sslocal://aweme/detail/${i.awemeId}?refer=click_group_top_function&chat_type=group&enter_from=douyin_pc`).then(e=>{S(e),N(!1)}).catch(e=>{N(!0)});return}let[c,_="{}"]=null==i?void 0:null===(o=i.entertainmentProductInfo)||void 0===o?void 0:null===(t=o.buy_schema)||void 0===t?void 0:null===(e=t.split)||void 0===e?void 0:e.call(t,"?"),g=u.parse(_),y=null==i?void 0:null===(r=i.seriesInfo)||void 0===r?void 0:r.seriesId,w=null==i?void 0:null===(d=i.mixInfo)||void 0===d?void 0:d.mixId,I=await (0,f.kH)({shareScene:D||(y||w?"aweme_pc_video_pay":"aweme_pc_video_pay_new"),jsonParams:JSON.stringify((0,l._)((0,n._)({},g),{origin_appid:"6383",schema_type:"1",use_new_api:"1",mix_short_name:encodeURIComponent((null==_?void 0:_.mix_short_name)||""),group_id:null==i?void 0:i.awemeId}))});(null==I?void 0:I.statusCode)===0?(S(null==I?void 0:null===(a=I.data)||void 0===a?void 0:a.url),N(!1)):(h.oe.event.error({name:h.Mo.PaidVideoQRCodeError,report:{enterFrom:(0,p.mo)(),enterFromMerge:(0,m.yW)(),itemId:null==i?void 0:i.awemeId,buySchema:null==i?void 0:null===(v=i.entertainmentProductInfo)||void 0===v?void 0:v.buy_schema,logId:null==I?void 0:I.logId}}),N(!0))},[i]);(0,r.useEffect)(()=>{B()},[i]);let O=(0,r.useMemo)(()=>{var e,t,n,l,o,r,d;return{enter_from:(0,_.Rs)("enter_from"),module:decodeURIComponent((0,_.Rs)("module")||""),enter_from_merge:(0,m.yW)(),previous_page:(0,_.Rs)("previous_page"),group_id:null==i?void 0:i.awemeId,author_id:null==i?void 0:null===(e=i.authorInfo)||void 0===e?void 0:e.uid,ce_content_id:(null==i?void 0:null===(t=i.seriesInfo)||void 0===t?void 0:t.seriesId)||(null==i?void 0:null===(n=i.mixInfo)||void 0===n?void 0:n.mixId)||"",ce_content_type:(0,g.a)(i),ce_item_id:String((null==i?void 0:null===(l=i.seriesInfo)||void 0===l?void 0:l.currentEpisode)||(null==i?void 0:null===(o=i.mixInfo)||void 0===o?void 0:o.currentEpisode)),is_trailer:(null==i?void 0:null===(d=i.chargeInfo)||void 0===d?void 0:null===(r=d.preview_config)||void 0===r?void 0:r.is_preview)?1:0,from_group_id:null==C?void 0:C.from_group_id}},[C,i]);(0,r.useEffect)(()=>{v.logInstance.sendLog("pcPaymentPopupShow",(0,n._)({button_type:"scan"},O))},[]),(0,r.useEffect)(()=>{j&&v.logInstance.sendLog("pcPaymentPopupShow",(0,l._)((0,n._)({},O),{button_type:"refresh"}))},[j]);let F=(0,r.useCallback)(async()=>{var e,t;if(R.current)return;R.current=!0;let n=await (0,c.fetchUserRight)({itemList:[{itemId:null===(e=i.entertainmentProductInfo)||void 0===e?void 0:e.product_id_str,itemSku:null===(t=i.entertainmentProductInfo)||void 0===t?void 0:t.sku_id_str,itemIdType:1}],bizSceneType:2});0===n.statusCode&&n.userRightDetailList.find(e=>{var t,n;return e.itemId===(null===(t=i.entertainmentProductInfo)||void 0===t?void 0:t.product_id_str)&&e.itemSku===(null===(n=i.entertainmentProductInfo)||void 0===n?void 0:n.sku_id_str)})&&(null==d||d()),R.current=!1},[i,d,T]);return(0,r.useEffect)(()=>(!j&&(P.current=setInterval(()=>{L.current+=1,F(),L.current>=600&&(null==T||T(),A(!0),clearInterval(P.current),P.current=null)},1e3)),()=>{clearInterval(P.current),P.current=null}),[T,j]),(0,o.jsxs)("div",{className:y.default.container,children:[(0,o.jsxs)("div",{className:y.default.title,children:[(0,o.jsx)("span",{children:"抖音App扫码购买"}),(0,o.jsx)(w.Z,{src:I,width:28,height:28,viewBox:"0 0 28 28",onClick:e=>{e.stopPropagation(),L.current=0,null==t||t()}})]}),(0,o.jsxs)("div",{className:y.default.box,children:[void 0===M&&!k&&(0,o.jsx)(b.gb,{}),M&&(0,o.jsxs)("div",{className:a()(y.default.timeoutMask,y.default.smallBtnGrayContainer),onClick:async()=>{await B()},children:[(0,o.jsx)("div",{className:y.default.mask}),(0,o.jsxs)("div",{className:y.default.timeoutBox,children:[(0,o.jsx)(w.Z,{src:x,width:50,height:50,viewBox:"0 0 50 50"}),(0,o.jsx)("div",{className:y.default.mainTitle,children:"抖音码获取失败"}),(0,o.jsx)("div",{children:"点击刷新"})]})]}),k&&(0,o.jsx)("img",{src:k,style:"subscribe"===(0,E.$m)(i)?{borderRadius:16}:{},onError:()=>{N(!0)},onLoad:()=>{N(!1)}}),j&&(0,o.jsxs)("div",{className:a()(y.default.timeoutMask,y.default.smallBtnGrayContainer),onClick:async()=>{v.logInstance.sendLog("pcPaymentPopupClick",(0,l._)((0,n._)({},O),{button_type:"refresh"})),A(!1),L.current=0,await B()},children:[(0,o.jsx)("div",{className:y.default.mask}),(0,o.jsxs)("div",{className:y.default.timeoutBox,children:[(0,o.jsx)(w.Z,{src:x,width:50,height:50,viewBox:"0 0 50 50"}),(0,o.jsx)("div",{className:y.default.mainTitle,children:"二维码已过期"}),(0,o.jsx)("div",{children:"点击刷新"})]})]})]})]})}},140543:function(e,i,t){t.d(i,{O:function(){return v}}),t(490629);var n=t(59850),l=t(734123),o=t(101199),r=t(908219),d=t.n(r),a=t(37285),u=t(63601),s=t(94109);let v=e=>{var i,t,r;let{awemeInfo:v,isActive:c}=e,[f,h]=(0,o.useState)(()=>{var e,i,t,n,l,o;return(null==v?void 0:null===(i=v.chargeInfo)||void 0===i?void 0:null===(e=i.preview_config)||void 0===e?void 0:e.is_preview)?(null==v?void 0:null===(t=v.entertainmentPreviewConfig)||void 0===t?void 0:t.is_preview)&&(null==v?void 0:null===(o=v.entertainmentPreviewConfig)||void 0===o?void 0:o.end_time)||0:(null==v?void 0:null===(l=v.chargeInfo)||void 0===l?void 0:null===(n=l.preview_config)||void 0===n?void 0:n.end_time)||0}),[p,m]=(0,o.useState)(!((null==v?void 0:null===(t=v.chargeInfo)||void 0===t?void 0:null===(i=t.preview_config)||void 0===i?void 0:i.is_preview)||(null==v?void 0:null===(r=v.entertainmentPreviewConfig)||void 0===r?void 0:r.is_preview))),_=(0,u.n)(),g=(0,n.Z)(()=>{var e,i,t,n,l,o;let r=(null==v?void 0:null===(i=v.chargeInfo)||void 0===i?void 0:null===(e=i.preview_config)||void 0===e?void 0:e.end_time)||(null==v?void 0:null===(t=v.entertainmentPreviewConfig)||void 0===t?void 0:t.end_time)||0,d=(null==v?void 0:null===(l=v.chargeInfo)||void 0===l?void 0:null===(n=l.preview_config)||void 0===n?void 0:n.start_time)||(null==v?void 0:null===(o=v.entertainmentPreviewConfig)||void 0===o?void 0:o.start_time)||0,a=Math.ceil((null==_?void 0:_.currentTime)*1e3);r>=a&&d<=a?(h(r-a),m(!1)):m(!0)}),y=(0,n.Z)(()=>{var e,i,t,n,l,o;let r=(null==v?void 0:null===(i=v.chargeInfo)||void 0===i?void 0:null===(e=i.preview_config)||void 0===e?void 0:e.end_time)||(null==v?void 0:null===(t=v.entertainmentPreviewConfig)||void 0===t?void 0:t.end_time)||0,d=(null==v?void 0:null===(l=v.chargeInfo)||void 0===l?void 0:null===(n=l.preview_config)||void 0===n?void 0:n.start_time)||(null==v?void 0:null===(o=v.entertainmentPreviewConfig)||void 0===o?void 0:o.start_time)||0,a=Math.ceil((null==_?void 0:_.currentTime)*1e3);r>=a&&d<=a?(h(r-a),m(!1)):m(!0)}),w=(0,n.Z)(()=>{var e,i,t,n,l,o;m(!1),h((null==v?void 0:null===(i=v.chargeInfo)||void 0===i?void 0:null===(e=i.preview_config)||void 0===e?void 0:e.is_preview)?null==v?void 0:null===(n=v.chargeInfo)||void 0===n?void 0:null===(t=n.preview_config)||void 0===t?void 0:t.end_time:(null==v?void 0:null===(l=v.entertainmentPreviewConfig)||void 0===l?void 0:l.is_preview)?null==v?void 0:null===(o=v.entertainmentPreviewConfig)||void 0===o?void 0:o.end_time:0)}),I=d()(g,200),x=(0,n.Z)(()=>{var e,i,t,n,o,r;((null==v?void 0:null===(i=v.chargeInfo)||void 0===i?void 0:null===(e=i.preview_config)||void 0===e?void 0:e.is_preview)||(null==v?void 0:null===(t=v.entertainmentPreviewConfig)||void 0===t?void 0:t.is_preview))&&c&&(null==_||null===(n=_.on)||void 0===n||n.call(_,a.B.TimeUpdate,I),null==_||null===(o=_.on)||void 0===o||o.call(_,l.Events.SEEKING,y),null==_||null===(r=_.on)||void 0===r||r.call(_,a.B.Replay,w))}),b=(0,n.Z)(()=>{var e,i,t;null==_||null===(e=_.off)||void 0===e||e.call(_,a.B.TimeUpdate,I),null==_||null===(i=_.off)||void 0===i||i.call(_,l.Events.SEEKING,y),null==_||null===(t=_.off)||void 0===t||t.call(_,a.B.Replay,w)});return(0,o.useEffect)(()=>(x(),()=>{b()}),[null==v?void 0:v.awemeId,c,_]),(0,o.useEffect)(()=>{let e=()=>{if((0,s.zJ)(v)){var e;null==_||null===(e=_.replay)||void 0===e||e.call(_)}};if(_)return _.on("ended",e),()=>{_.off("ended",e)}},[v,_]),{previewTime:f,isPreivewFinish:p}}},764658:function(e,i,t){t.d(i,{A:function(){return en}});var n=t("629686");t("490629"),t("706056");var l=t("320165"),o=t("101199"),r=t("469935"),d=t.n(r),a=t("670556"),u=t("734123"),s=t("280647"),v=t("638052"),c=t("855357"),f=t("335924"),h=t("386206"),p=t("414061"),m=t("601034"),_=t("135947"),g=t("46892"),y=t("326367"),w=t("359118"),I=t("402748");let x=(0,o.forwardRef)((e,i)=>(0,l.jsx)("svg",(0,I._)((0,n._)({width:12,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:i},e),{children:(0,l.jsx)("path",{d:"M4.22 1.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 1 1-1.06-1.06L7.94 6 4.22 2.28a.75.75 0 0 1 0-1.06z",fill:"#FD9"})})));var b=t("140543"),E=t("48795"),T=t("489650");let C=(0,o.forwardRef)((e,i)=>(0,l.jsx)("svg",(0,I._)((0,n._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:i},e),{children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.284 11.223a.75.75 0 1 0-1.06 1.06l3.719 3.72-3.72 3.72a.75.75 0 0 0 1.061 1.06l3.72-3.72 3.718 3.72a.75.75 0 0 0 1.061-1.06l-3.719-3.72 3.72-3.72a.75.75 0 1 0-1.061-1.06l-3.72 3.72-3.719-3.72z",fill:"#fff",fillOpacity:".34"})})));var D=t("176449"),k=t("800513");let S=e=>{var i,t,r,d,a,u,s,c,h;let{awemeInfo:p,onBuy:g,onClose:y,logParams:w}=e,x=p.entertainmentProductInfo,b=(0,o.useMemo)(()=>{var e,i,t,n,l,o,r;return{enter_from:(0,f.Rs)("enter_from"),module:decodeURIComponent((0,f.Rs)("module")||""),enter_from_merge:(0,m.yW)(),previous_page:(0,f.Rs)("previous_page"),group_id:null==p?void 0:p.awemeId,author_id:null==p?void 0:null===(e=p.authorInfo)||void 0===e?void 0:e.uid,ce_content_id:(null==p?void 0:null===(i=p.seriesInfo)||void 0===i?void 0:i.seriesId)||(null==p?void 0:null===(t=p.mixInfo)||void 0===t?void 0:t.mixId)||"",ce_content_type:(0,_.a)(p),ce_item_id:String((null==p?void 0:null===(n=p.seriesInfo)||void 0===n?void 0:n.currentEpisode)||(null==p?void 0:null===(l=p.mixInfo)||void 0===l?void 0:l.currentEpisode)),is_trailer:(null==p?void 0:null===(r=p.chargeInfo)||void 0===r?void 0:null===(o=r.preview_config)||void 0===o?void 0:o.is_preview)?1:0,button_type:""}},[p]);(0,o.useEffect)(()=>{v.logInstance.sendLog("pcBuyCompleteContentShow",(0,I._)((0,n._)({},b),{from_group_id:null==w?void 0:w.from_group_id}))},[]);let S=(0,k.$m)(p);return(0,l.jsxs)("div",{className:T.default.container,onClick:g,children:[(0,l.jsx)(D.Z,{src:C,width:32,height:32,viewBox:"0 0 32 32",className:T.default.close,onClick:e=>{e.stopPropagation(),null==y||y()}}),(0,l.jsxs)("div",{className:T.default.mainLine,children:[(0,l.jsx)("img",{src:null==x?void 0:null===(t=x.cover_url)||void 0===t?void 0:null===(i=t.url_list)||void 0===i?void 0:i[0],className:T.default.cover}),"primary"===S&&(0,l.jsx)("div",{className:T.default.tag,children:"付费"}),"subscribe"===S&&(0,l.jsx)("div",{className:T.default.tag,children:"专属会员"}),(0,l.jsxs)("div",{className:T.default.infoBox,children:[(0,l.jsxs)("div",{className:T.default.title,children:[(0,l.jsx)("img",{src:null==x?void 0:null===(d=x.icon)||void 0===d?void 0:null===(r=d.url_list)||void 0===r?void 0:r[0],className:T.default.icon}),(0,l.jsx)("span",{className:T.default.titleText,children:x.title})]}),(0,l.jsx)("div",{className:T.default.subTitle,children:x.sub_title}),!!(null==x?void 0:null===(a=x.price_info)||void 0===a?void 0:a.current_price)&&(0,l.jsxs)("div",{className:T.default.price,children:[(0,l.jsx)("span",{className:T.default.priceNum,children:null==x?void 0:null===(u=x.price_info)||void 0===u?void 0:u.current_price}),null==x?void 0:null===(s=x.price_info)||void 0===s?void 0:s.currency_name,null==x?void 0:null===(c=x.price_info)||void 0===c?void 0:c.start_hint]})]})]}),(0,l.jsx)(E.Button,{className:T.default.buyButton,theme:"solid",children:(0,l.jsx)("span",{children:null==x?void 0:null===(h=x.button_info)||void 0===h?void 0:h.text_without_price})})]})};var P=t("333131"),L=t("984462");let R=(0,o.forwardRef)((e,i)=>(0,l.jsxs)("svg",(0,I._)((0,n._)({width:40,height:40,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:i},e),{children:[(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 40c11.046 0 20-8.954 20-20S31.046 0 20 0 0 8.954 0 20s8.954 20 20 20z",fill:"#13C15A"}),(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.344 14.509c.801.801.801 2.1 0 2.901l-8.65 8.651-1.097 1.096a2.735 2.735 0 0 1-3.868 0l-5.707-5.706a2.051 2.051 0 0 1 0-2.902l.13-.129a2.052 2.052 0 0 1 2.9 0l4.61 4.61 8.652-8.65a2.051 2.051 0 0 1 2.9 0l.13.129z",fill:"#fff"})]}))),M=e=>{let{awemeInfo:i,logParams:t}=e,[n,r]=(0,o.useState)(3),d=(0,o.useRef)(null);return(0,o.useEffect)(()=>{var e,n,l,o,r,d,a;v.logInstance.sendLog("pcPaymentStatus",{module:decodeURIComponent((0,f.Rs)("module")||""),enter_from_merge:(0,m.yW)(),previous_page:(0,f.Rs)("previous_page"),group_id:null==i?void 0:i.awemeId,author_id:null==i?void 0:null===(e=i.authorInfo)||void 0===e?void 0:e.uid,ce_content_id:(null==i?void 0:null===(n=i.seriesInfo)||void 0===n?void 0:n.seriesId)||(null==i?void 0:null===(l=i.mixInfo)||void 0===l?void 0:l.mixId)||"",ce_content_type:(0,_.a)(i),ce_item_id:String((null==i?void 0:null===(o=i.seriesInfo)||void 0===o?void 0:o.currentEpisode)||(null==i?void 0:null===(r=i.mixInfo)||void 0===r?void 0:r.currentEpisode)),is_trailer:(null==i?void 0:null===(a=i.chargeInfo)||void 0===a?void 0:null===(d=a.preview_config)||void 0===d?void 0:d.is_preview)?1:0,from_group_id:null==t?void 0:t.from_group_id})},[]),(0,o.useEffect)(()=>(clearInterval(d.current),r(3),d.current=setInterval(()=>{r(e=>(e<=1&&(clearInterval(d.current),window.location.reload()),e-.2))},200),()=>{clearInterval(d.current)}),[i]),(0,l.jsxs)("div",{className:L.default.container,children:[(0,l.jsx)("div",{className:L.default.title}),(0,l.jsx)(D.Z,{src:R,width:40,height:40,viewBox:"0 0 40 40"}),(0,l.jsx)("div",{className:L.default.buyResult,children:"购买成功"}),(0,l.jsxs)("div",{className:L.default.money,children:["剩余",Math.floor(n),"秒后,自动刷新页面"]}),(0,l.jsx)("div",{className:L.default.subTitle,children:(0,l.jsx)("span",{className:L.default.subTitme,children:"已购内容订单可在【抖音APP-我的-我的订单】中查看"})})]})};var N=t("59850"),j=t("528937"),A=t("66948"),B=t("550514"),O=t("37285"),F=t("63601");let V=e=>{let{awemeInfo:i,isActive:t}=e,n=(0,o.useRef)(3e3),l=(0,F.n)();(0,o.useEffect)(()=>{(async()=>{let e=await j.get({key:A.TccKey.SeriesConfig,defaultValue:A.TCC_DEFAULT_VALUE_MAP.get(A.TccKey.SeriesConfig)});n.currentTime=(null==e?void 0:e.paidRightTime)||3e3})()},[]);let r=(0,N.Z)(e=>{var t,l,o;let{currentTime:r}=e||{},d=Math.round(1e3*r),u=(null==i?void 0:null===(t=i.video)||void 0===t?void 0:t.duration)<36e4;(u||!u&&d>n.currentTime)&&((0,B.SK)({itemId:i.awemeId,skuId:null===(l=i.entertainmentProductInfo)||void 0===l?void 0:l.sku_id_str,spuId:null===(o=i.entertainmentProductInfo)||void 0===o?void 0:o.product_id_str,bizType:4}),a())}),d=(0,N.Z)(()=>{var e,t;let n=null==i?void 0:i.chargeInfo,o=null==i?void 0:null===(e=i.chargeInfo)||void 0===e?void 0:e.preview_config;(null==n?void 0:n.has_paid)&&(null==n?void 0:n.is_charge_content)&&!(null==o?void 0:o.is_preview)&&(null==l||null===(t=l.on)||void 0===t||t.call(l,O.B.TimeUpdate,r))}),a=(0,N.Z)(()=>{var e;null==l||null===(e=l.off)||void 0===e||e.call(l,O.B.TimeUpdate,r)});(0,o.useEffect)(()=>{if(t)return d(),()=>{a()}},[null==i?void 0:i.awemeId,t,l])};t("362051");var z=t("841434"),$=t("121998"),U=t("939165"),W=t("810069"),Y=t("19277"),Z=t("426038"),H=t("913285"),K=t("170939");let G=e=>{let{iframeRef:i,onClose:t}=e,n=e=>{var t,n;if((null==e?void 0:e.source)!==(null==i?void 0:null===(t=i.current)||void 0===t?void 0:t.contentWindow)||(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.type)!=="call_JSB")return;let{methodName:o,params:r=[],callbackID:d}=e.data,[a,u]=r;l(a,u,e=>{var t,n;null==i||null===(n=i.current)||void 0===n||null===(t=n.contentWindow)||void 0===t||t.postMessage({type:"executeCallback",callbackID:d,params:e,methodName:o},"*")})};(0,o.useEffect)(()=>(window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}),[i]);let l=async(e,i,n)=>{if("close"===e){null==t||t();return}if(window.innerJSB&&window.innerJSB[e]){let t=await window.innerJSB[e](void 0,i),r={code:t.code};if("fetch"===e){var l,o;r.raw=null==t?void 0:null===(o=t.data)||void 0===o?void 0:null===(l=o.data)||void 0===l?void 0:l.raw}"publishEvent"===e&&((0,z.s0)(i.eventName,i.params),(0,z.broadcastEvent)(i.eventName,i.params)),n(r)}}},X=e=>{let{awemeInfo:i,onClose:t,userInfo:n}=e,{info:r}=n||{},{uid:d,secUid:a}=r||{},u=(0,o.useRef)(null),s=(0,o.useRef)(null),[v,c]=(0,o.useState)(()=>{var e,t,n,l,o;let r=`author_id=${null==i?void 0:null===(e=i.authorInfo)||void 0===e?void 0:e.uid}&spu_id=${null==i?void 0:null===(t=i.mixInfo)||void 0===t?void 0:t.mixId}&user_id=${d}&request_page=vipvideo_try&short_currency_name=钻`,a=`https://lf-webcast-gr-sourcecdn.bytegecko.com/obj/byte-gurd-source-gr/webcast/mono/lynx/vip_user_core_rl3_douyin/web/pages/vip_paid_video_rl3/template.js?${encodeURIComponent(r)}`,u={aid:"6383",appName:"douyin_pc",appVersion:null!==(l=window.version)&&void 0!==l?l:"unknown",appLang:null!==(o=navigator.language)&&void 0!==o?o:"unknown",deviceId:null===(n=(0,W.Es)())||void 0===n?void 0:n.user_unique_id,channel:"douyin_pc",appTheme:(0,Y.Dr)(cookies.getItem({sKey:Z.CookieKeys.Theme})),updateVersionCode:"0.0.1"};return`sslocal://lynxview?url=${encodeURIComponent(a)}&global_props=${JSON.stringify(u)}`}),[f,h]=(0,o.useState)("");return(0,U.o)(()=>p.listen(p.EVENT.xOpen,e=>{var i,t;let{_ctx:n,_params:l}=e;if((null==n?void 0:n.containerID)&&(null==n?void 0:n.containerID)===(null===(i=u.current)||void 0===i?void 0:i.containerID)&&l.schema){let e={user_id:null!=d?d:"",sec_user_id:null!=a?a:"",user_unique_id:null===(t=(0,W.Es)())||void 0===t?void 0:t.user_unique_id},i=$.stringify(e);h(`${l.schema}&__isDouyinPC=true&${i}`)}}),[]),(0,U.o)(()=>p.listen(p.EVENT.xClose,e=>{var i;let{_ctx:n}=e;(null==n?void 0:n.containerID)===(null===(i=u.current)||void 0===i?void 0:i.containerID)&&(null==t||t())}),[t]),(0,U.o)(()=>{let e;let i=p.listen(p.EVENT.JoinVip,i=>{var t;let{_ctx:n}=i;(null==n?void 0:n.containerID)===(null===(t=u.current)||void 0===t?void 0:t.containerID)&&(e=setTimeout(()=>{window.location.reload()},1e3))});return()=>{null==i||i(),e&&clearTimeout(e)}},[]),G({iframeRef:s,onClose:()=>{h("")}}),(0,l.jsx)(H.k,{componentName:"PayWebView",children:(0,l.jsxs)("div",{className:K.default.container,children:[(0,l.jsx)(z.kh,{ref:u,nameSpace:z.lS.host,url:v,style:{width:"100%",height:"100%",border:"none"}}),f&&(0,l.jsx)("iframe",{className:K.default.h5Iframe,src:f,ref:s,allow:"*"},f)]},v)})};var J=t("746517"),Q=t("234150"),q=t("94109");t("93075"),t("374954");var ee=t("687581"),ei=t("759894");let et=e=>{let{awemeInfo:i}=e;(0,o.useEffect)(()=>{var e,t,n,l,o,r,d,a,u,s,v,c,f,h,p,_,g,y,w,I,x,b,E,T,C,D,S,P,L;if(!i)return;let R=(null==i?void 0:null===(n=i.video)||void 0===n?void 0:null===(t=n.bitRateList)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.format)==="mp4"&&!(null==i?void 0:null===(r=i.video)||void 0===r?void 0:null===(o=r.bitRateList)||void 0===o?void 0:null===(l=o[0])||void 0===l?void 0:l.playerAccessKey);(null==i?void 0:null===(d=i.chargeInfo)||void 0===d?void 0:d.is_charge_content)&&(null==i?void 0:null===(a=i.chargeInfo)||void 0===a?void 0:a.has_paid)&&!R&&ee.oe.event.error({name:ee.Mo.PaidVideoNoPlayerAccessKey,report:{enterFromMerge:(0,m.yW)(),enterFrom:(0,ei.mo)(),itemId:null==i?void 0:i.awemeId,logId:null==i?void 0:i.logPb,contentId:(null==i?void 0:null===(y=i.seriesInfo)||void 0===y?void 0:y.seriesId)||(null==i?void 0:null===(w=i.mixInfo)||void 0===w?void 0:w.mixId)||""}}),(null==i?void 0:null===(u=i.chargeInfo)||void 0===u?void 0:u.is_charge_content)&&(null==i?void 0:null===(s=i.chargeInfo)||void 0===s?void 0:s.has_paid)&&(null==i?void 0:null===(c=i.chargeInfo)||void 0===c?void 0:null===(v=c.preview_config)||void 0===v?void 0:v.is_preview)&&"limited"!==(0,k.$m)(i)&&ee.oe.event.error({name:ee.Mo.PaidVideoPreview,report:{enterFromMerge:(0,m.yW)(),enterFrom:(0,ei.mo)(),itemId:null==i?void 0:i.awemeId,logId:null==i?void 0:i.logPb,contentId:(null==i?void 0:null===(I=i.seriesInfo)||void 0===I?void 0:I.seriesId)||(null==i?void 0:null===(x=i.mixInfo)||void 0===x?void 0:x.mixId)||""}}),(null==i?void 0:null===(f=i.chargeInfo)||void 0===f?void 0:f.is_charge_content)&&!(null==i?void 0:null===(h=i.chargeInfo)||void 0===h?void 0:h.has_paid)&&!(null==i?void 0:null===(_=i.chargeInfo)||void 0===_?void 0:null===(p=_.preview_config)||void 0===p?void 0:p.is_preview)&&"limited"!==(0,k.$m)(i)&&!(0,q.GP)(i)&&ee.oe.event.error({name:ee.Mo.PaidVideoNoPayCanView,report:{enterFromMerge:(0,m.yW)(),enterFrom:(0,ei.mo)(),itemId:null==i?void 0:i.awemeId,logId:null==i?void 0:i.logPb,contentId:(null==i?void 0:null===(b=i.seriesInfo)||void 0===b?void 0:b.seriesId)||(null==i?void 0:null===(E=i.mixInfo)||void 0===E?void 0:E.mixId)||""}});let M=i.entertainmentProductInfo;if(M&&(null==i?void 0:null===(g=i.chargeInfo)||void 0===g?void 0:g.is_charge_content)){let e=[],t=[];!(null==M?void 0:null===(C=M.cover_url)||void 0===C?void 0:null===(T=C.url_list)||void 0===T?void 0:T[0])&&t.push("cover"),!(null==M?void 0:M.title)&&t.push("title"),!(null==M?void 0:M.sub_title)&&t.push("sub_title"),!(null==M?void 0:null===(D=M.button_info)||void 0===D?void 0:D.text_without_price)&&t.push("text_without_price"),!(null==M?void 0:M.buy_schema)&&t.push("buy_schema"),!(null==i?void 0:null===(S=i.chargeInfo)||void 0===S?void 0:S.preview_config)&&e.push("preview_config"),e.length>0&&ee.oe.event.error({name:ee.Mo.PaidVideoNoCardInfo,report:{enterFromMerge:(0,m.yW)(),enterFrom:(0,ei.mo)(),itemId:null==i?void 0:i.awemeId,lessInfo:e,type:"tag",logId:null==i?void 0:i.logPb,contentId:(null==i?void 0:null===(P=i.seriesInfo)||void 0===P?void 0:P.seriesId)||(null==i?void 0:null===(L=i.mixInfo)||void 0===L?void 0:L.mixId)||""}}),t.length>0&&ee.oe.event.error({name:ee.Mo.PaidVideoNoCardInfo,report:{enterFromMerge:(0,m.yW)(),enterFrom:(0,ei.mo)(),itemId:null==i?void 0:i.awemeId,lessInfo:t,type:"card",logId:null==i?void 0:i.logPb}})}},[i])},en=e=>{var i,t,r,I,E,T,C,L;let{className:R,awemeInfo:N,isActive:j,isDetail:A=!1,needSpace:B=!1,abTestData:O,userInfo:z,isShowBuy:$=!0,isMini:U=!1,isShowLimited:W=!1,logParams:Y}=e,Z=(0,q.GP)(N),H=(null==z?void 0:null===(i=z.info)||void 0===i?void 0:i.uid)===(null==N?void 0:null===(t=N.authorInfo)||void 0===t?void 0:t.uid),K=(0,k.$m)(N),G="subscribe"===K,ee="1"===(0,f.Rs)("open_member_card"),[ei,en]=(0,o.useState)(!1),[el,eo]=(0,o.useState)(!1),[er,ed]=(0,o.useState)(!(A&&(Z||ee&&G))),{previewTime:ea,isPreivewFinish:eu}=(0,b.O)({awemeInfo:N,isActive:j});V({awemeInfo:N,isActive:j});let es=(0,F.n)(),ev=(0,h.$y)(ea);et({awemeInfo:N}),(0,o.useEffect)(()=>{eu?(["primary","subscribe"].includes(K)&&p.emit(p.EVENT.ShowPreviewPaidMask,{isShow:!0,awemeId:null==N?void 0:N.awemeId,playerId:null==es?void 0:es.playerId}),A&&"limited"!==K&&ed(!1)):!Z&&p.emit(p.EVENT.ShowPreviewPaidMask,{isShow:!1,awemeId:null==N?void 0:N.awemeId,playerId:null==es?void 0:es.playerId})},[eu,A]);let ec=(0,o.useMemo)(()=>{var e,i,t,n,l,o,r;return{enter_from:(0,f.Rs)("enter_from"),module:decodeURIComponent((0,f.Rs)("module")||""),enter_from_merge:(0,m.yW)(),previous_page:(0,f.Rs)("previous_page"),group_id:null==N?void 0:N.awemeId,from_group_id:null==Y?void 0:Y.from_group_id,author_id:null==N?void 0:null===(e=N.authorInfo)||void 0===e?void 0:e.uid,ce_content_id:(null==N?void 0:null===(i=N.seriesInfo)||void 0===i?void 0:i.seriesId)||(null==N?void 0:null===(t=N.mixInfo)||void 0===t?void 0:t.mixId)||"",ce_content_type:(0,_.a)(N),ce_item_id:String((null==N?void 0:null===(n=N.seriesInfo)||void 0===n?void 0:n.currentEpisode)||(null==N?void 0:null===(l=N.mixInfo)||void 0===l?void 0:l.currentEpisode)),is_trailer:(null==N?void 0:null===(r=N.chargeInfo)||void 0===r?void 0:null===(o=r.preview_config)||void 0===o?void 0:o.is_preview)?1:0,button_type:""}},[N,Y]),ef=(0,o.useCallback)(()=>{if(v.logInstance.sendLog("pcBuyCompleteContentClick",(0,n._)({},ec)),A){if(null==z?void 0:z.isLogin)en(!0);else{var e,i;(0,J.default)({success:async()=>{var e,i;null===(i=window)||void 0===i||null===(e=i.location)||void 0===e||e.reload()},enterMethod:"paid_video",headerText:"登录后即可购买",next:`https://${null===(i=window)||void 0===i?void 0:null===(e=i.location)||void 0===e?void 0:e.host}`})}}},[A,z,ec]),eh=(0,o.useCallback)(()=>{A&&en(!1)},[A]),ep=(0,o.useCallback)(()=>{eo(!0),en(!1)},[]),em=(0,o.useCallback)(()=>{ed(!0)},[]),e_=(0,o.useCallback)(()=>{ed(!0)},[]);(0,o.useEffect)(()=>{var e,i,t,n,l,o,r,d;let a=null==N?void 0:null===(i=N.chargeInfo)||void 0===i?void 0:null===(e=i.preview_config)||void 0===e?void 0:e.is_preview,s=null==N?void 0:null===(n=N.chargeInfo)||void 0===n?void 0:null===(t=n.preview_config)||void 0===t?void 0:t.end_time,v=null==N?void 0:null===(o=N.chargeInfo)||void 0===o?void 0:null===(l=o.preview_config)||void 0===l?void 0:l.start_time;if(a&&!(null==N?void 0:null===(r=N.chargeInfo)||void 0===r?void 0:r.has_paid)&&"limited"!==K&&es){let e=()=>{var e,i,t,n,l,o,r,d,a,u,c,f,h,p;v>0&&(null==es||null===(t=es.plugins)||void 0===t||null===(i=t.progresspreview)||void 0===i||null===(e=i.createDot)||void 0===e||e.call(i,{id:`${null==N?void 0:N.awemeId}${v}`,time:v/1e3,stylePreferred:!0,style:{height:"4px",width:"4px",backgroundColor:"#fd9",top:"-1px",minWidth:"4px"}}),(null==N?void 0:null===(l=N.chargeInfo)||void 0===l?void 0:null===(n=l.preview_config)||void 0===n?void 0:n.start_time)>0&&(null==es||null===(d=es.seek)||void 0===d||d.call(es,(null==N?void 0:null===(r=N.chargeInfo)||void 0===r?void 0:null===(o=r.preview_config)||void 0===o?void 0:o.start_time)/1e3))),s>0&&(null==es||null===(c=es.plugins)||void 0===c||null===(u=c.progresspreview)||void 0===u||null===(a=u.createDot)||void 0===a||a.call(u,{id:`${null==N?void 0:N.awemeId}${s}`,time:s/1e3,stylePreferred:!0,style:{height:"4px",width:"4px",backgroundColor:"#fd9",top:"-1px",minWidth:"4px"}}),null==es||null===(p=es.plugins)||void 0===p||null===(h=p.progress)||void 0===h||null===(f=h.updateConfig)||void 0===f||f.call(h,{previewPaidTime:s,showPaidDot:!0}))};return null==es||null===(d=es.once)||void 0===d||d.call(es,u.Events.DURATION_CHANGE,e),()=>{if(es){var i,t,n,l,o,r,d;null==es||null===(n=es.plugins)||void 0===n||null===(t=n.progresspreview)||void 0===t||null===(i=t.deleteAllDots)||void 0===i||i.call(t),null==es||null===(r=es.plugins)||void 0===r||null===(o=r.progress)||void 0===o||null===(l=o.updateConfig)||void 0===l||l.call(o,{showPreview:!1}),null==es||null===(d=es.off)||void 0===d||d.call(es,u.Events.DURATION_CHANGE,e)}}}},[N,es]),(0,s.Z)(()=>{en(!1),eo(!1),ed(!(A&&Z)),!Z&&p.emit(p.EVENT.ShowPreviewPaidMask,{isShow:!1,awemeId:null==N?void 0:N.awemeId,playerId:null==es?void 0:es.playerId})},[null==N?void 0:N.awemeId]);let eg=!(null==N?void 0:null===(r=N.chargeInfo)||void 0===r?void 0:r.is_charge_content)||U||H;return((0,o.useEffect)(()=>{er&&!eg&&j&&v.logInstance.sendLog("pcPaidLogoShow",(0,n._)({},ec))},[er,j]),(0,o.useEffect)(()=>{var e,i;eu&&(null==N?void 0:null===(i=N.chargeInfo)||void 0===i?void 0:null===(e=i.preview_config)||void 0===e?void 0:e.is_preview)&&v.logInstance.sendLog("pcTrailEndShow",(0,n._)({},ec))},[eu]),eg||N.awemeType===c.e.Lvideo&&(null==N?void 0:null===(T=N.entertainmentVideoPaidWay)||void 0===T?void 0:null===(E=T.paid_ways)||void 0===E?void 0:null===(I=E[0])||void 0===I?void 0:I.paid_way)===9)?null:(null==N?void 0:null===(C=N.chargeInfo)||void 0===C?void 0:C.has_paid)?(0,l.jsx)("div",{className:d()(w.default.outerContainer,R,{[w.default.noVideoInfoSpace]:B}),children:(0,l.jsx)("div",{className:d()(w.default.container),children:(0,l.jsx)("div",{className:w.default.innerContainer,children:(0,l.jsx)("span",{className:d()(w.default.payed),children:(null==N?void 0:null===(L=N.chargeInfo)||void 0===L?void 0:L.has_right_text)||"已付费"})})})}):(0,l.jsxs)("div",{className:d()(w.default.outerContainer,R,{[w.default.noVideoInfoSpace]:B}),children:[!el&&!ei&&er&&(0,l.jsx)("div",{className:d()(w.default.container),onClick:()=>{if(v.logInstance.sendLog("pcPaidLogoClick",(0,n._)({},ec)),!!$)if(A){if(null==z?void 0:z.isLogin)ed(!1);else{var e,i;(0,J.default)({success:async()=>{var e,i;null===(i=window)||void 0===i||null===(e=i.location)||void 0===e||e.reload()},enterMethod:"paid_video",headerText:"登录后即可购买",next:`https://${null===(i=window)||void 0===i?void 0:null===(e=i.location)||void 0===e?void 0:e.host}`})}}else{p.emit(p.EVENT.videoPause,"PaidVideoPay");let e=A?"":`current_video_time=${Math.ceil(null==es?void 0:es.currentTime)}${G?"&open_member_card=1":""}`,i=(0,g.JF)(null==N?void 0:N.awemeId,e);window.open(i,(0,y.f)()?"_self":"_blank","noopener")}},children:(0,l.jsxs)("div",{className:w.default.innerContainer,children:["primary"===K&&(0,l.jsx)("span",{className:d()(w.default.pay,{[w.default.allBorder]:Z&&!$}),children:"付费"}),"subscribe"===K&&(0,l.jsx)("span",{className:d()(w.default.pay,{[w.default.allBorder]:Z&&!$}),children:"专属会员"}),"limited"===K&&W&&(0,l.jsx)("span",{className:d()(w.default.pay,w.default.limited,w.default.allBorder),children:"限免"}),!Z&&["primary","subscribe"].includes(K)&&(0,l.jsx)("span",{className:w.default.countdown,children:eu?"试看结束":`试看${ev}`}),$&&["primary","subscribe"].includes(K)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:w.default.divider}),(0,l.jsx)(Q.a,{href:(0,g.JF)(null==N?void 0:N.awemeId),target:"_blank",className:w.default.buy,onClick:e=>{e.preventDefault()},children:"购买"}),(0,l.jsx)(D.Z,{src:x,viewBox:"0 0 12 12",width:12,height:12,className:w.default.arrow})]})]})}),!el&&!ei&&!er&&(G?(0,l.jsx)(a.NoSSR,{children:(0,l.jsx)(X,{awemeInfo:N,onClose:e_,logParams:Y,userInfo:z})}):(0,l.jsx)(S,{awemeInfo:N,onBuy:ef,onClose:em,logParams:Y})),!el&&ei&&(0,l.jsx)(P.A,{awemeInfo:N,onClose:eh,onPaySuccess:ep,logParams:Y}),el&&(0,l.jsx)(M,{awemeInfo:N,logParams:Y})]})}},195691:function(e,i,t){t.d(i,{v:function(){return f}}),t(490629),t(780582);var n=t(320165),l=t(101199),o=t(469935),r=t.n(o),d=t(734123),a=t(463686),u=t(414061),s=t(889429),v=t(549154),c=t(63601);let f=e=>{let{info:i,activeIndex:t,currentIndex:o,albumMusic:f,isInPreview:h,inSearch:p,isOneLive:m}=e,_=(0,l.useRef)(),g=(0,c.n)(),[y,w]=(0,l.useState)(!1),I=(0,l.useRef)(!1),x=(0,l.useMemo)(()=>{let e=i.video.bitRateList.find(e=>0===e.isH265);return e&&e.playAddr?e.playAddr.map(e=>({src:(0,a.preProcessUrl)(e.src).url})).concat({src:e.playApi}):[]},[i.video]);return((0,l.useEffect)(()=>{if(g){if(t===o){if(!g.paused){var e;null===(e=_.current)||void 0===e||e.play()}}else _.current&&(_.current.paused||_.current.pause(),_.current.currentTime=0)}},[g,t,o]),(0,l.useEffect)(()=>{if(g&&t===o){let e=()=>{var e;if(!(g.currentTime<=.5)||!I.current)f.beginTime,null===(e=_.current)||void 0===e||e.play()};return g.on("play",e),()=>{g.off("play",e)}}},[g,t,o]),(0,l.useEffect)(()=>{if(g){let e=()=>{var e;if(!(g.currentTime<=.5)&&!(g.duration-g.currentTime<=.5)&&(!(f.beginTime>1e3)||!(g.currentTime-f.beginTime/1e3<=.5)&&!(f.endTime/1e3-g.currentTime<=.5)))null===(e=_.current)||void 0===e||e.pause()};return g.on("pause",e),()=>{g.off("pause",e)}}},[g]),(0,l.useEffect)(()=>{if(g){let e=()=>{I.current=!0};return g.on("ended",e),()=>{g.off("ended",e)}}},[g]),(0,l.useEffect)(()=>{if(g&&t===o){let e=u.listen(u.EVENT.notevideo,e=>{let{type:i,index:n,playerId:l}=e;_.current&&"replay"===i&&l===g.playerId&&n===t&&_.current.play()});return()=>e()}},[g,t,o]),(0,l.useEffect)(()=>{if(g){let e=u.listen(u.EVENT.notevideo,e=>{"onelive_start"===e.type&&w(!0),"onelive_end"===e.type&&w(!1)});return()=>e()}},[g]),(0,l.useEffect)(()=>{t!==o&&w(!1)},[t,o]),(0,l.useEffect)(()=>{if(g&&t===o&&_.current){.01===g.volume?_.current.volume=parseFloat(g.config.volume_raw)||0:_.current.volume=g.volume,_.current.muted=g.muted;let e=e=>{if(!0!==e.isInternalOp).01===g.volume?_.current.volume=parseFloat(g.config.volume_raw)||0:_.current.volume=g.volume,_.current.muted=g.muted};return null==g||g.on(d.Events.VOLUME_CHANGE,e),()=>{null==g||g.off(d.Events.VOLUME_CHANGE,e)}}},[g,t,o]),o-t>1||o-t<-1)?null:(0,n.jsx)("div",{className:r()(v.default.container,{[v.default.withoutProgress]:m,[v.default.inSearch]:p,[v.default.isInPreview]:h,[v.default.livePhoto]:5===i.clipType,[v.default.isInLive]:y}),children:(0,n.jsx)("video",{className:v.default.video,muted:!0,playsInline:!0,"x5-playsinline":!0,"webkit-playsinline":!0,autoPlay:!1,onPlay:()=>{u.emit(u.EVENT.notevideo,{type:"start",playerId:null==g?void 0:g.playerId,index:o}),!m&&setTimeout(()=>{w(!0)})},onEnded:()=>{u.emit(u.EVENT.notevideo,{type:"end",playerId:null==g?void 0:g.playerId,index:o}),!m&&setTimeout(()=>{w(!1)})},onTimeUpdate:()=>{var e,i;u.emit(u.EVENT.notevideo,{type:"timeupdate",playerId:null==g?void 0:g.playerId,data:(null===(e=_.current)||void 0===e?void 0:e.currentTime)*1e3,index:o}),(0,s.G6)()&&(null==g?void 0:g.paused)&&(null===(i=_.current)||void 0===i||i.pause())},ref:_,children:x.map((e,i)=>(0,n.jsx)("source",{src:e.src},i))})})}},671913:function(e,i,t){t.d(i,{X:function(){return _}});var n=t(629686),l=t(101199),o=t(198412),r=t.n(o),d=t(5784),a=t.n(d),u=t(687875),s=t(63601),v=t(517038),c=t(373398);let{ArrowLeft:f,ArrowRight:h,A:p,D:m}=u.bf,_=e=>{let i=(0,s.n)(),{preClick:t,nextClick:o,disableShortCut:d=!1,active:u=!0}=e;return(0,l.useEffect)(()=>{if(!!u){if(i){if(d)return(0,v.K)(i);let e={left:{keyCode:f.keyCode,action:t,disable:!1,noBodyTarget:!1},right:{keyCode:h.keyCode,action:o,disable:!1,noBodyTarget:!1},leftA:{keyCode:p.keyCode,action:t,disable:!1,noBodyTarget:!1},rightD:{keyCode:m.keyCode,action:o,disable:!1,noBodyTarget:!1}},l={left:r()(i,"plugins.keyboard.keyCodeMap.left"),right:r()(i,"plugins.keyboard.keyCodeMap.right"),leftA:r()(i,"plugins.keyboard.keyCodeMap.leftA"),rightD:r()(i,"plugins.keyboard.keyCodeMap.rightD")};return a()(i,"plugins.keyboard.keyCodeMap",(0,n._)({},r()(i,"plugins.keyboard.keyCodeMap")||{},e)),()=>{i.plugins.keyboard&&((0,c.v)({currentCodeMap:i.plugins.keyboard.keyCodeMap,additionalCodeMap:e}),a()(i,"plugins.keyboard.keyCodeMap",(0,n._)({},r()(i,"plugins.keyboard.keyCodeMap")||{},l)))}}}},[i,t,o,d,u]),null}},755890:function(e,i,t){t.d(i,{t:function(){return s},v:function(){return u}}),t(490629);var n=t(101199),l=t(855357),o=t(499059);let r=(e,i)=>(null==i?void 0:i.awemeType)!==l.e.Note&&(null==e?void 0:e.duration)>60&&(null==e?void 0:e.currentTime)>30&&(null==e?void 0:e.duration)-(null==e?void 0:e.currentTime)>=10,d=e=>{let{awemeId:i,time:t,maxLength:n,scene:l}=e,r={awemeId:i,time:t,recordTime:Date.now(),scene:l},d=(o.Le.getConfig(o.gI.PlayRecord)||[]).filter(e=>e.scene===l&&e.awemeId!==i);if(d.length>=n){let e=[...d.slice(1),r];o.Le.setConfig(o.gI.PlayRecord,e)}else{let e=[...d,r];o.Le.setConfig(o.gI.PlayRecord,e)}},a=e=>{let i=(o.Le.getConfig(o.gI.PlayRecord)||[]).filter(i=>i.awemeId!==e);o.Le.setConfig(o.gI.PlayRecord,i)},u=e=>{if("undefined"==typeof location)return 0;let i=(o.Le.getConfig(o.gI.PlayRecord)||[]).filter(i=>i.awemeId===e&&i.scene===location.pathname&&i.recordTime+864e5>Date.now());return i.length>0?i[0].time:0},s=e=>{let{awemeInfo:i,player:t,isActive:l,from:s}=e,v=(0,n.useRef)(l),c=(0,n.useRef)(i.awemeId),f=(0,n.useRef)(i),h=(0,n.useRef)(t),p=(0,n.useRef)(l),m=(0,n.useRef)("");return f.current=i,h.current=t,p.current=l,(0,n.useEffect)(()=>{m.current=location.pathname},[]),(0,n.useEffect)(()=>{o.Le.getConfig(o.gI.PlayRecord)||o.Le.setConfig(o.gI.PlayRecord,[])},[]),(0,n.useEffect)(()=>{var e,n,r,d;let a=u(i.awemeId);(null==t?void 0:null===(e=t.config)||void 0===e?void 0:e.startTime)&&(null==t?void 0:null===(n=t.plugins)||void 0===n?void 0:n.xgVodLogger)&&(t.plugins.xgVodLogger.start_time=a),t&&l&&a&&!t.config.startTime&&(!(null===(r=o.Le.getConfig(o.gI.AbtestData))||void 0===r?void 0:r.seekOpt)&&t.seek(a),t.config.startTime=a,(null===(d=t.plugins)||void 0===d?void 0:d.xgVodLogger)&&(t.plugins.xgVodLogger.start_time=a))},[i,t,l]),(0,n.useEffect)(()=>{let e=l!==v.current&&!l,n=l===v.current&&l&&i.awemeId!==c.current;(e||n)&&(r(t,i)?(d({awemeId:c.current,time:null==t?void 0:t.currentTime,maxLength:15,scene:m.current}),t.isPlaying=!1):u(null==i?void 0:i.awemeId)&&(null==t?void 0:t.currentTime)!==0&&a(c.current)),c.current=i.awemeId,v.current=l},[l,i,t]),(0,n.useEffect)(()=>{let e=()=>{let e=f.current,n=h.current,l=p.current||"searchPlayer"===s&&v.current;if(!!e&&!!n&&!!l)r(n,e)?(d({awemeId:e.awemeId,time:null==n?void 0:n.currentTime,maxLength:15,scene:m.current}),n.isPlaying=!1):u(null==i?void 0:i.awemeId)&&(null==t?void 0:t.currentTime)!==0&&a(c.current)};return null==t||t.on("destroy",e),()=>{null==t||t.off("destroy",e)}},[t,s]),null}},517038:function(e,i,t){t.d(i,{K:function(){return n}});function n(e){var i,t;if(null==e?void 0:null===(t=e.plugins)||void 0===t?void 0:null===(i=t.keyboard)||void 0===i?void 0:i.keyCodeMap){let i=e.plugins.keyboard.keyCodeMap||{},t={};return Object.keys(i).forEach(e=>{i[e]&&(t[e]=i[e].disable,i[e].disable=!0)}),()=>{var i,n;let l=(null==e?void 0:null===(n=e.plugins)||void 0===n?void 0:null===(i=n.keyboard)||void 0===i?void 0:i.keyCodeMap)||{};l&&Object.keys(l).forEach(e=>{l[e]&&(l[e].disable=t[e])})}}}},814129:function(e,i,t){t.d(i,{Zf:function(){return a}}),t(490629);var n=t(885112),l=t(75740),o=t(855357),r=t(393782),d=t(723349);let a=e=>{var i,t,a,u,s,v,c;let{config:f,awemeInfo:h,abtestData:p}=e;if((null==h?void 0:h.awemeType)===o.e.Lvideo&&(f.plugins=[...f.plugins,n.default]),null==f?void 0:null===(t=f.definition)||void 0===t?void 0:null===(i=t.list)||void 0===i?void 0:i.find(e=>(null==e?void 0:e.vtype)===l.l0.DASH)){try{if((null==f?void 0:null===(u=f.DASHPlugin)||void 0===u?void 0:null===(a=u.autoBitrateOpts)||void 0===a?void 0:a.isOpenAutoDefi)&&h&&(null==p?void 0:null===(s=p.abrConfig)||void 0===s?void 0:s.allowExtra)){let e=null===(c=(0,d.QF)({awemeInfo:h,abtestData:p,disableBitRateFilter:!0}))||void 0===c?void 0:null===(v=c.definition)||void 0===v?void 0:v.list,i=null==e?void 0:e.filter(e=>1!==e.manualOnly),t=null==i?void 0:i.filter(e=>(null==e?void 0:e.vtype)===l.l0.DASH),n=(0,r.tp)(t,p,h,"h265");f.definition.extraList=n}}catch(e){}f.plugins=[...f.plugins,n.default]}}},921626:function(e,i,t){t.d(i,{I:function(){return d}});var n=t("229757"),l=t.n(n);let o={disable:!1,used:!1,player:null,firstFrame:{used:!1,data:null,perfTime:0},autoplayStarted:{used:!1,data:null,perfTime:0},loadstart:{used:!1,data:null,perfTime:0},loadeddata:{used:!1,data:null,perfTime:0},playtime:{used:!1,data:null,perfTime:0},playfinish:{used:!1,data:null},prfFirstFeedShow:{used:!1,data:null},prfFirstFrameStart:{used:!1,data:null}},r=l()(o),d=()=>(!window.__INLINE_PLAYER_DATA__&&(window.__INLINE_PLAYER_DATA__=o),window.__INLINE_PLAYER_DATA__.disable)?r:window.__INLINE_PLAYER_DATA__},488904:function(e,i,t){t.d(i,{c:function(){return _},d:function(){return g}}),t(706056),t(112459),t(759943);var n=t(5784),l=t.n(n),o=t(121998),r=t(885112),d=t(650047),a=t(426038),u=t(72430),s=t(8013),v=t(499059),c=t(486463),f=t(332009),h=t(140726);let p=e=>{let{player:i,state:t}=e;l()(i,"config.autoplay",t),l()(i,"autoplay",t),l()(i,"preloadActive",t),(0,c.wS)(i.playerId,t)},m=e=>{var i,t,n,l,o,a;let{player:u,gearType:s,config:v,awemeInfo:c}=e;u.config.userSelectDefinition=s,u.config.definition=null==v?void 0:v.definition,u.config.DASHPlugin=null==v?void 0:v.DASHPlugin;try{(null==v?void 0:null===(n=v.plugins)||void 0===n?void 0:n.includes(r.default))?(u.unRegisterPlugin(d.default.pluginName,!0),!(null==u?void 0:null===(o=u.plugins)||void 0===o?void 0:o.dashplugin)&&u.registerPlugin(r.default)):(null==v?void 0:null===(l=v.plugins)||void 0===l?void 0:l.includes(d.default))?(u.unRegisterPlugin(r.default.pluginName,!0),!(null==u?void 0:null===(a=u.plugins)||void 0===a?void 0:a.mp4encryptplayer)&&u.registerPlugin(d.default)):(u.unRegisterPlugin(r.default.pluginName,!0),u.unRegisterPlugin(d.default.pluginName,!0))}catch(e){}null===(t=u.getPlugin)||void 0===t||null===(i=t.call(u,"PlayClaritySettingPlugin"))||void 0===i||i.updateConfig({awemeInfo:c})},_=e=>{let{player:i}=e;p({player:i,state:!1}),i.pause(),i.pauseType="notActive"},g=e=>{var i,t,n,l,r;let{player:d,config:c,awemeInfo:_,prePlay:g,index:y,reuseConfig:w}=e;p({player:d,state:!0});let I=null===(i=(0,s.G)(a.SessionStorageKeys.manualSwitch))||void 0===i?void 0:i.gearType,x=e=>{var i,t,n;let l=f.s.getPlayerScene(d.playerId)===u.lT.Modal||(null==d?void 0:null===(i=d.config)||void 0===i?void 0:i.isModal),r=f.s.getPlayersByScene(u.lT.Modal).length>0,a=!!(null===(t=(0,o.parse)(location.search))||void 0===t?void 0:t.webRid);if(0===y&&(!l&&r||a)){d.blockPlayType=`modal_isModalRes_${l}_hasModal_${r}_hasModalLive_${a}`;return}v.Le.setConfig(v.gI.StartPlayTime,Date.now()),null==d||null===(n=d[e])||void 0===n||n.call(d,null),"start"===e&&d.play(),d.blockPlayType=`noMethod_${e}`,g&&(d.preplay=1,d.preplayStat=1)};if(d.isPlaying||d.currentTime>0){d.config.userSelectDefinition!==I&&m({player:d,gearType:I,config:c,awemeInfo:_});let e=(null===(t=window.__QUICK_PLAYER)||void 0===t?void 0:t.playerId)&&window.__QUICK_PLAYER.playerId===(null==d?void 0:d.playerId),{scene:i,reuseId:o}=w||{};e||i&&o&&(null===h.YY||void 0===h.YY?void 0:null===(n=h.YY.checkIsReusePlayer)||void 0===n?void 0:n.call(h.YY,i,o,d))?d.play():null===(l=d.resetState)||void 0===l||l.call(d),d.isPlaying=!1,x("start")}else d.config.userSelectDefinition!==I?(m({player:d,gearType:I,config:c,awemeInfo:_}),null===(r=d.resetState)||void 0===r||r.call(d),d.isPlaying=!1,x("start")):(x("play"),d.emit("immediatePlay"))}},373398:function(e,i,t){t.d(i,{v:function(){return n}});let n=e=>{let{currentCodeMap:i,additionalCodeMap:t}=e;Object.keys(t).map(e=>{delete i[e]})}},598412:function(e,i,t){t.d(i,{Y:function(){return d}});var n=t(629686),l=t(101199),o=t(243960),r=t(223985);let d=e=>{let{awemeInfo:i,abtestData:t}=e;return(0,l.useCallback)(()=>{var e,l,d;let{control:a,nextBufferMin:u,nextStartPos:s,nextStartBuffer:v,scale:c,scaleAd:f}=null!==(d=null==t?void 0:t.nextBufferConfig)&&void 0!==d?d:{},h={control:a,nextBufferMin:u,nextStartPos:s,nextStartBuffer:v,scale:(null==i?void 0:i.isAds)&&f?f:c};null===(l=o.ZP.instManager)||void 0===l||null===(e=l.updateStrategyConfig)||void 0===e||e.call(l,r.l,(0,n._)({},h||{}))},[i,t])}},74639:function(e,i,t){t.d(i,{K:function(){return n}});let n=e=>{let i={};if(null==e?void 0:e.chargeInfo){var t,n,l,o,r;switch(i.is_charge=e.chargeInfo.is_charge_content?1:0,i.purchase_status=e.chargeInfo.has_paid?1:0,i.is_trailer=Number(((null===(t=e.chargeInfo.preview_config)||void 0===t?void 0:t.end_time)||0)>((null===(n=e.chargeInfo.preview_config)||void 0===n?void 0:n.start_time)||0)),i.spu_type="long_video",null===(r=e.lvideoBrief)||void 0===r?void 0:null===(o=r.albumInfo)||void 0===o?void 0:null===(l=o.typeList)||void 0===l?void 0:l[0]){case 1:i.lv_type="movie";break;case 2:i.lv_type="tv";break;case 3:i.lv_type="comic";break;case 4:i.lv_type="variety";break;case 5:i.lv_type="documentary";break;case 13:i.lv_type="children"}}return i}},254457:function(e,i,t){var n=t(629686),l=t(402748),o=t(320165),r=t(101199);let d=(0,r.forwardRef)((e,i)=>(0,o.jsx)("svg",(0,l._)((0,n._)({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none",ref:i},e),{children:(0,o.jsx)("path",{d:"M4 1l5 5-5 5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})));i.Z=d}}]); |