2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
import{s as re,a as ue,b as de,c as ce}from"./Video-8e45cd37.js";import{m as fe,n as me,_ as pe,g as y,q as he,s as ve,r as O,o as X,c as te,u as se,h as _e,v as ye,f as b,F as ie,i as ge,a as c,w as f,t as le,b as h,x as $e,E as ne}from"./index-adc67fa5.js";import"./axios-4a70c6fc.js";var oe={exports:{}};(function(ae,P){(function(H,L){ae.exports=L()})(fe,function(){var H=1e3,L=6e4,N=36e5,T="millisecond",D="second",S="minute",w="hour",x="day",Y="week",g="month",W="quarter",M="year",k="date",R="Invalid Date",G=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Q={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(l){var n=["th","st","nd","rd"],e=l%100;return"["+l+(n[(e-20)%10]||n[e]||n[0])+"]"}},q=function(l,n,e){var i=String(l);return!i||i.length>=n?l:""+Array(n+1-i.length).join(e)+l},A={s:q,z:function(l){var n=-l.utcOffset(),e=Math.abs(n),i=Math.floor(e/60),a=e%60;return(n<=0?"+":"-")+q(i,2,"0")+":"+q(a,2,"0")},m:function l(n,e){if(n.date()<e.date())return-l(e,n);var i=12*(e.year()-n.year())+(e.month()-n.month()),a=n.clone().add(i,g),o=e-a<0,t=n.clone().add(i+(o?-1:1),g);return+(-(i+(e-a)/(o?a-t:t-a))||0)},a:function(l){return l<0?Math.ceil(l)||0:Math.floor(l)},p:function(l){return{M:g,y:M,w:Y,d:x,D:k,h:w,m:S,s:D,ms:T,Q:W}[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(l){return l===void 0}},F="en",U={};U[F]=Q;var v=function(l){return l instanceof B},r=function l(n,e,i){var a;if(!n)return F;if(typeof n=="string"){var o=n.toLowerCase();U[o]&&(a=o),e&&(U[o]=e,a=o);var t=n.split("-");if(!a&&t.length>1)return l(t[0])}else{var u=n.name;U[u]=n,a=u}return!i&&a&&(F=a),a||!i&&F},d=function(l,n){if(v(l))return l.clone();var e=typeof n=="object"?n:{};return e.date=l,e.args=arguments,new B(e)},s=A;s.l=r,s.i=v,s.w=function(l,n){return d(l,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var B=function(){function l(e){this.$L=r(e.locale,null,!0),this.parse(e)}var n=l.prototype;return n.parse=function(e){this.$d=function(i){var a=i.date,o=i.utc;if(a===null)return new Date(NaN);if(s.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var t=a.match(G);if(t){var u=t[2]-1||0,p=(t[7]||"0").substring(0,3);return o?new Date(Date.UTC(t[1],u,t[3]||1,t[4]||0,t[5]||0,t[6]||0,p)):new Date(t[1],u,t[3]||1,t[4]||0,t[5]||0,t[6]||0,p)}}return new Date(a)}(e),this.$x=e.x||{},this.init()},n.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},n.$utils=function(){return s},n.isValid=function(){return this.$d.toString()!==R},n.isSame=function(e,i){var a=d(e);return this.startOf(i)<=a&&a<=this.endOf(i)},n.isAfter=function(e,i){return d(e)<this.startOf(i)},n.isBefore=function(e,i){return this.endOf(i)<d(e)},n.$g=function(e,i,a){return s.u(e)?this[i]:this.set(a,e)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(e,i){var a=this,o=!!s.u(i)||i,t=s.p(e),u=function(z,$){var I=s.w(a.$u?Date.UTC(a.$y,$,z):new Date(a.$y,$,z),a);return o?I:I.endOf(x)},p=function(z,$){return s.w(a.toDate()[z].apply(a.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice($)),a)},m=this.$W,_=this.$M,j=this.$D,C="set"+(this.$u?"UTC":"");switch(t){case M:return o?u(1,0):u(31,11);case g:return o?u(1,_):u(0,_+1);case Y:var J=this.$locale().weekStart||0,Z=(m<J?m+7:m)-J;return u(o?j-Z:j+(6-Z),_);case x:case k:return p(C+"Hours",0);case w:return p(C+"Minutes",1);case S:return p(C+"Seconds",2);case D:return p(C+"Milliseconds",3);default:return this.clone()}},n.endOf=function(e){return this.startOf(e,!1)},n.$set=function(e,i){var a,o=s.p(e),t="set"+(this.$u?"UTC":""),u=(a={},a[x]=t+"Date",a[k]=t+"Date",a[g]=t+"Month",a[M]=t+"FullYear",a[w]=t+"Hours",a[S]=t+"Minutes",a[D]=t+"Seconds",a[T]=t+"Milliseconds",a)[o],p=o===x?this.$D+(i-this.$W):i;if(o===g||o===M){var m=this.clone().set(k,1);m.$d[u](p),m.init(),this.$d=m.set(k,Math.min(this.$D,m.daysInMonth())).$d}else u&&this.$d[u](p);return this.init(),this},n.set=function(e,i){return this.clone().$set(e,i)},n.get=function(e){return this[s.p(e)]()},n.add=function(e,i){var a,o=this;e=Number(e);var t=s.p(i),u=function(_){var j=d(o);return s.w(j.date(j.date()+Math.round(_*e)),o)};if(t===g)return this.set(g,this.$M+e);if(t===M)return this.set(M,this.$y+e);if(t===x)return u(1);if(t===Y)return u(7);var p=(a={},a[S]=L,a[w]=N,a[D]=H,a)[t]||1,m=this.$d.getTime()+e*p;return s.w(m,this)},n.subtract=function(e,i){return this.add(-1*e,i)},n.format=function(e){var i=this,a=this.$locale();if(!this.isValid())return a.invalidDate||R;var o=e||"YYYY-MM-DDTHH:mm:ssZ",t=s.z(this),u=this.$H,p=this.$m,m=this.$M,_=a.weekdays,j=a.months,C=function($,I,ee,K){return $&&($[I]||$(i,o))||ee[I].slice(0,K)},J=function($){return s.s(u%12||12,$,"0")},Z=a.meridiem||function($,I,ee){var K=$<12?"AM":"PM";return ee?K.toLowerCase():K},z={YY:String(this.$y).slice(-2),YYYY:s.s(this.$y,4,"0"),M:m+1,MM:s.s(m+1,2,"0"),MMM:C(a.monthsShort,m,j,3),MMMM:C(j,m),D:this.$D,DD:s.s(this.$D,2,"0"),d:String(this.$W),dd:C(a.weekdaysMin,this.$W,_,2),ddd:C(a.weekdaysShort,this.$W,_,3),dddd:_[this.$W],H:String(u),HH:s.s(u,2,"0"),h:J(1),hh:J(2),a:Z(u,p,!0),A:Z(u,p,!1),m:String(p),mm:s.s(p,2,"0"),s:String(this.$s),ss:s.s(this.$s,2,"0"),SSS:s.s(this.$ms,3,"0"),Z:t};return o.replace(E,function($,I){return I||z[$]||t.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(e,i,a){var o,t=s.p(i),u=d(e),p=(u.utcOffset()-this.utcOffset())*L,m=this-u,_=s.m(this,u);return _=(o={},o[M]=_/12,o[g]=_,o[W]=_/3,o[Y]=(m-p)/6048e5,o[x]=(m-p)/864e5,o[w]=m/N,o[S]=m/L,o[D]=m/H,o)[t]||m,a?_:s.a(_)},n.daysInMonth=function(){return this.endOf(g).$D},n.$locale=function(){return U[this.$L]},n.locale=function(e,i){if(!e)return this.$L;var a=this.clone(),o=r(e,i,!0);return o&&(a.$L=o),a},n.clone=function(){return s.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},l}(),V=B.prototype;return d.prototype=V,[["$ms",T],["$s",D],["$m",S],["$H",w],["$W",x],["$M",g],["$y",M],["$D",k]].forEach(function(l){V[l[1]]=function(n){return this.$g(n,l[0],l[1])}}),d.extend=function(l,n){return l.$i||(l(n,B,d),l.$i=!0),d},d.locale=r,d.isDayjs=v,d.unix=function(l){return d(1e3*l)},d.en=U[F],d.Ls=U,d.p={},d})})(oe);var be=oe.exports;const we=me(be);const Me={class:"list"},xe={class:"item"},Ve=["src"],De={style:{padding:"14px"}},Se={style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis"}},ke={class:"bottom"},Oe={class:"time"},Ue={style:{display:"flex","align-items":"center",padding:"5px"}},Ce={style:{display:"flex","align-items":"center",padding:"5px"}},He={style:{display:"flex","align-items":"center",padding:"5px"}},Te={style:{display:"flex","align-items":"center",padding:"5px"}},Ye={style:{display:"flex","align-items":"center",padding:"5px"}},je={style:{padding:"12px"}},Ie={class:"dialog-footer"},Le={__name:"addSubscribe",setup(ae){let P=y([]);const H=y(""),L=he(),N=y(""),T=y(1),D=y(1),S=y(""),w=y(""),x=y(""),Y=y(""),g=y(""),W=y(0),M=y(),k=y([]);async function R(v){let r=await re(v);P.value=r.data.data}R(L.query.name),ve(v=>{R(v.query.name)});let G="";const E=y(!1);let Q="";async function q(v,r){const d=$e.service({fullscreen:!0});G=v,x.value=r;let s=await ue(v);H.value=s.data.format.replace("img1.doubanio","img9.doubanio"),N.value=s.data.year,Q=s.data.imdb_link||"",console.info(s.data.trans_title.length),s.data.trans_title.length===0?w.value=s.data.this_title.join(" / "):w.value=s.data.this_title.join(" / ")+" / "+s.data.trans_title.join(" / "),W.value=s.data.episodes,g.value=s.data.chinese_title,A.value="",s.data.imdb_link&&await F(s.data.imdb_link),E.value=!0,d.close()}const A=y("");async function F(v){const r=await de(v);A.value=r.data}async function U(){let v={name:g.value,rename:A.value,desc:H.value,year:N.value,season:D.value,ep:T.value,url:S.value,img:x.value,subtitle:w.value,time:we(Y.value).format("HH:mm:ss"),skip:T.value,sid:G,count:W.value,imdb:Q,type:M.value,tags:k.value.join(",")},r=["imdb"];for(let s in v)if(!v[s]&&!r.includes(s)){console.log(s,v[s]),ne({message:"请完整填写内容!",type:"error"});return}let d=await ce(v);d.data=="添加成功"?ne({message:d.data,type:"success"}):ne({message:d.data,type:"error"})}return(v,r)=>{const d=O("el-empty"),s=O("el-button"),B=O("el-card"),V=O("el-input"),l=O("el-time-picker"),n=O("el-option"),e=O("el-select"),i=O("el-checkbox-button"),a=O("el-checkbox-group"),o=O("el-dialog");return X(),te(ie,null,[se(P).length===0?(X(),_e(d,{key:0,description:"没有搜索到内容"})):ye("",!0),b("div",null,[b("div",Me,[(X(!0),te(ie,null,ge(se(P),t=>(X(),te("div",xe,[c(B,{onClick:u=>q(t.id,t.img),shadow:"hover","body-style":{padding:"0px"}},{default:f(()=>[b("img",{src:t.img,class:"image"},null,8,Ve),b("div",De,[b("span",Se,le(t.title),1),b("div",ke,[b("time",Oe,"上映时间:"+le(t.year),1),c(s,{text:"",class:"button"},{default:f(()=>[h("详情")]),_:1})])])]),_:2},1032,["onClick"])]))),256))]),c(o,{modelValue:E.value,"onUpdate:modelValue":r[12]||(r[12]=t=>E.value=t),title:"添加订阅"},{footer:f(()=>[b("span",Ie,[c(s,{onClick:r[11]||(r[11]=t=>E.value=!1)},{default:f(()=>[h("关闭")]),_:1}),c(s,{type:"primary",onClick:U},{default:f(()=>[h(" 订阅 ")]),_:1})])]),default:f(()=>[b("div",Ue,[c(V,{style:{width:"100%"},modelValue:A.value,"onUpdate:modelValue":r[0]||(r[0]=t=>A.value=t)},{prepend:f(()=>[h("英文名")]),_:1},8,["modelValue"])]),b("div",Ce,[c(V,{style:{width:"100%"},modelValue:w.value,"onUpdate:modelValue":r[1]||(r[1]=t=>w.value=t)},{prepend:f(()=>[h("副标题")]),_:1},8,["modelValue"])]),b("div",He,[c(V,{style:{width:"100%"},modelValue:S.value,"onUpdate:modelValue":r[2]||(r[2]=t=>S.value=t)},{prepend:f(()=>[h("播放地址")]),_:1},8,["modelValue"])]),b("div",Te,[c(l,{modelValue:Y.value,"onUpdate:modelValue":r[3]||(r[3]=t=>Y.value=t),placeholder:"Arbitrary time"},null,8,["modelValue"]),c(V,{style:{width:"20%",left:"10px"},modelValue:N.value,"onUpdate:modelValue":r[4]||(r[4]=t=>N.value=t)},{prepend:f(()=>[h("年份")]),_:1},8,["modelValue"]),c(V,{style:{width:"15%",left:"20px"},modelValue:D.value,"onUpdate:modelValue":r[5]||(r[5]=t=>D.value=t)},{prepend:f(()=>[h("季")]),_:1},8,["modelValue"]),c(V,{style:{width:"30%",left:"30px"},modelValue:T.value,"onUpdate:modelValue":r[6]||(r[6]=t=>T.value=t)},{prepend:f(()=>[h("订阅位置(集)")]),_:1},8,["modelValue"]),c(V,{style:{width:"30%",left:"30px"},modelValue:W.value,"onUpdate:modelValue":r[7]||(r[7]=t=>W.value=t)},{prepend:f(()=>[h("总集数")]),_:1},8,["modelValue"])]),b("div",Ye,[c(e,{modelValue:M.value,"onUpdate:modelValue":r[8]||(r[8]=t=>M.value=t),"value-key":"browsecat"},{default:f(()=>[c(n,{value:418,label:"日漫"},{default:f(()=>[h("日漫")]),_:1}),c(n,{value:417,label:"国漫"},{default:f(()=>[h("国漫")]),_:1}),c(n,{value:403,label:"综艺"},{default:f(()=>[h("综艺")]),_:1}),c(n,{value:402,label:"电视剧"},{default:f(()=>[h("电视剧")]),_:1}),c(n,{value:422,label:"纪录片"},{default:f(()=>[h("纪录片")]),_:1})]),_:1},8,["modelValue"]),b("div",je,[c(a,{modelValue:k.value,"onUpdate:modelValue":r[9]||(r[9]=t=>k.value=t),size:"large"},{default:f(()=>[c(i,{label:"1"},{default:f(()=>[h("禁转")]),_:1}),c(i,{label:"3"},{default:f(()=>[h("官方")]),_:1}),c(i,{label:"5"},{default:f(()=>[h("国语")]),_:1}),c(i,{label:"6"},{default:f(()=>[h("中字")]),_:1}),c(i,{label:"7"},{default:f(()=>[h("HDR")]),_:1})]),_:1},8,["modelValue"])])]),c(V,{style:{display:"flex","align-items":"center",padding:"5px"},autosize:{minRows:10,maxRows:10},modelValue:H.value,"onUpdate:modelValue":r[10]||(r[10]=t=>H.value=t),rows:2,type:"textarea",placeholder:"Please input"},null,8,["modelValue"])]),_:1},8,["modelValue"])])],64)}}},Fe=pe(Le,[["__scopeId","data-v-3b288cf6"]]);export{Fe as default};
|