@yuuichi/openlist-assets 4.2.6-ym.13 → 4.2.6-ym.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{An as e,E as t,Ei as n,Hi as r,Ln as i,P as a,aa as o,an as s,d as c,ea as l,et as u,fn as d,gn as f,hn as p,it as m,la as h,m as g,pa as _,q as v,qi as y,qt as b,rt as x,ua as S,va as C,vn as w,y as T,ya as E,zi as D}from"./store-BsSRYN7v.js";import{i as O,r as k}from"./previews-CoVCUlRx.js";import{d as A}from"./cg-Dnhuo7ak.js";import{i as j,n as M,t as N}from"./video_box-CocSg4GK.js";import{n as P,r as F,t as I}from"./artplayer-DPJyndgI.js";var L=y(`<span style=max-width:200px;overflow:hidden;text-overflow:ellipsis;word-break:break-all;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px>`),R=()=>{let{pathname:y,searchParams:R}=x(),{proxyLink:z}=v(),B=n(),V=h(()=>t.objs.filter(e=>e.type===O.VIDEO)),H=()=>{let e=V().findIndex(e=>e.name===t.obj.name);e<V().length-1&&B(f(p(location.pathname),V()[e+1].name)+`?auto_fullscreen=`+W.fullscreen)},U=()=>{let e=V().findIndex(e=>e.name===t.obj.name);e>0&&B(f(p(location.pathname),V()[e-1].name)+`?auto_fullscreen=`+W.fullscreen)},W,G={id:y(),container:`#video-player`,volume:1,autoplay:g(`video_autoplay`),autoSize:!1,autoMini:!0,controls:[{name:`previous-button`,index:10,position:`left`,html:`<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-prev-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path><path d="M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path></svg>`,tooltip:`Previous`,click:function(){U()}},{name:`next-button`,index:11,position:`left`,html:`<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-next-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M2 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path><path d="M13 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path></svg>`,tooltip:`Next`,click:function(){H()}}],loop:!1,flip:!0,playbackRate:!0,aspectRatio:!0,setting:!0,hotkey:!0,pip:!0,mutex:!0,fullscreen:!0,fullscreenWeb:!0,subtitleOffset:!0,miniProgressBar:!1,playsInline:!0,theme:c(),quality:[],plugins:[N],whitelist:[],screenshot:!0,settings:[],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0,crossOrigin:`anonymous`},type:`m3u8`,customType:{m3u8:function(e,t){let n=new I;n.loadSource(t),n.attachMedia(e),e.src||(e.src=t)}},lang:[`en`,`zh-cn`,`zh-tw`].includes(u().toLowerCase())?u().toLowerCase():`en`,lock:!0,fastForward:!0,autoPlayback:!0,autoOrientation:!0,airplay:!0},K=t.related.filter(e=>{for(let t of[`.srt`,`.ass`,`.vtt`])if(e.name.endsWith(t))return!0;return!1}),q=t.related.find(e=>{for(let t of[`.xml`])if(e.name.endsWith(t))return!0;return!1});if(K.length!=0){let e=!1,t=K[0];d(t.name).toLowerCase()===`ass`?(e=!0,G.plugins?.push(P({subUrl:z(t,!0)}))):G.subtitle={url:z(t,!0),type:d(t.name)};let n=[{id:`setting_subtitle_display`,html:`Display`,tooltip:`Show`,switch:!0,onSwitch:function(e){e.tooltip=e.switch?`Hide`:`Show`,i(!e.switch);let t=G.settings?.find(e=>e.id===`setting_subtitle`);return t&&(t.tooltip=e.tooltip),!e.switch}}];K.forEach((e,t)=>{n.push({default:t===0,html:(()=>{var t=L();return D(t,()=>e.name),S(()=>r(t,`title`,e.name)),t})(),name:e.name,url:z(e,!0)})}),G.settings?.push({id:`setting_subtitle`,html:`Subtitle`,tooltip:`Show`,icon:k({size:24}),selector:n,onSelect:function(t){d(t.name).toLowerCase()===`ass`?(e=!0,this.emit(`artplayer-plugin-ass:switch`,t.url),i(!0)):(e=!1,this.subtitle.switch(t.url,{name:t.name}),this.once(`subtitleLoad`,i.bind(this,!0)));let r=n.find(e=>e.id===`setting_subtitle_display`);return r&&!r.switch&&r.$html?.click?.(),r?.tooltip}});function i(t){switch(e?`ass`:`webvtt`){case`ass`:W.subtitle.show=!1,W.emit(`artplayer-plugin-ass:visible`,t);break;default:W.subtitle.show=t,W.emit(`artplayer-plugin-ass:visible`,!1)}}}q&&G.plugins?.push(F({speed:5,opacity:1,fontSize:25,mode:0,antiOverlap:!1,synchronousPlayback:!1,theme:`dark`,heatmap:!0,...JSON.parse(localStorage.getItem(`danmuku_config`)||`{}`),emitter:!1,danmuku:z(q,!0)}));let[,J]=m(()=>s.post(`/fs/other`,{path:y(),password:T(),method:`video_preview`}));E(async()=>{let e=await J();te(e.code!==200),b(e,e=>{let t=e.video_preview_play_info.live_transcoding_task_list.filter(e=>e.url);if(t.length===0){w.error(`No transcoding video found`);return}G.url=t[t.length-1].url,G.quality=t.map((e,n)=>({html:e.template_id,url:e.url,default:n===t.length-1})),W=new j(G);let n;switch(R.auto_fullscreen){case`true`:n=!0;case`false`:n=!1;default:n=!1}W.on(`ready`,()=>{W.fullscreen=n}),q&&W.on(`artplayerPluginDanmuku:config`,e=>{let{speed:t,margin:n,opacity:r,mode:i,modes:a,fontSize:o,antiOverlap:s,synchronousPlayback:c,heatmap:l,visible:u}=e;localStorage.setItem(`danmuku_config`,JSON.stringify({speed:t,margin:n,opacity:r,mode:i,modes:a,fontSize:o,antiOverlap:s,synchronousPlayback:c,heatmap:l,visible:u}))}),W.on(`video:ended`,()=>{Q()&&H()}),Y=window.setInterval(Z,84e4)}),W.on(`error`,()=>{W.video.crossOrigin&&(console.log(`Error detected. Trying to remove Cross-Origin attribute. Screenshot may not be available.`),W.video.crossOrigin=null)})});let Y,X;async function Z(){let e=await J();b(e,async e=>{let t=e.video_preview_play_info.live_transcoding_task_list.filter(e=>e.url);if(t.length===0){w.error(`No transcoding video found`);return}let n=t.map((e,n)=>({html:e.template_id,url:e.url,default:n===t.length-1}));G.quality=n,W.quality=n,X=W.currentTime;let r=W.playing;await W.switchUrl(n[n.length-1].url),r||W.pause(),setTimeout(()=>{W.seek=X},1e3)})}C(()=>{a(!1),W&&(W.fullscreenWeb=!1,W.fullscreen=!1,W.pip=!1,W.video&&(W.video.src=``),W.destroy()),window.clearInterval(Y)});let[Q,$]=_(),[ee,te]=_(!1);return o(M,{onAutoNextChange:$,get children(){return[o(e,{w:`$full`,h:`60vh`,id:`video-player`}),o(l,{get when(){return ee()},get children(){return o(i,{w:`100%`,h:`60vh`,bgColor:`black`,get children(){return o(A,{size:`4rem`})}})}})]}})};export{R as default};
1
+ import{An as e,E as t,Ei as n,Hi as r,Ln as i,P as a,aa as o,an as s,d as c,ea as l,et as u,fn as d,gn as f,hn as p,it as m,la as h,m as g,pa as _,q as v,qi as y,qt as b,rt as x,ua as S,va as C,vn as w,y as T,ya as E,zi as D}from"./store-BsSRYN7v.js";import{i as O,r as k}from"./previews-CoVCUlRx.js";import{d as A}from"./cg-Dnhuo7ak.js";import{i as j,n as M,t as N}from"./video_box-CocSg4GK.js";import{n as P,r as F,t as I}from"./artplayer-DPJyndgI.js";var L=y(`<span style=max-width:200px;overflow:hidden;text-overflow:ellipsis;word-break:break-all;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px>`),R=()=>{let{pathname:y,searchParams:R}=x(),{proxyLink:z}=v(),B=n(),V=h(()=>t.objs.filter(e=>e.type===O.VIDEO)),H=()=>{let e=V().findIndex(e=>e.name===t.obj.name);e<V().length-1&&B(f(p(location.pathname),V()[e+1].name)+`?auto_fullscreen=`+W.fullscreen)},U=()=>{let e=V().findIndex(e=>e.name===t.obj.name);e>0&&B(f(p(location.pathname),V()[e-1].name)+`?auto_fullscreen=`+W.fullscreen)},W,G={id:y(),container:`#video-player`,volume:1,autoplay:g(`video_autoplay`),autoSize:!1,autoMini:!0,controls:[{name:`previous-button`,index:10,position:`left`,html:`<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-prev-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path><path d="M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path></svg>`,tooltip:`Previous`,click:function(){U()}},{name:`next-button`,index:11,position:`left`,html:`<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-next-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M2 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path><path d="M13 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path></svg>`,tooltip:`Next`,click:function(){H()}}],loop:!1,flip:!0,playbackRate:!0,aspectRatio:!0,setting:!0,hotkey:!0,pip:!0,mutex:!0,fullscreen:!0,fullscreenWeb:!0,subtitleOffset:!0,miniProgressBar:!1,playsInline:!0,theme:c(),quality:[],plugins:[N],whitelist:[],screenshot:!0,settings:[],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0,crossOrigin:`anonymous`},type:`m3u8`,customType:{m3u8:function(e,t){let n=new I;n.loadSource(t),n.attachMedia(e),e.src||(e.src=t)}},lang:[`en`,`zh-cn`,`zh-tw`].includes(u().toLowerCase())?u().toLowerCase():`en`,lock:!0,fastForward:!0,autoPlayback:!0,autoOrientation:!0,airplay:!0},K=t.related.filter(e=>{for(let t of[`.srt`,`.ass`,`.vtt`])if(e.name.endsWith(t))return!0;return!1}),q=t.related.find(e=>{for(let t of[`.xml`])if(e.name.endsWith(t))return!0;return!1});if(K.length!=0){let e=!1,t=K[0];d(t.name).toLowerCase()===`ass`?(e=!0,G.plugins?.push(P({subUrl:z(t,!0)}))):G.subtitle={url:z(t,!0),type:d(t.name)};let n=[{id:`setting_subtitle_display`,html:`Display`,tooltip:`Show`,switch:!0,onSwitch:function(e){e.tooltip=e.switch?`Hide`:`Show`,i(!e.switch);let t=G.settings?.find(e=>e.id===`setting_subtitle`);return t&&(t.tooltip=e.tooltip),!e.switch}}];K.forEach((e,t)=>{n.push({default:t===0,html:(()=>{var t=L();return D(t,()=>e.name),S(()=>r(t,`title`,e.name)),t})(),name:e.name,url:z(e,!0)})}),G.settings?.push({id:`setting_subtitle`,html:`Subtitle`,tooltip:`Show`,icon:k({size:24}),selector:n,onSelect:function(t){d(t.name).toLowerCase()===`ass`?(e=!0,this.emit(`artplayer-plugin-ass:switch`,t.url),i(!0)):(e=!1,this.subtitle.switch(t.url,{name:t.name}),this.once(`subtitleLoad`,i.bind(this,!0)));let r=n.find(e=>e.id===`setting_subtitle_display`);return r&&!r.switch&&r.$html?.click?.(),r?.tooltip}});function i(t){switch(e?`ass`:`webvtt`){case`ass`:W.subtitle.show=!1,W.emit(`artplayer-plugin-ass:visible`,t);break;default:W.subtitle.show=t,W.emit(`artplayer-plugin-ass:visible`,!1)}}}q&&G.plugins?.push(F({speed:5,opacity:1,fontSize:25,mode:0,antiOverlap:!1,synchronousPlayback:!1,theme:`dark`,heatmap:!0,...JSON.parse(localStorage.getItem(`danmuku_config`)||`{}`),emitter:!1,danmuku:z(q,!0)}));let[,J]=m(()=>s.post(`/fs/other`,{path:y(),password:T(),method:`video_preview`}));E(async()=>{let e=await J();te(e.code!==200),b(e,e=>{let t=e.video_preview_play_info.live_transcoding_task_list.filter(e=>e.url);if(t.length===0){w.error(`No transcoding video found`);return}G.url=t[t.length-1].url,G.quality=t.map((e,n)=>({html:e.template_id,url:e.url,default:n===t.length-1})),W=new j(G);let n;switch(R.auto_fullscreen){case`true`:n=!0;case`false`:n=!1;default:n=!1}W.on(`ready`,()=>{W.fullscreen=n}),q&&W.on(`artplayerPluginDanmuku:config`,e=>{let{speed:t,margin:n,opacity:r,mode:i,modes:a,fontSize:o,antiOverlap:s,synchronousPlayback:c,heatmap:l,visible:u}=e;localStorage.setItem(`danmuku_config`,JSON.stringify({speed:t,margin:n,opacity:r,mode:i,modes:a,fontSize:o,antiOverlap:s,synchronousPlayback:c,heatmap:l,visible:u}))}),W.on(`video:ended`,()=>{Q()&&H()}),Y=window.setInterval(Z,84e4)}),W.on(`error`,()=>{W.video.crossOrigin&&(console.log(`Error detected. Trying to remove Cross-Origin attribute. Screenshot may not be available.`),W.video.crossOrigin=null)})});let Y,X;async function Z(){let e=await J();b(e,async e=>{let t=e.video_preview_play_info.live_transcoding_task_list.filter(e=>e.url);if(t.length===0){w.error(`No transcoding video found`);return}let n=t.map((e,n)=>({html:e.template_id,url:e.url,default:n===t.length-1}));G.quality=n,W.quality=n,X=W.currentTime;let r=W.playing;await W.switchUrl(n[n.length-1].url),r||W.pause(),setTimeout(()=>{W.seek=X},1e3)})}C(()=>{a(!1),W&&(W.fullscreenWeb=!1,W.fullscreen=!1,W.pip=!1,W.video&&(W.video.pause(),W.video.removeAttribute(`src`),W.video.load()),W.destroy()),window.clearInterval(Y)});let[Q,$]=_(),[ee,te]=_(!1);return o(M,{onAutoNextChange:$,get children(){return[o(e,{w:`$full`,h:`60vh`,id:`video-player`}),o(l,{get when(){return ee()},get children(){return o(i,{w:`100%`,h:`60vh`,bgColor:`black`,get children(){return o(A,{size:`4rem`})}})}})]}})};export{R as default};
@@ -1 +1 @@
1
- (function(){System.register([`./store-legacy-DKwwQbF3.js`,`./previews-legacy-DOedQYss.js`,`./cg-legacy-BVTWCJo6.js`,`./video_box-legacy-CWiYFTi2.js`,`./artplayer-legacy-BVj-u2J9.js`],function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z;return{setters:[function(e){n=e.An,r=e.E,i=e.Ei,a=e.Hi,o=e.Ln,s=e.P,c=e.aa,l=e.an,u=e.d,d=e.ea,f=e.et,p=e.fn,m=e.gn,h=e.hn,g=e.it,_=e.la,v=e.m,y=e.pa,b=e.q,x=e.qi,S=e.qt,C=e.rt,w=e.ua,T=e.va,E=e.vn,D=e.y,O=e.ya,k=e.zi},function(e){A=e.i,j=e.r},function(e){M=e.d},function(e){N=e.i,P=e.n,F=e.t},function(e){I=e.n,L=e.r,R=e.t}],execute:function(){z=x(`<span style=max-width:200px;overflow:hidden;text-overflow:ellipsis;word-break:break-all;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px>`),e(`default`,()=>{let{pathname:e,searchParams:t}=C(),{proxyLink:x}=b(),B=i(),V=_(()=>r.objs.filter(e=>e.type===A.VIDEO)),H=()=>{let e=V().findIndex(e=>e.name===r.obj.name);e<V().length-1&&B(m(h(location.pathname),V()[e+1].name)+`?auto_fullscreen=`+W.fullscreen)},U=()=>{let e=V().findIndex(e=>e.name===r.obj.name);e>0&&B(m(h(location.pathname),V()[e-1].name)+`?auto_fullscreen=`+W.fullscreen)},W,G={id:e(),container:`#video-player`,volume:1,autoplay:v(`video_autoplay`),autoSize:!1,autoMini:!0,controls:[{name:`previous-button`,index:10,position:`left`,html:`<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-prev-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path><path d="M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path></svg>`,tooltip:`Previous`,click:function(){U()}},{name:`next-button`,index:11,position:`left`,html:`<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-next-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M2 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path><path d="M13 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path></svg>`,tooltip:`Next`,click:function(){H()}}],loop:!1,flip:!0,playbackRate:!0,aspectRatio:!0,setting:!0,hotkey:!0,pip:!0,mutex:!0,fullscreen:!0,fullscreenWeb:!0,subtitleOffset:!0,miniProgressBar:!1,playsInline:!0,theme:u(),quality:[],plugins:[F],whitelist:[],screenshot:!0,settings:[],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0,crossOrigin:`anonymous`},type:`m3u8`,customType:{m3u8:function(e,t){let n=new R;n.loadSource(t),n.attachMedia(e),e.src||(e.src=t)}},lang:[`en`,`zh-cn`,`zh-tw`].includes(f().toLowerCase())?f().toLowerCase():`en`,lock:!0,fastForward:!0,autoPlayback:!0,autoOrientation:!0,airplay:!0},K=r.related.filter(e=>{for(let t of[`.srt`,`.ass`,`.vtt`])if(e.name.endsWith(t))return!0;return!1}),q=r.related.find(e=>{for(let t of[`.xml`])if(e.name.endsWith(t))return!0;return!1});if(K.length!=0){let e=!1,t=K[0];p(t.name).toLowerCase()===`ass`?(e=!0,G.plugins?.push(I({subUrl:x(t,!0)}))):G.subtitle={url:x(t,!0),type:p(t.name)};let n=[{id:`setting_subtitle_display`,html:`Display`,tooltip:`Show`,switch:!0,onSwitch:function(e){e.tooltip=e.switch?`Hide`:`Show`,r(!e.switch);let t=G.settings?.find(e=>e.id===`setting_subtitle`);return t&&(t.tooltip=e.tooltip),!e.switch}}];K.forEach((e,t)=>{n.push({default:t===0,html:(()=>{var t=z();return k(t,()=>e.name),w(()=>a(t,`title`,e.name)),t})(),name:e.name,url:x(e,!0)})}),G.settings?.push({id:`setting_subtitle`,html:`Subtitle`,tooltip:`Show`,icon:j({size:24}),selector:n,onSelect:function(t){p(t.name).toLowerCase()===`ass`?(e=!0,this.emit(`artplayer-plugin-ass:switch`,t.url),r(!0)):(e=!1,this.subtitle.switch(t.url,{name:t.name}),this.once(`subtitleLoad`,r.bind(this,!0)));let i=n.find(e=>e.id===`setting_subtitle_display`);return i&&!i.switch&&i.$html?.click?.(),i?.tooltip}});function r(t){switch(e?`ass`:`webvtt`){case`ass`:W.subtitle.show=!1,W.emit(`artplayer-plugin-ass:visible`,t);break;default:W.subtitle.show=t,W.emit(`artplayer-plugin-ass:visible`,!1)}}}q&&G.plugins?.push(L({speed:5,opacity:1,fontSize:25,mode:0,antiOverlap:!1,synchronousPlayback:!1,theme:`dark`,heatmap:!0,...JSON.parse(localStorage.getItem(`danmuku_config`)||`{}`),emitter:!1,danmuku:x(q,!0)}));let[,J]=g(()=>l.post(`/fs/other`,{path:e(),password:D(),method:`video_preview`}));O(async()=>{let e=await J();te(e.code!==200),S(e,e=>{let n=e.video_preview_play_info.live_transcoding_task_list.filter(e=>e.url);if(n.length===0){E.error(`No transcoding video found`);return}G.url=n[n.length-1].url,G.quality=n.map((e,t)=>({html:e.template_id,url:e.url,default:t===n.length-1})),W=new N(G);let r;switch(t.auto_fullscreen){case`true`:r=!0;case`false`:r=!1;default:r=!1}W.on(`ready`,()=>{W.fullscreen=r}),q&&W.on(`artplayerPluginDanmuku:config`,e=>{let{speed:t,margin:n,opacity:r,mode:i,modes:a,fontSize:o,antiOverlap:s,synchronousPlayback:c,heatmap:l,visible:u}=e;localStorage.setItem(`danmuku_config`,JSON.stringify({speed:t,margin:n,opacity:r,mode:i,modes:a,fontSize:o,antiOverlap:s,synchronousPlayback:c,heatmap:l,visible:u}))}),W.on(`video:ended`,()=>{Q()&&H()}),Y=window.setInterval(Z,84e4)}),W.on(`error`,()=>{W.video.crossOrigin&&(console.log(`Error detected. Trying to remove Cross-Origin attribute. Screenshot may not be available.`),W.video.crossOrigin=null)})});let Y,X;async function Z(){let e=await J();S(e,async e=>{let t=e.video_preview_play_info.live_transcoding_task_list.filter(e=>e.url);if(t.length===0){E.error(`No transcoding video found`);return}let n=t.map((e,n)=>({html:e.template_id,url:e.url,default:n===t.length-1}));G.quality=n,W.quality=n,X=W.currentTime;let r=W.playing;await W.switchUrl(n[n.length-1].url),r||W.pause(),setTimeout(()=>{W.seek=X},1e3)})}T(()=>{s(!1),W&&(W.fullscreenWeb=!1,W.fullscreen=!1,W.pip=!1,W.video&&(W.video.src=``),W.destroy()),window.clearInterval(Y)});let[Q,$]=y(),[ee,te]=y(!1);return c(P,{onAutoNextChange:$,get children(){return[c(n,{w:`$full`,h:`60vh`,id:`video-player`}),c(d,{get when(){return ee()},get children(){return c(o,{w:`100%`,h:`60vh`,bgColor:`black`,get children(){return c(M,{size:`4rem`})}})}})]}})})}}})})();
1
+ (function(){System.register([`./store-legacy-DKwwQbF3.js`,`./previews-legacy-DOedQYss.js`,`./cg-legacy-BVTWCJo6.js`,`./video_box-legacy-CWiYFTi2.js`,`./artplayer-legacy-BVj-u2J9.js`],function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z;return{setters:[function(e){n=e.An,r=e.E,i=e.Ei,a=e.Hi,o=e.Ln,s=e.P,c=e.aa,l=e.an,u=e.d,d=e.ea,f=e.et,p=e.fn,m=e.gn,h=e.hn,g=e.it,_=e.la,v=e.m,y=e.pa,b=e.q,x=e.qi,S=e.qt,C=e.rt,w=e.ua,T=e.va,E=e.vn,D=e.y,O=e.ya,k=e.zi},function(e){A=e.i,j=e.r},function(e){M=e.d},function(e){N=e.i,P=e.n,F=e.t},function(e){I=e.n,L=e.r,R=e.t}],execute:function(){z=x(`<span style=max-width:200px;overflow:hidden;text-overflow:ellipsis;word-break:break-all;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px>`),e(`default`,()=>{let{pathname:e,searchParams:t}=C(),{proxyLink:x}=b(),B=i(),V=_(()=>r.objs.filter(e=>e.type===A.VIDEO)),H=()=>{let e=V().findIndex(e=>e.name===r.obj.name);e<V().length-1&&B(m(h(location.pathname),V()[e+1].name)+`?auto_fullscreen=`+W.fullscreen)},U=()=>{let e=V().findIndex(e=>e.name===r.obj.name);e>0&&B(m(h(location.pathname),V()[e-1].name)+`?auto_fullscreen=`+W.fullscreen)},W,G={id:e(),container:`#video-player`,volume:1,autoplay:v(`video_autoplay`),autoSize:!1,autoMini:!0,controls:[{name:`previous-button`,index:10,position:`left`,html:`<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-prev-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path><path d="M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path></svg>`,tooltip:`Previous`,click:function(){U()}},{name:`next-button`,index:11,position:`left`,html:`<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-next-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M2 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path><path d="M13 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path></svg>`,tooltip:`Next`,click:function(){H()}}],loop:!1,flip:!0,playbackRate:!0,aspectRatio:!0,setting:!0,hotkey:!0,pip:!0,mutex:!0,fullscreen:!0,fullscreenWeb:!0,subtitleOffset:!0,miniProgressBar:!1,playsInline:!0,theme:u(),quality:[],plugins:[F],whitelist:[],screenshot:!0,settings:[],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0,crossOrigin:`anonymous`},type:`m3u8`,customType:{m3u8:function(e,t){let n=new R;n.loadSource(t),n.attachMedia(e),e.src||(e.src=t)}},lang:[`en`,`zh-cn`,`zh-tw`].includes(f().toLowerCase())?f().toLowerCase():`en`,lock:!0,fastForward:!0,autoPlayback:!0,autoOrientation:!0,airplay:!0},K=r.related.filter(e=>{for(let t of[`.srt`,`.ass`,`.vtt`])if(e.name.endsWith(t))return!0;return!1}),q=r.related.find(e=>{for(let t of[`.xml`])if(e.name.endsWith(t))return!0;return!1});if(K.length!=0){let e=!1,t=K[0];p(t.name).toLowerCase()===`ass`?(e=!0,G.plugins?.push(I({subUrl:x(t,!0)}))):G.subtitle={url:x(t,!0),type:p(t.name)};let n=[{id:`setting_subtitle_display`,html:`Display`,tooltip:`Show`,switch:!0,onSwitch:function(e){e.tooltip=e.switch?`Hide`:`Show`,r(!e.switch);let t=G.settings?.find(e=>e.id===`setting_subtitle`);return t&&(t.tooltip=e.tooltip),!e.switch}}];K.forEach((e,t)=>{n.push({default:t===0,html:(()=>{var t=z();return k(t,()=>e.name),w(()=>a(t,`title`,e.name)),t})(),name:e.name,url:x(e,!0)})}),G.settings?.push({id:`setting_subtitle`,html:`Subtitle`,tooltip:`Show`,icon:j({size:24}),selector:n,onSelect:function(t){p(t.name).toLowerCase()===`ass`?(e=!0,this.emit(`artplayer-plugin-ass:switch`,t.url),r(!0)):(e=!1,this.subtitle.switch(t.url,{name:t.name}),this.once(`subtitleLoad`,r.bind(this,!0)));let i=n.find(e=>e.id===`setting_subtitle_display`);return i&&!i.switch&&i.$html?.click?.(),i?.tooltip}});function r(t){switch(e?`ass`:`webvtt`){case`ass`:W.subtitle.show=!1,W.emit(`artplayer-plugin-ass:visible`,t);break;default:W.subtitle.show=t,W.emit(`artplayer-plugin-ass:visible`,!1)}}}q&&G.plugins?.push(L({speed:5,opacity:1,fontSize:25,mode:0,antiOverlap:!1,synchronousPlayback:!1,theme:`dark`,heatmap:!0,...JSON.parse(localStorage.getItem(`danmuku_config`)||`{}`),emitter:!1,danmuku:x(q,!0)}));let[,J]=g(()=>l.post(`/fs/other`,{path:e(),password:D(),method:`video_preview`}));O(async()=>{let e=await J();te(e.code!==200),S(e,e=>{let n=e.video_preview_play_info.live_transcoding_task_list.filter(e=>e.url);if(n.length===0){E.error(`No transcoding video found`);return}G.url=n[n.length-1].url,G.quality=n.map((e,t)=>({html:e.template_id,url:e.url,default:t===n.length-1})),W=new N(G);let r;switch(t.auto_fullscreen){case`true`:r=!0;case`false`:r=!1;default:r=!1}W.on(`ready`,()=>{W.fullscreen=r}),q&&W.on(`artplayerPluginDanmuku:config`,e=>{let{speed:t,margin:n,opacity:r,mode:i,modes:a,fontSize:o,antiOverlap:s,synchronousPlayback:c,heatmap:l,visible:u}=e;localStorage.setItem(`danmuku_config`,JSON.stringify({speed:t,margin:n,opacity:r,mode:i,modes:a,fontSize:o,antiOverlap:s,synchronousPlayback:c,heatmap:l,visible:u}))}),W.on(`video:ended`,()=>{Q()&&H()}),Y=window.setInterval(Z,84e4)}),W.on(`error`,()=>{W.video.crossOrigin&&(console.log(`Error detected. Trying to remove Cross-Origin attribute. Screenshot may not be available.`),W.video.crossOrigin=null)})});let Y,X;async function Z(){let e=await J();S(e,async e=>{let t=e.video_preview_play_info.live_transcoding_task_list.filter(e=>e.url);if(t.length===0){E.error(`No transcoding video found`);return}let n=t.map((e,n)=>({html:e.template_id,url:e.url,default:n===t.length-1}));G.quality=n,W.quality=n,X=W.currentTime;let r=W.playing;await W.switchUrl(n[n.length-1].url),r||W.pause(),setTimeout(()=>{W.seek=X},1e3)})}T(()=>{s(!1),W&&(W.fullscreenWeb=!1,W.fullscreen=!1,W.pip=!1,W.video&&(W.video.pause(),W.video.removeAttribute(`src`),W.video.load()),W.destroy()),window.clearInterval(Y)});let[Q,$]=y(),[ee,te]=y(!1);return c(P,{onAutoNextChange:$,get children(){return[c(n,{w:`$full`,h:`60vh`,id:`video-player`}),c(d,{get when(){return ee()},get children(){return c(o,{w:`100%`,h:`60vh`,bgColor:`black`,get children(){return c(M,{size:`4rem`})}})}})]}})})}}})})();