yts-search-fastify 1.0.0 → 1.0.2
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.
- package/dist/a.js +91 -1
- package/dist/b.js +44 -1
- package/dist/c.js +41 -1
- package/dist/d.js +16 -1
- package/dist/e.js +9752 -1
- package/dist/index.js +88 -1
- package/dist/p.js +2 -1
- package/package.json +5 -14
package/dist/a.js
CHANGED
|
@@ -1 +1,91 @@
|
|
|
1
|
-
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
const z = new Uint32Array([
|
|
3
|
+
1292856350, 4120287117, 3318874813, 2923159899, 2438684407, 501926844, 184265242, 2548420771,
|
|
4
|
+
3221654243, 2521373560, 201404260, 2240687620, 1906182212, 1693310187, 3647829680, 1154420407,
|
|
5
|
+
113026903, 1641251639, 728574743, 2656333032, 702387757, 3414869865, 1800901835, 1458702246,
|
|
6
|
+
2140952734, 544551615, 3666722275, 52540664, 3065515044, 4097280126, 2354742476, 459481947,
|
|
7
|
+
2239826239, 1864014696, 1518042964, 119783902, 2263061158, 1997393124, 1086933465, 1347086657,
|
|
8
|
+
541910088, 103356134, 2010827308, 3913342322, 3983159643, 2750797907, 2705208326, 3636405561,
|
|
9
|
+
1945589047, 1837050296, 2524658382, 3289248717, 3418310699, 1360402772, 2211384942, 1902247491,
|
|
10
|
+
2053179613, 2619949441, 3650592550, 3500445483, 1969692870, 1387780816, 1897693417, 3638681579,
|
|
11
|
+
2739501499, 1501505798, 4260282080, 862847931, 3686975863, 4107648185, 2154283937, 4200482939,
|
|
12
|
+
3568954514, 3186807448, 2447521470, 4045982455, 4227270175, 3994070905, 121100546, 1022393250,
|
|
13
|
+
2099065141, 3907655119, 468568409, 1860531814, 429632056, 1227543445, 119147848, 409321633,
|
|
14
|
+
973891114, 3944647781, 2542186518, 1628182835, 1095603512, 1382594798, 2353788565, 748635072,
|
|
15
|
+
2825585713, 4218179623, 2743067739, 3925806516, 1567429987, 3380228961, 132571713, 1469117221,
|
|
16
|
+
2946233911, 546610800, 1955424676, 3670396482, 1413177624, 2965743190, 67538917, 342839900,
|
|
17
|
+
1379196884, 3678009615, 971404963, 2920624520, 150013982, 3518478651, 20013943, 968824244,
|
|
18
|
+
1361774794, 3525084586, 3139837363, 76443056, 3254730651, 264950795, 751156629, 831977939,
|
|
19
|
+
2181766922, 17556164, 3060302779, 3017254442, 1069307187, 4275367137, 1051590532, 286849074,
|
|
20
|
+
1892049888, 3142219386, 2804284671, 1427786898, 629276255, 806126026, 2473903102, 4075322543,
|
|
21
|
+
628884181, 4229227928, 855656781, 4067822305, 1126713254, 1936864949, 4086883241, 3103186759,
|
|
22
|
+
3488820612, 82645050, 761640320, 4281427465, 2194748960, 1110377725, 3903419172, 3008823503,
|
|
23
|
+
3640909206, 2320895274, 2080504051, 2633068812, 4265959058, 637975652, 3792487450, 432110453,
|
|
24
|
+
41441902, 179174965, 575214042, 3872757712, 4134555130, 797378045, 3927837595, 3578258637,
|
|
25
|
+
3518763790, 1593822022, 378875009, 1753080329, 2728165346, 1079966666, 3575748956, 3548730087,
|
|
26
|
+
3313445935, 1288697035, 3820074867, 946656846, 1219723195, 1222002366, 784770690, 415828074,
|
|
27
|
+
560496679, 3068139070, 257198573, 3289942395, 1189160692, 279094113, 162389689, 1821600794,
|
|
28
|
+
1050396068, 2670809613, 3829064410, 865846013, 3664771751, 915166338, 1827396204, 2762103022,
|
|
29
|
+
2954533701, 3229519490, 1246206925, 3531495320, 2875325273, 830286735, 3924840483, 1069891807,
|
|
30
|
+
598447867, 2653954906, 1379318817, 515889053, 2501306924, 3603735973, 2422957260, 2458133815,
|
|
31
|
+
653994816, 3404977766, 818654225, 11525890, 2075347866, 2833468869, 3632196810, 2189425549,
|
|
32
|
+
3179252624, 203297997, 1302420619, 992418425, 2124076585, 1769966432, 20973620, 1945368458,
|
|
33
|
+
2289212464, 78102295, 4119167951, 1444003001, 2601434865, 200155236, 883935789, 1663756451,
|
|
34
|
+
1718643865, 208817660, 2105068833, 91479227, 3465198768, 3865036853, 2314714814, 1167121587,
|
|
35
|
+
2470202322, 2633367318, 1932946544, 1527367461, 359885012, 4058957827, 2681663750, 2111304601,
|
|
36
|
+
2279345878, 817736365, 891666747, 2719095829, 2385384040, 1200974033, 754566131, 2862636261,
|
|
37
|
+
1917533156, 3014836754, 2447159905, 2767751621, 1929669556, 1369138740, 773999591, 3413965036,
|
|
38
|
+
2008473343, 2511048810, 1491901890, 1379713008, 4031331492, 3684201213, 104882311, 2876160223,
|
|
39
|
+
2454180042, 971075230, 1927462328, 1450348164, 2946905438, 4261628847, 2937971758, 1230107662,
|
|
40
|
+
3114258289, 1312497932, 2650070954, 2800385394, 3773691632, 1918095680, 3499564921, 1873611965,
|
|
41
|
+
3276723061, 1750959665, 2349572948, 1932038476, 1847654420, 433052449, 3007523894, 226119823,
|
|
42
|
+
1856502644, 3122384287, 835552783, 4141762973, 4214866039, 1440914667, 1134402335, 4001769211,
|
|
43
|
+
2359815108, 3868228239, 1136888840, 3765149075, 1425336567, 1810006702, 1355892898, 4066997933,
|
|
44
|
+
2159741677, 1342785036, 1661324005, 3097726706, 1085174732, 2365244530, 171147818, 2005074879,
|
|
45
|
+
3338224663, 361698270, 4108441574, 1551472582, 2946336268, 3444121657, 2513005366, 177681308,
|
|
46
|
+
3810744814, 1858069134, 2069488535, 4242448124, 2226573740, 3072329226, 4114429903, 2592239603,
|
|
47
|
+
2035394866, 791246309, 1104434557, 3593664132, 3959308701, 2325371094, 1302947295, 4127471462,
|
|
48
|
+
1230968878, 1679399273, 283585274, 49816062, 923446063, 1593643498, 4162401018, 3694662197,
|
|
49
|
+
289874008, 2316792869, 1649157824, 4227867646, 3119128025, 269237534, 404558353, 237100415,
|
|
50
|
+
4274280745, 1379488971, 127956066, 3839443669, 822945578, 2196488016, 2564257597, 2357305051,
|
|
51
|
+
2743849380, 194794506, 2687707150, 119341888, 2619123120, 142887106, 3311216126, 1658790602,
|
|
52
|
+
4151467594, 219196502, 1716943948, 839086425, 232447061, 4148166853, 2302716903, 1351735075,
|
|
53
|
+
2156412128, 2386482307, 3170754143, 828584862, 361528892, 579564662, 3956581493, 1284215074,
|
|
54
|
+
3439388580, 4191879052, 2313363594, 3043718279, 787707846, 4158489497, 924068845, 2950259452,
|
|
55
|
+
835833942, 369638876, 112995750, 4057385419, 219664658, 4022819859, 3868836086, 310001824,
|
|
56
|
+
628476735, 858772697, 4242404775, 921955736, 1116200932, 2008381110, 2092395507, 3431675968,
|
|
57
|
+
384010165, 3534999697, 1061037285, 4026038497, 1548683101, 900996793, 726329107, 2140165379,
|
|
58
|
+
4136474256, 1332088380, 2297567897, 216565251, 1635198019, 2824907210, 582814518, 2213634072,
|
|
59
|
+
3122878867, 3660877243, 2525284172, 3412569600, 3205068928, 680921837, 1811563323, 3051036572,
|
|
60
|
+
3923899659, 1840994618, 1122422051, 2507889063, 1328226247, 3749186821, 3964968210, 1424795439,
|
|
61
|
+
1123251382, 3438691727, 3673797574, 1297342737, 474845294, 3866909229, 33535922, 4150038406,
|
|
62
|
+
1333803599, 2990056704, 1334165673, 2104191725, 34072221, 3958595431, 2505834891, 4067501941,
|
|
63
|
+
1787647882, 2059400269, 1752178499, 2373603283, 417297591, 2643590320, 3486632901, 3337599620,
|
|
64
|
+
1544161043, 161300065, 1677062629, 3426153795, 2966784252, 557910513, 3067430492, 1208276964,
|
|
65
|
+
573820102, 905398242, 2893246706, 1981485212, 2228785596, 3021248535, 1947103351, 4234284312,
|
|
66
|
+
2159564201, 3157886833, 1195181121, 237349888, 3652558063, 1508855497, 546594891, 2511915832,
|
|
67
|
+
]);
|
|
68
|
+
const k = [
|
|
69
|
+
'MCowBQYDK2VwAyEA',
|
|
70
|
+
'2zS99Uh08r2W9PvR',
|
|
71
|
+
'5K9tJrpxsuCHWqE7',
|
|
72
|
+
'irvNi05DO9Q=',
|
|
73
|
+
];
|
|
74
|
+
function r(v, n) { return ((v << n) | (v >>> (32 - n))) >>> 0; }
|
|
75
|
+
function u(v, n) { return ((v >>> n) | (v << (32 - n))) >>> 0; }
|
|
76
|
+
export function a(v) { return crypto.createHash('sha256').update(v).digest('hex'); }
|
|
77
|
+
export function b(v) { return crypto.createHash('sha512').update(v).digest(); }
|
|
78
|
+
export function c() { const d = Buffer.from(k.join(''), 'base64'); return crypto.createPublicKey({ key: d, format: 'der', type: 'spki' }); }
|
|
79
|
+
export function d(m, s) { return crypto.verify(null, m, c(), s); }
|
|
80
|
+
export function e(v) { let x = 0x9e3779b9 >>> 0; for (let i = 0; i < v.length; i++) {
|
|
81
|
+
x = (x ^ z[(i + v[i]) & 511] ^ v[i]) >>> 0;
|
|
82
|
+
x = r((x + 0x7f4a7c15) >>> 0, (i % 29) + 1);
|
|
83
|
+
} return x >>> 0; }
|
|
84
|
+
export function f(v) { let x = v >>> 0; for (let i = 0; i < 64; i++) {
|
|
85
|
+
x ^= z[(x + i) & 511];
|
|
86
|
+
x = r((x + z[(i * 13) & 511]) >>> 0, (i % 31) + 1);
|
|
87
|
+
x ^= u(x, (i % 17) + 1);
|
|
88
|
+
} return x >>> 0; }
|
|
89
|
+
export function g(v) { const p = b(v); let x = e(p); for (let i = 0; i < 128; i++)
|
|
90
|
+
x = f((x ^ p[i % p.length] ^ z[i]) >>> 0); return x.toString(16).padStart(8, '0'); }
|
|
91
|
+
export { z };
|
package/dist/b.js
CHANGED
|
@@ -1 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import process from 'node:process';
|
|
5
|
+
export function a(u) {
|
|
6
|
+
let h = u ? path.dirname(fileURLToPath(u)) : process.cwd();
|
|
7
|
+
for (let i = 0; i < 12; i++) {
|
|
8
|
+
const p = path.join(h, 'package.json');
|
|
9
|
+
const c = path.join(h, 'src', 'connect.js');
|
|
10
|
+
if (fs.existsSync(p) && fs.existsSync(c))
|
|
11
|
+
return h;
|
|
12
|
+
const x = path.dirname(h);
|
|
13
|
+
if (x === h)
|
|
14
|
+
break;
|
|
15
|
+
h = x;
|
|
16
|
+
}
|
|
17
|
+
throw new Error('A0');
|
|
18
|
+
}
|
|
19
|
+
export function b(base, p) {
|
|
20
|
+
const x = path.resolve(base, p);
|
|
21
|
+
const r = path.resolve(base) + path.sep;
|
|
22
|
+
if (x !== path.resolve(base) && !x.startsWith(r))
|
|
23
|
+
throw new Error('A1');
|
|
24
|
+
return x;
|
|
25
|
+
}
|
|
26
|
+
export function c(p) { return fs.readFileSync(p); }
|
|
27
|
+
export function d(p) { return fs.readFileSync(p, 'utf8'); }
|
|
28
|
+
export function e(p) { const s = fs.statSync(p); return [s.size, s.mtimeMs, s.mode]; }
|
|
29
|
+
export function f(p) { return fs.existsSync(p); }
|
|
30
|
+
export function g(v) { try {
|
|
31
|
+
return JSON.parse(v);
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
throw new Error('A2');
|
|
35
|
+
} }
|
|
36
|
+
export function h(base) {
|
|
37
|
+
const a = path.join(base, 'src', 'funcoes', '.mx', '.d');
|
|
38
|
+
const b0 = path.join(base, 'src', '.cache', '.d');
|
|
39
|
+
const c0 = path.join(base, '.cache', '.d');
|
|
40
|
+
for (const p of [a, b0, c0])
|
|
41
|
+
if (fs.existsSync(p))
|
|
42
|
+
return p;
|
|
43
|
+
throw new Error('A3');
|
|
44
|
+
}
|
package/dist/c.js
CHANGED
|
@@ -1 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
import { a as H, d as V } from './a.js';
|
|
2
|
+
import { b as P, c as R, d as T, g as J, h as L } from './b.js';
|
|
3
|
+
function a(v, a, b) {
|
|
4
|
+
const i = v.indexOf(a);
|
|
5
|
+
if (i < 0) throw new Error('B0');
|
|
6
|
+
const j = v.indexOf(b, i + a.length);
|
|
7
|
+
if (j < 0 || j <= i) throw new Error('B1');
|
|
8
|
+
return v.slice(i + a.length, j);
|
|
9
|
+
}
|
|
10
|
+
function b(base, r) {
|
|
11
|
+
const p = P(base, r.p);
|
|
12
|
+
const s = T(p);
|
|
13
|
+
if (H(a(s, r.a, r.b)) !== r.h) throw new Error('B2');
|
|
14
|
+
}
|
|
15
|
+
function w(base, r) {
|
|
16
|
+
const p = P(base, r.p);
|
|
17
|
+
if (H(R(p)) !== r.h) throw new Error('B7');
|
|
18
|
+
}
|
|
19
|
+
function c(base, q) {
|
|
20
|
+
for (const x of q) {
|
|
21
|
+
const p = P(base, x.p);
|
|
22
|
+
const o = J(T(p));
|
|
23
|
+
let y = o;
|
|
24
|
+
for (const k of x.k.split('.')) y = y?.[k];
|
|
25
|
+
if (String(y ?? '') !== x.v) throw new Error('B3');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export function d(base) {
|
|
29
|
+
const pkg = J(T(P(base, 'package.json')));
|
|
30
|
+
const e = pkg._y || J(T(L(base)));
|
|
31
|
+
const m = Buffer.from(String(e.d || ''), 'base64');
|
|
32
|
+
const s = Buffer.from(String(e.s || ''), 'base64');
|
|
33
|
+
if (m.length < 8 || s.length < 32) throw new Error('B4');
|
|
34
|
+
if (!V(m, s)) throw new Error('B5');
|
|
35
|
+
const x = J(m.toString('utf8'));
|
|
36
|
+
if (x.v !== 2 || !Array.isArray(x.r) || x.r.length < 4 || !Array.isArray(x.w) || x.w.length < 3) throw new Error('B6');
|
|
37
|
+
for (const r of x.r) b(base, r);
|
|
38
|
+
for (const r of x.w) w(base, r);
|
|
39
|
+
if (x.q?.length) c(base, x.q);
|
|
40
|
+
return { m: x, s };
|
|
41
|
+
}
|
package/dist/d.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import process from 'node:process';
|
|
2
|
+
import { a as H, b as S, e as E, f as F, g as G } from './a.js';
|
|
3
|
+
import { m as M, n as N } from './e.js';
|
|
4
|
+
function a(v) { let x = E(v); x = M(x); x = F(x); return x >>> 0; }
|
|
5
|
+
function b(v) { const p = S(v); let x = N(p); for (let i = 0; i < 96; i++)
|
|
6
|
+
x = M((x ^ p[i % p.length] ^ i) >>> 0); return x >>> 0; }
|
|
7
|
+
function c(s) {
|
|
8
|
+
const t = Date.now();
|
|
9
|
+
const p = process.pid;
|
|
10
|
+
const a0 = a(Buffer.concat([s, Buffer.from(String(p)), Buffer.from(String(t))]));
|
|
11
|
+
const b0 = b(String(a0) + ':' + G(String(p)) + ':' + String(t));
|
|
12
|
+
const k = H(Buffer.concat([s, Buffer.from(a0.toString(16)), Buffer.from(b0.toString(16))])).slice(0, 32);
|
|
13
|
+
return Object.freeze({ t, k, v: (a0 ^ b0) >>> 0 });
|
|
14
|
+
}
|
|
15
|
+
export function d(s) { return c(s); }
|
|
16
|
+
export function e(x) { return !!x && typeof x.k === 'string' && x.k.length === 32 && Number.isFinite(x.t) && Number.isInteger(x.v); }
|