>>0?1:0))+((te>>>19|ee<<13)^(te<<3|ee>>>29)^te>>>6)+((W+=z=(ee>>>19|te<<13)^(ee<<3|te>>>29)^(ee>>>6|te<<26))>>>0>>0?1:0))+(se=u[K-16]).high+((W+=Q=se.low)>>>0 >>0?1:0),$.high=V,$.low=W);var he,ee=B&U^~B&G,te=F&H^~F&j,z=k&D^k&w^D&w,se=(L>>>28|k<<4)^(L<<30|k>>>2)^(L<<25|k>>>7),Q=c[K],$=Q.high,ye=Q.low,Se=q+((B>>>14|F<<18)^(B>>>18|F<<14)^(B<<23|F>>>9))+((he=Y+((F>>>14|B<<18)^(F>>>18|B<<14)^(F<<23|B>>>9)))>>>0>>0?1:0),Ce=se+(L&R^L&x^R&x),q=G,Y=j,G=U,j=H,U=B,H=F,B=M+(Se=Se+ee+((he+=te)>>>0 >>0?1:0)+$+((he+=ye)>>>0 >>0?1:0)+V+((he+=W)>>>0 >>0?1:0))+((F=P+he|0)>>>0 >>0?1:0)|0,M=w,P=x,w=D,x=R,D=k,R=L,k=Se+(((k>>>28|L<<4)^(k<<30|L>>>2)^(k<<25|L>>>7))+z+(Ce>>>0
>>0?1:0))+((L=he+Ce|0)>>>0 >>0?1:0)|0}d=r.low=d+L,r.high=p+k+(d>>>0 >>0?1:0),_=i.low=_+R,i.high=m+D+(_>>>0 >>0?1:0),T=s.low=T+x,s.high=E+w+(T>>>0 >>0?1:0),g=a.low=g+P,a.high=A+M+(g>>>0 >>0?1:0),y=o.low=y+F,o.high=v+B+(y>>>0
>>0?1:0),C=l.low=C+H,l.high=S+U+(C>>>0 >>0?1:0),b=h.low=b+j,h.high=N+G+(b>>>0 >>0?1:0),O=n.low=O+Y,n.high=I+q+(O>>>0 >>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(128+r>>>10<<5)]=Math.floor(n/4294967296),t[31+(128+r>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32}));e.SHA512=t._createHelper(r),e.HmacSHA512=t._createHmacHelper(r)}(),n.SHA512)}),Sr(function(e,t){var n,i,s,o,r;e.exports=(r=(n=e=dh).x64,i=r.Word,s=r.WordArray,r=n.algo,o=r.SHA512,r=r.SHA384=o.extend({_doReset:function(){this._hash=new s.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=o._createHelper(r),n.HmacSHA384=o._createHmacHelper(r),e.SHA384)}),Sr(function(e,t){var n;e.exports=(n=dh,function(e){var t=n,i=(r=t.lib).WordArray,s=r.Hasher,a=t.x64.Word,r=t.algo,c=[],u=[],l=[],h=(function(){for(var e=1,t=0,n=0;n<24;n++){c[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5,e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)u[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,s=0;s<24;s++){for(var p,o=0,h=0,f=0;f<7;f++)1&i&&((p=(1< >>24)|4278255360&(s<<24|s>>>8);(O=n[i]).high^=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),O.low^=s}for(var o=0;o<24;o++){for(var f=0;f<5;f++){for(var p=0,d=0,m=0;m<5;m++)p^=(O=n[f+5*m]).high,d^=O.low;var _=h[f];_.high=p,_.low=d}for(f=0;f<5;f++)for(var E=h[(f+4)%5],A=(T=h[(f+1)%5]).high,T=T.low,p=E.high^(A<<1|T>>>31),d=E.low^(T<<1|A>>>31),m=0;m<5;m++)(O=n[f+5*m]).high^=p,O.low^=d;for(var v=1;v<25;v++){var y=(O=n[v]).high,S=O.low,C=c[v];d=C<32?(p=y< >>32-C,S< >>32-C):(p=S< >>64-C,y< >>64-C),(y=h[u[v]]).high=p,y.low=d}var b=h[0],I=n[0];for(b.high=I.high,b.low=I.low,f=0;f<5;f++)for(m=0;m<5;m++){var O=n[v=f+5*m],k=h[v],L=h[(f+1)%5+5*m],D=h[(f+2)%5+5*m];O.high=k.high^~L.high&D.high,O.low=k.low^~L.low&D.low}(O=n[0]).high^=(b=l[o]).high,O.low^=b.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),s=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((1+r)/s)*s>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,c=(r=this.cfg.outputLength/8)/8,u=[],l=0;l >>24)|4278255360&(f<<24|f>>>8);u.push(16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)),u.push(f)}return new i.init(u,r)},clone:function(){for(var e=s.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}}));t.SHA3=s._createHelper(r),t.HmacSHA3=s._createHmacHelper(r)}(Math),n.SHA3)}),Sr(function(e,t){var n;e.exports=(n=dh,function(){var t=n,i=(r=t.lib).WordArray,s=r.Hasher,r=t.algo,o=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),f=i.create([1352829926,1548603684,1836072691,2053994217,0]),r=r.RIPEMD160=s.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}for(var s,a,p,g,v,I,O=this._hash.words,k=h.words,L=f.words,D=o.words,R=c.words,w=u.words,x=l.words,y=s=O[0],S=a=O[1],C=p=O[2],N=g=O[3],b=v=O[4],n=0;n<80;n+=1)I=(I=A(I=(I=s+e[t+D[n]]|0)+(n<16?(a^p^g)+k[0]:n<32?m(a,p,g)+k[1]:n<48?((a|~p)^g)+k[2]:n<64?E(a,p,g)+k[3]:(a^(p|~g))+k[4])|0,w[n]))+v|0,s=v,v=g,g=A(p,10),p=a,a=I,I=(I=A(I=(I=y+e[t+R[n]]|0)+(n<16?(S^(C|~N))+L[0]:n<32?E(S,C,N)+L[1]:n<48?((S|~C)^N)+L[2]:n<64?m(S,C,N)+L[3]:(S^C^N)+L[4])|0,x[n]))+b|0,y=b,b=N,N=A(C,10),C=S,S=I;I=O[1]+p+N|0,O[1]=O[2]+g+b|0,O[2]=O[3]+v+y|0,O[3]=O[4]+s+S|0,O[4]=O[0]+a+C|0,O[0]=I},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(64+r>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var s=(r=this._hash).words,a=0;a<5;a++){var o=s[a];s[a]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}return r},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});function m(e,t,n){return e&t|~e&n}function E(e,t,n){return e&n|t&~n}function A(e,t){return e< >>32-t}t.RIPEMD160=s._createHelper(r),t.HmacRIPEMD160=s._createHmacHelper(r)}(),n.RIPEMD160)}),Sr(function(e,t){var i;e.exports=(e=dh.lib.Base,i=dh.enc.Utf8,void(dh.algo.HMAC=e.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var n=e.blockSize,r=4*n;(t=t.sigBytes>r?e.finalize(t):t).clamp();for(var e=this._oKey=t.clone(),t=this._iKey=t.clone(),o=e.words,c=t.words,u=0;u >>2];e.sigBytes-=t}},m=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:d}),reset:function(){l.reset.call(this);var e,n=(t=this.cfg).iv,t=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=t.createEncryptor:(e=t.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(t,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),o=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?s.create([1398893684,1701076831]).concat(e).concat(t):t).toString(c)},parse:function(e){var t,r=(e=c.parse(e)).words;return 1398893684==r[0]&&1701076831==r[1]&&(t=s.create(r.slice(2,4)),r.splice(0,4),e.sigBytes-=16),m.create({ciphertext:e,salt:t})}},E=r.SerializableCipher=i.extend({cfg:i.extend({format:o}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var t=(i=e.createEncryptor(n,r)).finalize(t),i=i.cfg;return m.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),d=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){return r=r||s.random(8),e=u.create({keySize:t+n}).compute(e,r),n=s.create(e.words.slice(t),4*n),e.sigBytes=4*t,m.create({key:e,iv:n,salt:r})}},A=r.PasswordBasedCipher=E.extend({cfg:E.cfg.extend({kdf:d}),encrypt:function(e,t,n,r){return n=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,(e=E.encrypt.call(this,e,t,n.key,r)).mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,E.decrypt.call(this,e,t,n.key,r)}});function e(e){return"string"==typeof e?A:E}}())}),Sr(function(e,t){var n;e.exports=((n=dh).mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,s=this._iv;s?(i=s.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a >24&255)?(n=e>>8&255,r=255&e,255==(t=e>>16&255)?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e=(e+=t<<16)+(n<<8)+r):e+=1<<24,e}function r(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}var i=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,s=this._iv,a=this._counter,o=(s&&(a=this._counter=s.slice(0),this._iv=void 0),r(a),a.slice(0));n.encryptBlock(o,0);for(var c=0;c>>2]|=t<<24-n%4*8,e.sigBytes+=t},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},dh.pad.Ansix923)}),Sr(function(e,t){var n;e.exports=((n=dh).pad.Iso10126={pad:function(e,t){t=(t*=4)-e.sigBytes%t,e.concat(n.lib.WordArray.random(t-1)).concat(n.lib.WordArray.create([t<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)}),Sr(function(e,t){var n;e.exports=((n=dh).pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)}),Sr(function(e,t){e.exports=(dh.pad.ZeroPadding={pad:function(e,t){t*=4,e.clamp(),e.sigBytes+=t-(e.sigBytes%t||t)},unpad:function(e){for(var t=e.words,n=e.sigBytes-1,n=e.sigBytes-1;0<=n;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},dh.pad.ZeroPadding)}),Sr(function(e,t){e.exports=(dh.pad.NoPadding={pad:function(){},unpad:function(){}},dh.pad.NoPadding)}),Sr(function(e,t){var r,i;e.exports=(r=(e=dh).lib.CipherParams,i=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){return e=i.parse(e),r.create({ciphertext:e})}},e.format.Hex)}),Sr(function(e,t){var n;e.exports=(n=dh,function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],s=[],a=[],o=[],c=[],u=[],l=[],h=[],f=[],p=[],d=(function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=0,r=0,t=0;t<256;t++){var d=r^r<<1^r<<2^r<<3^r<<4,m=(i[n]=d=d>>>8^255&d^99,e[s[d]=n]),_=e[m],E=e[_],T=257*e[d]^16843008*d;a[n]=T<<24|T>>>8,o[n]=T<<16|T>>>16,c[n]=T<<8|T>>>24,u[n]=T,l[d]=(T=16843009*E^65537*_^257*m^16843008*n)<<24|T>>>8,h[d]=T<<16|T>>>16,f[d]=T<<8|T>>>24,p[d]=T,n?(n=m^e[e[e[E^m]]],r^=e[e[r]]):n=r=1}}(),[0,1,2,4,8,16,32,64,128,27,54]),r=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*(1+(this._nRounds=6+n)),s=this._keySchedule=[],a=0;a >>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=d[a/n|0]<<24),s[a]=s[a-n]^u);for(var o=this._invKeySchedule=[],c=0;c >>24]]^h[i[u>>>16&255]]^f[i[u>>>8&255]]^p[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,o,c,u,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,p,s),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,s,a,o){for(var c=this._nRounds,u=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],p=4,d=1;d >>24]^i[l>>>16&255]^s[h>>>8&255]^a[255&f]^n[p++],_=r[l>>>24]^i[h>>>16&255]^s[f>>>8&255]^a[255&u]^n[p++],E=r[h>>>24]^i[f>>>16&255]^s[u>>>8&255]^a[255&l]^n[p++],T=r[f>>>24]^i[u>>>16&255]^s[l>>>8&255]^a[255&h]^n[p++],u=m,l=_,h=E,f=T;m=(o[u>>>24]<<24|o[l>>>16&255]<<16|o[h>>>8&255]<<8|o[255&f])^n[p++],_=(o[l>>>24]<<24|o[h>>>16&255]<<16|o[f>>>8&255]<<8|o[255&u])^n[p++],E=(o[h>>>24]<<24|o[f>>>16&255]<<16|o[u>>>8&255]<<8|o[255&l])^n[p++],T=(o[f>>>24]<<24|o[u>>>16&255]<<16|o[l>>>8&255]<<8|o[255&h])^n[p++],e[t]=m,e[t+1]=_,e[t+2]=E,e[t+3]=T},keySize:8});e.AES=t._createHelper(r)}(),n.AES)}),Sr(function(e,t){var n;e.exports=(n=dh,function(){var e=n,r=(t=e.lib).WordArray,t=t.BlockCipher,s=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=s.DES=t.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=a[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],s=0;s<16;s++){for(var u=i[s]=[],l=c[s],n=0;n<24;n++)u[n/6|0]|=t[(o[n]-1+l)%28]<<31-n%6,u[4+(n/6|0)]|=t[28+(o[n+24]-1+l)%28]<<31-n%6;for(u[0]=u[0]<<1|u[0]>>>31,n=1;n<7;n++)u[n]=u[n]>>>4*(n-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],f.call(this,4,252645135),f.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),f.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],s=this._lBlock,a=this._rBlock,o=0,c=0;c<8;c++)o|=u[c][((a^i[c])&l[c])>>>0];this._lBlock=a,this._rBlock=s^o}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,f.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(e,t){t=(this._lBlock>>>e^this._rBlock)&t,this._rBlock^=t,this._lBlock^=t< >>e^this._lBlock)&t,this._lBlock^=t,this._rBlock^=t< 192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),e=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=h.createEncryptor(r.create(t)),this._des2=h.createEncryptor(r.create(n)),this._des3=h.createEncryptor(r.create(e))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2}),e.TripleDES=t._createHelper(s)}(),n.TripleDES)}),Sr(function(e,t){var n;e.exports=(n=dh,function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;for(var i=0,s=0;i<256;i++){var a=t[(a=i%n)>>>2]>>>24-a%4*8&255,s=(s+r[i]+a)%256,a=r[i];r[i]=r[s],r[s]=a}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=s.call(this)},keySize:8,ivSize:0});function s(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){var n=(n+e[t=(t+1)%256])%256,s=e[t];e[t]=e[n],e[n]=s,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i),r=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;0 >>24)|4278255360&(e[n]<<24|e[n]>>>8);for(var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]],n=this._b=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var a=(t=t.words)[0],h=(a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8))>>>16|4294901760&(t=16711935&((t=t[1])<<8|t>>>24)|4278255360&(t<<24|t>>>8)),f=t<<16|65535&a;for(i[0]^=a,i[1]^=h,i[2]^=t,i[3]^=f,i[4]^=a,i[5]^=h,i[6]^=t,i[7]^=f,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)s[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0 >>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,o=r>>>16;a[n]=((i*i>>>17)+i*o>>>15)+o*o^((4294901760&r)*r|0)+((65535&r)*r|0)}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(r)}(),n.Rabbit)}),Sr(function(e,t){var n;e.exports=(n=dh,function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],s=[],a=[],r=r.RabbitLegacy=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]],i=this._b=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var h=(t=16711935&((t=(e=t.words)[0])<<8|t>>>24)|4278255360&(t<<24|t>>>8))>>>16|4294901760&(e=16711935&((e=e[1])<<8|e>>>24)|4278255360&(e<<24|e>>>8)),f=e<<16|65535&t;for(r[0]^=t,r[1]^=h,r[2]^=e,r[3]^=f,r[4]^=t,r[5]^=h,r[6]^=e,r[7]^=f,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)s[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,o=r>>>16;a[n]=((i*i>>>17)+i*o>>>15)+o*o^((4294901760&r)*r|0)+((65535&r)*r|0)}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(r)}(),n.RabbitLegacy)}),Sr(function(e,t){e.exports=dh})),_h=function(t,n,r,i){return"string"==typeof(t="undefined"!=typeof Buffer&&Buffer.isBuffer(t)?t.toString():t)?function(e,t,n,r){return t.xmlMode||t._useHtmlParser2?function(e,t){var n=new w(void 0,t);return new va(n,t).end(e),n.root}(e,t):ta(e,t,n,r)}(t,n,r,i):(n=t,!Array.isArray(n)&&O(n)?n:(Bn(n,r=new v([])),r))},Eh=function(e){return function r(s,a,o){if(void 0===o&&(o=!0),null==s)throw new Error("cheerio.load() expects a string");var c=rr(rr({},n),i(a)),u=e(s,c,o,null),l=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return nr(r,n),r.prototype._make=function(e,t){return(e=h(e,t)).prevObject=this,e},r.prototype._parse=function(t,n,r,i){return e(t,n,r,i)},r.prototype._render=function(e){return function(e,t){return t.xmlMode||t._useHtmlParser2?W(e,t):function(e){for(var t,n=("length"in e?e:[e]),r=0;r{ - cls.land = 1; - cls.ratio = 1.78; - return cls; - }), - filters: filterObj, - }) -} - -async function homeVod() { - const data = JSON.parse(await request(HOST + '/NewVideo/getVideoListByColumn?id=TOPC1451558856402351&n=10&sort=desc&p=1&mode=0&serviceId=tvcctv')); - let videos = _.map(data.data.list, (it) => { - return { - vod_id: it.guid, - vod_name: it.title, - vod_pic: it.image, - vod_remarks: it.time || '', - } - }); - return JSON.stringify({ - list: videos, - }) -} - -async function category(tid, pg, filter, extend) { - if (pg <= 0 || typeof pg == 'undefined') pg = 1; - const data = JSON.parse(await request(HOST + '/NewVideo/getVideoListByColumn?id=' + tid + '&n=10&sort=desc&p=' + pg + '&mode=0&serviceId=tvcctv')); - let videos = _.map(data.data.list, (it) => { - return { - vod_id: it.guid, - vod_name: it.title, - vod_pic: it.image, - vod_remarks: it.time || '', - } - }); - const pgChk = JSON.parse(await request(HOST + '/NewVideo/getVideoListByColumn?id=' + tid + '&n=10&sort=desc&p=' + (parseInt(pg) + 1) + '&mode=0&serviceId=tvcctv')).data.list; - const pgCount = pgChk.length > 0 ? parseInt(pg) + 1 : parseInt(pg); - return JSON.stringify({ - page: parseInt(pg), - pagecount: parseInt(pgCount), - limit: 10, - total: parseInt(data.total), - list: videos, - }) -} - -async function detail(id) { - const vod = { - vod_id: id, - vod_remarks: '', - }; - const playlist = ['点击播放' + '$' + 'https://hls.cntv.myhwcdn.cn/asp/hls/2000/0303000a/3/default/' + id + '/2000.m3u8']; - vod.vod_play_from = key; - vod.vod_play_url = playlist.join('#'); - return JSON.stringify({ - list: [vod], - }); -} - -async function play(flag, id, flags) { - // console.debug('视聚场 id =====>' + id); // js_debug.log - return JSON.stringify({ - parse: 0, - url: id, - }) -} - -async function search(wd, quick, pg) { - return '{}' -} - -export function __jsEvalReturn() { - return { - init: init, - home: home, - homeVod: homeVod, - category: category, - detail: detail, - play: play, - search: search, - } -} \ No newline at end of file diff --git a/lib/dj0898_open.js b/lib/dj0898_open.js deleted file mode 100644 index ca9482ca..00000000 --- a/lib/dj0898_open.js +++ /dev/null @@ -1,156 +0,0 @@ -import { load, _ } from "assets://js/lib/cat.js"; - -let key = "世纪DJ音乐网"; -let HOST = "http://m.dj0898.com"; -let siteKey = ""; -let siteType = 0; - -const MOBILE_UA = "Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36"; - -async function request(reqUrl, agentSp) { - let res = await req(reqUrl, { - method: "get", - headers: { - "User-Agent": agentSp || MOBILE_UA, - Referer: HOST, - }, - }); - return res.content; -} - -async function init(cfg) { - siteKey = cfg.skey; - siteType = cfg.stype; -} - -async function home(filter) { - const classes = [{ type_id: 1, type_name: "🎧串烧舞曲" }, { type_id: 2, type_name: "🎧外文舞曲" }, { type_id: 3, type_name: "🎧早场暖场" }, { type_id: 4, type_name: "🎧中文舞曲" }, { type_id: 5, type_name: "🎧其他舞曲" }, { type_id: 6, type_name: "🎧国外电音" }, { type_id: 8, type_name: "🎧慢歌连版" }, { type_id: 9, type_name: "🎧酒吧潮歌" }, { type_id: 10, type_name: "🎧中文串烧" }, { type_id: 11, type_name: "🎧外文串烧" }, { type_id: 12, type_name: "🎧中外串烧" }, { type_id: 13, type_name: "🎧车载串烧" }, { type_id: 14, type_name: "🎧越鼓串烧" }, { type_id: 40, type_name: "🎧3D/环绕" }, { type_id: 45, type_name: "🎧口水旋律" }, { type_id: 46, type_name: "🎧精品收藏" }, { type_id: 47, type_name: "🎧开场舞曲" }, { type_id: 48, type_name: "🎧印度舞曲" }, { type_id: 49, type_name: "🎧编排套曲" }, { type_id: 20, type_name: "🎧DuTch" }, { type_id: 21, type_name: "🎧Mash up" }, { type_id: 22, type_name: "🎧ClubHouse" }, { type_id: 23, type_name: "🎧ElectroHouse" }, { type_id: 24, type_name: "🎧越南鼓Dj" }, { type_id: 30, type_name: "🎧Funky" }, { type_id: 31, type_name: "🎧Reggae" }, { type_id: 32, type_name: "🎧Rnb" }, { type_id: 33, type_name: "🎧Hip Hop" }, { type_id: 34, type_name: "🎧Dubstep" }, { type_id: 8017, type_name: "🎧Hardstyle" }, { type_id: 8018, type_name: "🎧Hands Up" }]; - const filterObj = {}; - return JSON.stringify({ - class: _.map(classes, (cls) => { - cls.land = 1; - cls.ratio = 1.78; - return cls; - }), - filters: filterObj, - }); -} - -async function homeVod() { - const link = HOST + "/dance/lists/id/10/1"; - const html = await request(link); - const $ = load(html); - const list = $("ul.djddv_djList > li"); - let videos = _.map(list, (it) => { - const a = $(it).find("a")[1]; - const img = $(it).find("img:first")[0]; - const tt = $(it).find("strong:first")[0]; - const remarks = $(it).find("font")[5]; - return { - vod_id: a.attribs.href, - vod_name: tt.children[0].data, - vod_pic: img.attribs["src"], - vod_remarks: "🎵" + remarks.children[0].data || "", - }; - }); - return JSON.stringify({ - list: videos, - }); -} - -async function category(tid, pg, filter, extend) { - if (pg <= 0 || typeof pg == "undefined") pg = 1; - const link = HOST + "/dance/lists/id/" + tid + "/" + pg; - const html = await request(link); - const $ = load(html); - const list = $("ul.djddv_djList > li"); - let videos = _.map(list, (it) => { - const a = $(it).find("a")[1]; - const img = $(it).find("img:first")[0]; - const tt = $(it).find("strong:first")[0]; - const remarks = $(it).find("font")[5]; - return { - vod_id: a.attribs.href, - vod_name: tt.children[0].data, - vod_pic: img.attribs["src"], - vod_remarks: "🎵" + remarks.children[0].data || "", - }; - }); - const hasMore = $("ul.page_link > li > a:contains(\u00a0)").length > 0; - const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg); - return JSON.stringify({ - page: parseInt(pg), - pagecount: pgCount, - limit: 60, - total: 60 * pgCount, - list: videos, - }); -} - -async function detail(id) { - const vod = { - vod_id: id, - vod_remarks: "", - }; - const playlist = ["点击播放" + "$" + vod.vod_id]; - vod.vod_play_from = "道长在线"; - vod.vod_play_url = playlist.join("#"); - return JSON.stringify({ - list: [vod], - }); -} - -async function play(flag, id, flags) { - const html = await request(id); - const $ = load(html); - const audio = $("body audio[src*=http]"); - const audioUrl = audio[0].attribs.src; - // console.debug('世纪DJ音乐网 audioUrl =====>' + audioUrl); // js_debug.log - return JSON.stringify({ - parse: 0, - url: audioUrl, - }); -} - -async function search(wd, quick, pg) { - if (pg <= 0 || typeof pg == "undefined") pg = 1; - const link = HOST + "/index.php/dance/so/key?key=" + wd + "&cid=0&p=" + pg; - const html = await request(link); - const $ = load(html); - const list = $("ul.djddv_djList > li"); - let videos = _.map(list, (it) => { - const a = $(it).find("a")[1]; - const img = $(it).find("img:first")[0]; - const tt = $(it).find("strong:first")[0]; - const remarks = $(it).find("font:first")[0]; - return { - vod_id: a.attribs.href, - vod_name: tt.children[0].data, - vod_pic: img.attribs["src"], - vod_remarks: "🎵" + remarks.children[0].data || "", - }; - }); - const hasMore = $("ul.page_link > li > a:contains(\u00a0)").length > 0; - const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg); - return JSON.stringify({ - page: parseInt(pg), - pagecount: pgCount, - limit: 60, - total: 60 * pgCount, - list: videos, - land: 1, - ratio: 1.78, - }); -} - -export function __jsEvalReturn() { - return { - init: init, - home: home, - homeVod: homeVod, - category: category, - detail: detail, - play: play, - search: search, - }; -} \ No newline at end of file diff --git a/lib/kuqimv_open.js b/lib/kuqimv_open.js deleted file mode 100644 index 1cefed47..00000000 --- a/lib/kuqimv_open.js +++ /dev/null @@ -1,173 +0,0 @@ -// 修正:分类改静态 (网站频繁变动分类) -import { load, _ } from "assets://js/lib/cat.js"; - -let key = "酷奇MV"; -let HOST = "https://www.kuqimv.com"; -let siteKey = ""; -let siteType = 0; -const PC_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"; - -async function request(reqUrl, referer, mth, data, hd) { - const headers = { - "User-Agent": PC_UA, - }; - if (referer) headers.referer = encodeURIComponent(referer); - let res = await req(reqUrl, { - method: mth || "get", - headers: headers, - data: data, - postType: mth === "post" ? "form" : "", - }); - return res.content; -} - -async function init(cfg) { - siteKey = cfg.skey; - siteType = cfg.stype; -} - -async function home(filter) { - var classes = [{ "type_id": "1", "type_name": "华语高清" }, { "type_id": "2", "type_name": "日韩精选" }, { "type_id": "3", "type_name": "欧美MV" }, { "type_id": "4", "type_name": "高清现场" }, { "type_id": "5", "type_name": "影视MV" }, { "type_id": "6", "type_name": "夜店视频" }, { "type_id": "7", "type_name": "车模视频" }, { "type_id": "8", "type_name": "热舞视频" }, { "type_id": "9", "type_name": "美女写真" }, { "type_id": "10", "type_name": "美女打碟" }]; - // const html = await request(HOST); - // const $ = load(html); - // const class_parse = $(".lei_fl > a[href*=play]"); - // const classes = []; - // classes = _.map(class_parse, (cls) => { - // const typeId = cls.attribs["href"]; - // typeId = typeId.substring(typeId.lastIndexOf("/") + 1).replace(".html", ""); - // return { - // type_id: typeId, - // type_name: cls.children[0].data, - // }; - // }); - const filterObj = {}; - return JSON.stringify({ - class: _.map(classes, (cls) => { - cls.land = 1; - cls.ratio = 1.78; - return cls; - }), - filters: filterObj, - }); -} - -async function homeVod() { - const link = HOST + "/play/9_1.html"; - const html = await request(link); - const $ = load(html); - const items = $("div.mv_list > li"); - let videos = _.map(items, (it) => { - const a = $(it).find("a:first")[0]; - const img = $(it).find("img:first")[0]; - const singer = $($(it).find("div.singer")[0]).text().trim(); - const remarks = $($(it).find("span.lei_03")[0]).text().trim(); - return { - vod_id: a.attribs.href.replace(/.*?\/play\/(.*).html/g, "$1"), - vod_name: a.attribs.title, - vod_pic: img.attribs["src"], - vod_remarks: "🎤" + singer + "|" + remarks || "", - }; - }); - return JSON.stringify({ - list: videos, - }); -} - -async function category(tid, pg, filter, extend) { - if (pg <= 0 || typeof pg == "undefined") pg = 1; - const link = HOST + "/play/" + tid + "_" + pg + ".html"; - const html = await request(link); - const $ = load(html); - const items = $("div.mv_list > li"); - let videos = _.map(items, (it) => { - const a = $(it).find("a:first")[0]; - const img = $(it).find("img:first")[0]; - const singer = $($(it).find("div.singer")[0]).text().trim(); - const remarks = $($(it).find("span.lei_03")[0]).text().trim(); - return { - vod_id: a.attribs.href.replace(/.*?\/play\/(.*).html/g, "$1"), - vod_name: a.attribs.title, - vod_pic: img.attribs["src"], - vod_remarks: "🎤" + singer + "|" + remarks || "", - }; - }); - const hasMore = $("div.lei_page > a:contains(下一页)").length > 0; - const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg); - return JSON.stringify({ - page: parseInt(pg), - pagecount: pgCount, - limit: 24, - total: 24 * pgCount, - list: videos, - }); -} - -async function detail(id) { - const vod = { - vod_id: id, - vod_remarks: "", - }; - const playlist = ["观看视频" + "$" + id]; - vod.vod_play_from = "道长在线"; - vod.vod_play_url = playlist.join("#"); - return JSON.stringify({ - list: [vod], - }); -} - -async function play(flag, id, flags) { - const link = HOST + "/skin/kuqimv/play.php"; - const ref = HOST + "/play/" + id + ".html"; - const pdata = { id: id }; - const playUrl = JSON.parse(await request(link, ref, "post", pdata)).url; - const headers = { - Referer: HOST, - }; - return JSON.stringify({ - parse: 0, - url: playUrl, - header: headers, - }); -} - -async function search(wd, quick, pg) { - if (pg <= 0 || typeof pg == "undefined") pg = 1; - const link = HOST + "/search.php?key=" + wd + "&pages=" + pg; - const html = await request(link); - const $ = load(html); - const items = $("div.video_list > li"); - let videos = _.map(items, (it) => { - const a = $(it).find("a:first")[0]; - const singer = $($(it).find("div.singer")[0]).text().trim(); - const remarks = $($(it).find("span.lei_04")[0]).text().trim(); - return { - vod_id: a.attribs.href.replace(/.*?\/play\/(.*).html/g, "$1"), - vod_name: a.attribs.title, - vod_pic: "https://www.kuqimv.com/static/images/cover/singer.jpg", - vod_remarks: "🎤" + singer + "|" + remarks || "", - }; - }); - const hasMore = $("div.lei_page > a:contains(>)").length > 0; - const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg); - return JSON.stringify({ - page: parseInt(pg), - pagecount: pgCount, - limit: 20, - total: 20 * pgCount, - list: videos, - land: 1, - ratio: 1.78, - }); -} - -export function __jsEvalReturn() { - return { - init: init, - home: home, - homeVod: homeVod, - category: category, - detail: detail, - play: play, - search: search, - }; -} \ No newline at end of file diff --git a/lib/similarity.js b/lib/similarity.js deleted file mode 100644 index 3dfc497d..00000000 --- a/lib/similarity.js +++ /dev/null @@ -1 +0,0 @@ -function compareTwoStrings(first,second){if((first=first.replace(/\s+/g,""))===(second=second.replace(/\s+/g,"")))return 1;if(first.length<2||second.length<2)return 0;var firstBigrams=new Map;for(let i=0;i ratings[bestMatchIndex].rating&&(bestMatchIndex=i)}return{ratings:ratings,bestMatch:ratings[bestMatchIndex],bestMatchIndex:bestMatchIndex}}function lcs(str1,str2){if(!str1||!str2)return{length:0,sequence:"",offset:0};for(var sequence="",str1Length=str1.length,str2Length=str2.length,num=new Array(str1Length),maxlen=0,lastSubsBegin=0,i=0;i maxlen&&(maxlen=num[i][j],lastSubsBegin===(thisSubsBegin=i-num[i][j]+1)?sequence+=str1[i]:(lastSubsBegin=thisSubsBegin,sequence="",sequence+=str1.substr(lastSubsBegin,i+1-lastSubsBegin))));return{length:maxlen,sequence:sequence,offset:thisSubsBegin}}function findBestLCS(mainString,targetStrings){var results=[];let bestMatchIndex=0;for(let i=0;i results[bestMatchIndex].lcs.length&&(bestMatchIndex=i)}return{allLCS:results,bestMatch:results[bestMatchIndex],bestMatchIndex:bestMatchIndex}}export{compareTwoStrings,findBestMatch,findBestLCS}; \ No newline at end of file diff --git a/lib/tuxiaobei_open.js b/lib/tuxiaobei_open.js deleted file mode 100644 index 8feddb2d..00000000 --- a/lib/tuxiaobei_open.js +++ /dev/null @@ -1,135 +0,0 @@ -import { load, _ } from './lib/cat.js'; -let key = '🐰兔小贝'; -let HOST = 'https://www.tuxiaobei.com'; -let siteKey = ''; -let siteType = 0; -const IOS_UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'; - -async function request(reqUrl, agentSp) { - let res = await req(reqUrl, { - method: 'get', - headers: { - 'User-Agent': agentSp || IOS_UA, - }, - }); - return res.content -} - -async function init(cfg) { - siteKey = cfg.skey; - siteType = cfg.stype -} - -async function home(filter) { - const classes = [{ type_id: '', type_name: '🐰全部' }, { type_id: 2, type_name: '🐰儿歌' }, { type_id: 3, type_name: '🐰故事' }, { type_id: 27, type_name: '🐰公益' }, { type_id: 9, type_name: '🐰十万个为什么' }, { type_id: 28, type_name: '🐰安全教育' }, { type_id: 29, type_name: '🐰动物奇缘' }, { type_id: 7, type_name: '🐰弟子规' }, { type_id: 5, type_name: '🐰古诗' }, { type_id: 6, type_name: '🐰三字经' }, { type_id: 8, type_name: '🐰千字文' }, { type_id: 11, type_name: '🐰数学' }, { type_id: 25, type_name: '🐰英语' }, { type_id: 24, type_name: '🐰折纸' }]; - const filterObj = {}; - return JSON.stringify({ - class: _.map(classes, (cls) => { - cls.land = 1; - cls.ratio = 1.78; - return cls; - }), - filters: filterObj, - }) -} - -async function homeVod() { - const link = await request(HOST + '/list/mip-data?typeId=9&page=1&callback='); - const html = link.match(/\((.*?)\);/)[1]; - const data = JSON.parse(html).data; - let videos = _.map(data.items, (it) => { - return { - vod_id: it.video_id, - vod_name: it.name, - vod_pic: it.image, - vod_remarks: it.root_category_name + ' | ' + it.duration_string || '', - } - }); - return JSON.stringify({ - list: videos, - }) -} - -async function category(tid, pg, filter, extend) { - if (pg <= 0 || typeof pg == 'undefined') pg = 1; - const link = await request(HOST + '/list/mip-data?typeId=' + tid + '&page=' + pg + '&callback='); - const html = link.match(/\((.*?)\);/)[1]; - const data = JSON.parse(html).data; - let videos = _.map(data.items, (it) => { - return { - vod_id: it.video_id, - vod_name: it.name, - vod_pic: it.image, - vod_remarks: it.root_category_name + ' | ' + it.duration_string || '', - } - }); - const pgCount = pg * 30 > data.totalCount ? parseInt(pg) : parseInt(pg) + 1; - return JSON.stringify({ - page: parseInt(pg), - pagecount: pgCount, - limit: 30, - total: data.totalCount, - list: videos, - }) -} - -async function detail(id) { - const vod = { - vod_id: id, - vod_remarks: '', - }; - const playlist = ['点击播放' + '$' + HOST + '/play/' + id]; - vod.vod_play_from = "道长在线"; - vod.vod_play_url = playlist.join('#'); - return JSON.stringify({ - list: [vod], - }); -} - -async function play(flag, id, flags) { - const html = await request(id); - const $ = load(html); - const pvideo = $("body mip-search-video[video-src*=http]"); - const purl = pvideo[0].attribs['video-src']; - // console.debug('兔小贝 purl =====>' + purl); // js_debug.log - return JSON.stringify({ - parse: 0, - url: purl, - }); -} - -async function search(wd, quick) { - const link = HOST + "/search/" + wd; - const html = await request(link); - const $ = load(html); - const list = $("div.list-con > div.items"); - let videos = _.map(list, (it) => { - const a = $(it).find("a:first")[0]; - const img = $(it).find("mip-img:first")[0]; - const tt = $(it).find("p:first")[0]; - const remarks = $(it).find("p")[1]; - return { - vod_id: a.attribs.href.replace(/.*?\/play\/(.*)/g, '$1'), - vod_name: tt.children[0].data, - vod_pic: img.attribs["src"], - vod_remarks: remarks.children[0].data || "", - }; - }); - return JSON.stringify({ - list: videos, - land: 1, - ratio: 1.78, - }); -} - -export function __jsEvalReturn() { - return { - init: init, - home: home, - homeVod: homeVod, - category: category, - detail: detail, - play: play, - search: search, - } -} \ No newline at end of file diff --git a/lib/ubestkid_open.js b/lib/ubestkid_open.js deleted file mode 100644 index 05a45ac7..00000000 --- a/lib/ubestkid_open.js +++ /dev/null @@ -1,118 +0,0 @@ -// 无搜索功能 -import { _ } from './lib/cat.js'; -let key = '🐯贝乐虎'; -let HOST = 'https://vd.ubestkid.com'; -let siteKey = ''; -let siteType = 0; -const MOBILE_UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'; - -async function request(reqUrl, referer, mth, data, hd) { - const headers = { - "User-Agent": MOBILE_UA, - }; - if (referer) headers.referer = encodeURIComponent(referer); - let res = await req(reqUrl, { - method: mth || "get", - headers: headers, - data: data, - postType: mth === "post" ? "json" : "", - }); - return res.content; -} - -async function init(cfg) { - siteKey = cfg.skey; - siteType = cfg.stype -} - -async function home(filter) { - const classes = [{ type_id: 65, type_name: '🐯最新上架' }, { type_id: 113, type_name: '🐯人气热播' }, { type_id: 56, type_name: '🐯经典童谣' }, { type_id: 137, type_name: '🐯开心贝乐虎' }, { type_id: 53, type_name: '🐯律动儿歌' }, { type_id: 59, type_name: '🐯经典儿歌' }, { type_id: 101, type_name: '🐯超级汽车1' }, { type_id: 119, type_name: '🐯超级汽车第二季' }, { type_id: 136, type_name: '🐯超级汽车第三季' }, { type_id: 95, type_name: '🐯三字经' }, { type_id: 133, type_name: '🐯幼儿手势舞' }, { type_id: 117, type_name: '🐯哄睡儿歌' }, { type_id: 70, type_name: '🐯英文儿歌' }, { type_id: 116, type_name: '🐯节日与节气' }, { type_id: 97, type_name: '🐯恐龙世界' }, { type_id: 55, type_name: '🐯动画片儿歌' }, { type_id: 57, type_name: '🐯流行歌曲' }, { type_id: 118, type_name: '🐯贝乐虎入园记' }, { type_id: 106, type_name: '🐯贝乐虎大百科' }, { type_id: 62, type_name: '🐯经典古诗' }, { type_id: 63, type_name: '🐯经典故事' }, { type_id: 128, type_name: '🐯萌虎学功夫' }, { type_id: 100, type_name: '🐯绘本故事' }, { type_id: 121, type_name: '🐯开心贝乐虎英文版' }, { type_id: 96, type_name: '🐯嗨贝乐虎情商动画' }, { type_id: 108, type_name: '🐯动物音乐派对' }, { type_id: 126, type_name: '🐯动物音乐派对英文版' }, { type_id: 105, type_name: '🐯奇妙的身体' }, { type_id: 124, type_name: '🐯奇妙的身体英文版' }, { type_id: 64, type_name: '🐯认知卡片' }, { type_id: 109, type_name: '🐯趣味简笔画' }, { type_id: 78, type_name: '🐯数字儿歌' }, { type_id: 120, type_name: '🐯识字体验版' }, { type_id: 127, type_name: '🐯启蒙系列体验版' }]; - const filterObj = {}; - return JSON.stringify({ - class: _.map(classes, (cls) => { - cls.land = 1; - cls.ratio = 1.78; - return cls; - }), - filters: filterObj, - }) -} - -async function homeVod() { - const link = HOST + "/api/v1/bv/video"; - const pdata = { age: 1, appver: "6.1.9", egvip_status: 0, svip_status: 0, vps: 60, subcateId: 56, "p": 1 }; - const jo = JSON.parse(await request(link, "", "post", pdata)).result; - const videos = []; - _.each(jo.items, (it) => { - videos.push({ - vod_id: it.url, - vod_name: it.title, - vod_pic: it.image, - vod_remarks: '👀' + it.viewcount || '', - }) - }); - return JSON.stringify({ - list: videos, - }) -} - -async function category(tid, pg, filter, extend) { - if (pg <= 0 || typeof pg == 'undefined') pg = 1; - const link = HOST + "/api/v1/bv/video"; - const pdata = { age: 1, appver: "6.1.9", egvip_status: 0, svip_status: 0, vps: 60, subcateId: tid, "p": pg }; - const jo = JSON.parse(await request(link, "", "post", pdata)).result; - const videos = []; - _.each(jo.items, (it) => { - videos.push({ - vod_id: it.url, - vod_name: it.title, - vod_pic: it.image, - vod_remarks: '👀' + it.viewcount || '', - }) - }); - const pgCount = pg * 60 > jo.total ? parseInt(pg) : parseInt(pg) + 1; - return JSON.stringify({ - page: parseInt(pg), - pagecount: pgCount, - limit: 60, - total: jo.total, - list: videos, - }) -} - -async function detail(id) { - const vod = { - vod_id: id, - vod_remarks: '', - }; - const playlist = ['点击播放' + '$' + id]; - vod.vod_play_from = "道长在线"; - vod.vod_play_url = playlist.join('#'); - return JSON.stringify({ - list: [vod], - }); -} - -async function play(flag, id, flags) { - // console.debug('贝乐虎 id =====>' + id); // js_debug.log - return JSON.stringify({ - parse: 0, - url: id, - }); -} - -async function search(wd, quick) { - return '{}' -} - -export function __jsEvalReturn() { - return { - init: init, - home: home, - homeVod: homeVod, - category: category, - detail: detail, - play: play, - search: search, - } -} \ No newline at end of file diff --git a/lib/utils.js b/lib/utils.js deleted file mode 100644 index 2411a227..00000000 --- a/lib/utils.js +++ /dev/null @@ -1 +0,0 @@ -function isSub(ext){return"srt"==ext||"ass"==ext||"ssa"==ext}function getSize(size){return size<=0?"":1099511627776 ul > li').find('a:first')[0].attribs.href; - console.debug('在线之家 跳转地址 =====>' + host); // js_debug.log -} - -async function home(filter) { - const html = await request(host); - const $ = load(html); - const class_parse = $('ul.stui-header__menu > li > a[href*=list]'); - let classes = _.map(class_parse, (cls) => { - let typeId = cls.attribs['href']; - typeId = typeId.substring(typeId.lastIndexOf('/') + 1).replace('.html', ''); - return { - type_id: typeId, - type_name: cls.children[0].data, - }; - }); - const filterObj = { - 1: [{ key: 'class', name: '剧情', value: [{ n: '全部', v: '' }, { n: '喜剧', v: '喜剧' }, { n: '爱情', v: '爱情' }, { n: '恐怖', v: '恐怖' }, { n: '动作', v: '动作' }, { n: '科幻', v: '科幻' }, { n: '剧情', v: '剧情' }, { n: '战争', v: '战争' }, { n: '警匪', v: '警匪' }, { n: '犯罪', v: '犯罪' }, { n: '动画', v: '动画' }, { n: '奇幻', v: '奇幻' }, { n: '冒险', v: '冒险' }] }, { key: 'area', name: '地区', value: [{ n: '全部', v: '' }, { n: '大陆', v: '大陆' }, { n: '香港', v: '香港' }, { n: '台湾', v: '台湾' }, { n: '欧美', v: '欧美' }, { n: '韩国', v: '韩国' }, { n: '日本', v: '日本' }, { n: '泰国', v: '泰国' }, { n: '印度', v: '印度' }, { n: '俄罗斯', v: '俄罗斯' }, { n: '其他', v: '其他' }] }], - 2: [{ key: 'class', name: '剧情', value: [{ n: '全部', v: '' }, { n: '剧情', v: '剧情' }, { n: '喜剧', v: '喜剧' }, { n: '爱情', v: '爱情' }, { n: '动作', v: '动作' }, { n: '悬疑', v: '悬疑' }, { n: '恐怖', v: '恐怖' }, { n: '奇幻', v: '奇幻' }, { n: '惊悚', v: '惊悚' }, { n: '犯罪', v: '犯罪' }, { n: '科幻', v: '科幻' }, { n: '音乐', v: '音乐' }, { n: '其他', v: '其他' }] }], - 3: [{ key: 'class', name: '剧情', value: [{ n: '全部', v: '' }, { n: '剧情', v: '剧情' }, { n: '喜剧', v: '喜剧' }, { n: '爱情', v: '爱情' }, { n: '动作', v: '动作' }, { n: '悬疑', v: '悬疑' }, { n: '恐怖', v: '恐怖' }, { n: '奇幻', v: '奇幻' }, { n: '惊悚', v: '惊悚' }, { n: '犯罪', v: '犯罪' }, { n: '科幻', v: '科幻' }, { n: '音乐', v: '音乐' }, { n: '其他', v: '其他' }] }], - 4: [{ key: 'class', name: '剧情', value: [{ n: '全部', v: '' }, { n: '剧情', v: '剧情' }, { n: '喜剧', v: '喜剧' }, { n: '爱情', v: '爱情' }, { n: '动作', v: '动作' }, { n: '悬疑', v: '悬疑' }, { n: '恐怖', v: '恐怖' }, { n: '奇幻', v: '奇幻' }, { n: '惊悚', v: '惊悚' }, { n: '犯罪', v: '犯罪' }, { n: '科幻', v: '科幻' }, { n: '音乐', v: '音乐' }, { n: '其他', v: '其他' }] }], - 6: [{ key: 'class', name: '剧情', value: [{ n: '全部', v: '' }, { n: '情感', v: '情感' }, { n: '科幻', v: '科幻' }, { n: '热血', v: '热血' }, { n: '推理', v: '推理' }, { n: '搞笑', v: '搞笑' }, { n: '冒险', v: '冒险' }, { n: '萝莉', v: '萝莉' }, { n: '校园', v: '校园' }, { n: '动作', v: '动作' }, { n: '机战', v: '机战' }, { n: '运动', v: '运动' }, { n: '战争', v: '战争' }, { n: '少年', v: '少年' }] }, { key: 'area', name: '地区', value: [{ n: '全部', v: '' }, { n: '国产', v: '国产' }, { n: '日本', v: '日本' }, { n: '欧美', v: '欧美' }, { n: '其他', v: '其他' }] }] - }; - let filYer = { key: 'year', name: '年份', value: [{ n: '全部', v: '' }, { n: '2023', v: '2023' }, { n: '2022', v: '2022' }, { n: '2021', v: '2021' }, { n: '2020', v: '2020' }, { n: '2019', v: '2019' }, { n: '2018', v: '2018' }, { n: '2017', v: '2017' }, { n: '2016', v: '2016' }, { n: '2015', v: '2015' }, { n: '2014', v: '2014' }, { n: '2013', v: '2013' }, { n: '2012', v: '2012' }, { n: '2011', v: '2011' }] }; - filYer['init'] = filYer.value[0].v; - let filBy = { key: 'by', name: '排序', value: [{ n: '时间', v: 'time' }, { n: '人气', v: 'hits' }, { n: '评分', v: 'score' }] }; - filBy['init'] = filBy.value[0].v; - return JSON.stringify({ - class: _.map(classes, (cls) => { - if (filterObj[cls.type_id]) { - filterObj[cls.type_id].push(filYer, filBy); - filterObj[cls.type_id][0]['init'] = filterObj[cls.type_id][0].value[0].v; - } else { - filterObj[cls.type_id] = []; - filterObj[cls.type_id].push(filYer, filBy) - } - return cls; - }), - filters: filterObj, - }); -} - -async function homeVod() { - const link = host + '/vodshow/1--hits---------2023.html'; - const html = await request(link); - const $ = load(html); - const js2Base = await js2Proxy(true, siteType, siteKey, 'img/', {}); - const items = $('ul.stui-vodlist > li'); - let videos = _.map(items, (item) => { - const a = $(item).find('a:first')[0]; - const remarks = $($(item).find('span.pic-text')[0]).text().trim(); - return { - vod_id: a.attribs.href.replace(/.*?\/detail\/(.*).html/g, '$1'), - vod_name: a.attribs.title, - vod_pic: js2Base + base64Encode(a.attribs['data-original']), - vod_remarks: remarks || '', - }; - }); - return JSON.stringify({ - list: videos, - }); -} - -async function category(tid, pg, filter, extend) { - if (pg <= 0 || typeof (pg) == 'undefined') pg = 1; - const link = host + '/vodshow/' + tid + '-' + (extend.area || '') + '-' + (extend.by || 'time') + '-' + (extend.class || '') + '-' + (extend.lang || '') + '-' + (extend.letter || '') + '---' + pg + '---' + (extend.year || '') + '.html'; - const html = await request(link); - const $ = load(html); - const js2Base = await js2Proxy(true, siteType, siteKey, 'img/', {}); - const items = $('ul.stui-vodlist > li'); - let videos = _.map(items, (item) => { - const a = $(item).find('a:first')[0]; - const remarks = $($(item).find('span.pic-text')[0]).text().trim(); - return { - vod_id: a.attribs.href.replace(/.*?\/detail\/(.*).html/g, '$1'), - vod_name: a.attribs.title, - vod_pic: js2Base + base64Encode(a.attribs['data-original']), - vod_remarks: remarks || '', - }; - }); - const hasMore = $('ul.stui-page__item > li > a:contains(下一页)').length > 0; - const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg); - return JSON.stringify({ - page: parseInt(pg), - pagecount: pgCount, - limit: 24, - total: 24 * pgCount, - list: videos, - }); -} - -async function detail(id) { - const html = await request(host + '/detail/' + id + '.html'); - const $ = load(html); - const js2Base = await js2Proxy(true, siteType, siteKey, 'img/', {}); - const vod = { - vod_id: id, - vod_name: $('h1:first').text().trim(), - vod_type: $('.stui-content__detail p:first a').text(), - vod_actor: $('.stui-content__detail p:nth-child(3)').text().replace('主演:', ''), - vod_director: $('.stui-content__detail p:nth-child(4)').text().replace('导演:', ''), - vod_pic: js2Base + base64Encode($('.stui-content__thumb img:first').attr('data-original')), - vod_remarks: $('.stui-content__detail p:nth-child(5)').text() || '', - vod_content: $('span.detail-content').text().trim(), - }; - let playMap = {}; - const tabs = $('div.stui-vodlist__head > h3'); - const playlists = $('ul.stui-content__playlist'); - _.each(tabs, (tab, i) => { - const from = tab.children[0].data; - let list = playlists[i]; - list = $(list).find('a'); - _.each(list, (it) => { - const title = it.children[0].data; - const playUrl = it.attribs.href; - if (title.length == 0) title = it.children[0].data.trim(); - if (!playMap.hasOwnProperty(from)) { - playMap[from] = []; - } - playMap[from].push(title + '$' + playUrl); - }); - }); - vod.vod_play_from = _.keys(playMap).join('$$$'); - const urls = _.values(playMap); - let vod_play_url = _.map(urls, (urlist) => { - return urlist.join('#'); - }); - vod.vod_play_url = vod_play_url.join('$$$'); - return JSON.stringify({ - list: [vod], - }); -} - -async function play(flag, id, flags) { - const html = await request(host + id); - const mhtml = html.match(/r player_.*?=(.*?))[1]; - const json = JSON.parse(mhtml); - const url = json.url; - const from = json.from; - if (json.encrypt == '1') { - url = unescape(url) - } else if (json.encrypt == '2') { - url = unescape(base64Decode(url)) - } - if (url.indexOf('m3u8') >= 0 || url.indexOf('mp4') >= 0) { - // console.debug('在线之家url =====>' + url); // js_debug.log - return JSON.stringify({ - parse: 0, - url: url, - }); - } else if (from.indexOf('line3') >= 0 || from.indexOf('line5') >= 0) { - const ifrwy = await request(url); - const code = ifrwy.match(/var url = '(.*?)'/)[1].split('').reverse().join(''); - let temp = ''; - for (let i = 0x0; i < code.length; i = i + 0x2) { - temp += String.fromCharCode(parseInt(code[i] + code[i + 0x1], 0x10)) - } - const purl = temp.substring(0x0, (temp.length - 0x7) / 0x2) + temp.substring((temp.length - 0x7) / 0x2 + 0x7); - // console.debug('在线之家purl =====>' + purl); // js_debug.log - return JSON.stringify({ - parse: 0, - url: purl, - }); - } else { - // console.debug('在线之家url =====>' + '空'); // js_debug.log - return '{}'; - } -} - -async function search(wd, quick) { - var data = JSON.parse(await request(host + '/index.php/ajax/suggest?mid=1&wd=' + wd + '&limit=50')).list; - const js2Base = await js2Proxy(true, siteType, siteKey, 'img/', {}); - let videos = _.map(data, (it) => { - return { - vod_id: it.id, - vod_name: it.name, - vod_pic: js2Base + base64Encode(it.pic), - vod_remarks: '', - } - }); - return JSON.stringify({ - list: videos, - limit: 50, - }); -} - -function base64Encode(text) { - return Crypto.enc.Base64.stringify(Crypto.enc.Utf8.parse(text)); -} - -function base64Decode(text) { - return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text)); -} - -async function proxy(segments, headers) { - let what = segments[0]; - let url = base64Decode(segments[1]); - if (what == 'img') { - var resp = await req(url, { - buffer: 2, - headers: { - Referer: 'https://api.douban.com/', - 'User-Agent': MOBILE_UA, - }, - }); - return JSON.stringify({ - code: resp.code, - buffer: 2, - content: resp.content, - headers: resp.headers, - }); - } - return JSON.stringify({ - code: 500, - content: '', - }); -} - -export function __jsEvalReturn() { - return { - init: init, - home: home, - homeVod: homeVod, - category: category, - detail: detail, - play: play, - proxy: proxy, - search: search, - }; -} \ No newline at end of file