import{_ as e}from"./vendor-DKh56KT7.js";import{f as l,g as t,s as o}from"./vendor-BJZ6tUoe.js";import{ag as s,r as a,q as r,w as i,a4 as n,aW as v,a5 as d,v as c,a2 as u,a3 as p,ad as f,bH as m,K as j,b1 as x,bf as b,bJ as h,bA as y,bM as w}from"./vendor-BXdGExd0.js";import{a as g}from"./vendor-bo_0oRCG.js";import{u as k,D as _}from"./vendor-DHdPOO28.js";import{u as M}from"./vendor-C03G4T8j.js";import{_ as C}from"./vendor-D2Fuiil7.js";import{r as I,g as N,P as S}from"./souav-BTAG2baT.js";import{_ as A}from"./vendor-CIxbPk9K.js";import{_ as F}from"./vendor-CwfdNEr1.js";import{_ as J}from"./vendor-BCo6x5W8.js";import"./vendor-Dm4oB1Pn.js";import"./vendor-DN37M9Hi.js";import"./vendor-DBhUxCDU.js";import"./vendor-nxASRxho.js";import"./vendor-CzTn-9lu.js";import"./vendor-CB_mu4eO.js";import"./vendor-BAqn-6d_.js";import"./vendor-DlsNk5rM.js";import"./vendor-Bsarx7Le.js";import"./vendor-QgNWKiQk.js";import"./vendor-CDxkAdJH.js";import"./vendor-Cv8m7sE6.js";import"./vendor-Dos3PyFQ.js";import"./vendor-Dwl46Tfs.js";import"./vendor-BHR_E30J.js";import"./vendor-DzK633Zd.js";import"./vendor-CfyHAoLP.js";import"./vendor-TgWiOutC.js";import"./vendor-DSXubtF9.js";import"./vendor-DJUGQ7Dr.js";import"./vendor-QBCTe_-W.js";import"./vendor-DppN28kL.js";const R={key:0,class:"h-full w-full flex flex-col"},T={class:"flex-1 flex flex-col overflow-y-auto",ref:"scrollContainerRef",style:{"-webkit-overflow-scrolling":"touch"}},q={class:"sticky top-0 z-20 bg-gray-900",ref:"tabBarRef"},z={class:"w-full h-[35px] flex items-center mt-[10px] pl-[5px]"},O={class:"relative w-0 h-full"},U={class:"absolute left-[1px] top-[9px] text-xs text-rose-500"},B={class:"tab-content flex-1 flex flex-col"},D={key:1,class:"h-full w-full flex justify-center items-center"},E={class:"fixed left-0 top-0 w-full flex items-center justify-between h-10 z-30"},H=J(s({__name:"index",setup(s){const J=g(),H=k(),K=["详情","评论"],L=a(0),P=a(null),V=a(null),W=a(0),G=a(0),Q=()=>{S.open("Feedback",{props:{vid:G.value},transition:"slide-fade"})},X=async e=>{G.value=e,V.value=null,H.detailModel=null;const l=history.state.video,t=localStorage.getItem("video_detail");if(l)V.value=JSON.parse(l),localStorage.setItem("video_detail",l);else if(t){const l=JSON.parse(t);l.contentId===e?V.value=l:V.value=null}else V.value=null;V.value&&H.resetVidoeModel(V.value),await H.init(e),H.detailModel&&(V.value||(V.value=H.detailModel)),L.value=0};return r(()=>{const e=Number(J.params.id);e&&X(e)}),i(()=>J.params.id,e=>{e&&(window.scrollTo(0,0),P.value&&(P.value.scrollTop=0),X(Number(e)))}),(s,a)=>{var r;const i=l,g=t,k=e;return v(),n(j,null,[d("div",{ref_key:"pageRef",ref:P,class:"h-dvh bg-gray-900 text-white"},[c(H).detailModel?(v(),n("div",R,[G.value?(v(),u(_,{key:0,id:G.value,url:c(H).detailModel.playUrl,cover:(null==(r=V.value)?void 0:r.img)??""},null,8,["id","url","cover"])):p("",!0),d("div",T,[c(H).hasTitleAd?(v(),u(C,{key:0,"banner-list":c(H).titleAdList},null,8,["banner-list"])):p("",!0),d("div",q,[d("div",z,[f(g,{active:L.value,"onUpdate:active":a[0]||(a[0]=e=>L.value=e),background:"transparent","line-width":"12px","line-height":"3px",color:"#FF0E51","title-active-color":"#fff","title-inactive-color":"#9ca3af"},{default:m(()=>[(v(),n(j,null,x(K,e=>f(i,{key:e,title:e},null,8,["title"])),64))]),_:1},8,["active"]),d("div",O,[d("span",U,"("+b(W.value)+")",1)]),a[3]||(a[3]=d("div",{class:"flex-grow"},null,-1)),d("button",{onClick:Q,class:"mr-[10px] px-[5px] text-rose-500 text-xs"}," 无法播放？ ")])],512),d("div",B,[h(f(A,null,null,512),[[y,0===L.value]]),h(f(F,{vid:G.value},null,8,["vid"]),[[y,1===L.value]])])],512)])):(v(),n("div",D,[f(k)]))],512),d("div",E,[d("div",{class:"w-10 h-10 flex items-center justify-center pointer-events-auto active:scale-90 transition-transform",onClick:a[1]||(a[1]=w(e=>c(I).push("/"),["stop"]))},[...a[4]||(a[4]=[d("i",{class:"icon-sprite icon-back"},null,-1)])]),d("div",{class:"w-10 h-10 flex items-center justify-center pointer-events-auto active:scale-90 transition-transform",onClick:a[2]||(a[2]=w(e=>(async()=>{var e;const{copy:l}=M(),t=document.location.href;await l(t),o("复制成功"),N((null==(e=V.value)?void 0:e.title)||"",t)})(),["stop"]))},[...a[5]||(a[5]=[d("i",{class:"icon-sprite icon-share"},null,-1)])])])],64)}}}),[["__scopeId","data-v-85ef1fcf"]]);export{H as default};
