@iflyrpa/actions 1.2.16 → 1.2.18

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/index.js CHANGED
@@ -1,4 +1,670 @@
1
1
  var __webpack_modules__ = {
2
+ "./src/utils/XhsXsCommonEnc.js": function(module) {
3
+ var encrypt_lookup = [
4
+ "Z",
5
+ "m",
6
+ "s",
7
+ "e",
8
+ "r",
9
+ "b",
10
+ "B",
11
+ "o",
12
+ "H",
13
+ "Q",
14
+ "t",
15
+ "N",
16
+ "P",
17
+ "+",
18
+ "w",
19
+ "O",
20
+ "c",
21
+ "z",
22
+ "a",
23
+ "/",
24
+ "L",
25
+ "p",
26
+ "n",
27
+ "g",
28
+ "G",
29
+ "8",
30
+ "y",
31
+ "J",
32
+ "q",
33
+ "4",
34
+ "2",
35
+ "K",
36
+ "W",
37
+ "Y",
38
+ "j",
39
+ "0",
40
+ "D",
41
+ "S",
42
+ "f",
43
+ "d",
44
+ "i",
45
+ "k",
46
+ "x",
47
+ "3",
48
+ "V",
49
+ "T",
50
+ "1",
51
+ "6",
52
+ "I",
53
+ "l",
54
+ "U",
55
+ "A",
56
+ "F",
57
+ "M",
58
+ "9",
59
+ "7",
60
+ "h",
61
+ "E",
62
+ "C",
63
+ "v",
64
+ "u",
65
+ "R",
66
+ "X",
67
+ "5"
68
+ ];
69
+ let esm_typeof = {};
70
+ esm_typeof.A = function(t) {
71
+ return typeof t;
72
+ };
73
+ function encrypt_b64Encode(t) {
74
+ var e = 664, r = 634, n = 448, o = 599, i = 315, a = 416, u = 512, s = 361, c = 406, l = 487, f = 496, p = 333, h = 630, d = 639, v = 548, g = 582, m = 447, y = 468, w = 375, b = 331, _ = 149, E = 382, x = 265, k = 625, T = 570, S = 551, A = 582, L = 581, I = 638, R = 618, O = 606, C = 429, N = 651, P = 667, B = 817, M = 333, j = 567, F = 747, D = 561, q = 570, U = 676, G = 840, H = 240, V = {
75
+ udFrB: function(t, e) {
76
+ return t % e;
77
+ },
78
+ cCZFe: function(t, e) {
79
+ return t === e;
80
+ },
81
+ jevwl: function(t, e) {
82
+ return t - e;
83
+ },
84
+ aqlTy: function(t, e) {
85
+ return t + e;
86
+ },
87
+ rceYY: function(t, e) {
88
+ return t >> e;
89
+ },
90
+ OwjMq: function(t, e) {
91
+ return t & e;
92
+ },
93
+ kSGXO: function(t, e) {
94
+ return t << e;
95
+ },
96
+ veNiI: function(t, e) {
97
+ return t === e;
98
+ },
99
+ QLthP: function(t, e) {
100
+ return t + e;
101
+ },
102
+ wDtJz: function(t, e) {
103
+ return t + e;
104
+ },
105
+ nYqUQ: function(t, e) {
106
+ return t & e;
107
+ },
108
+ TCArD: function(t, e) {
109
+ return t << e;
110
+ },
111
+ RHteb: function(t, e) {
112
+ return t - e;
113
+ },
114
+ mZPJZ: function(t, e) {
115
+ return t < e;
116
+ },
117
+ zDETq: function(t, e, r, n) {
118
+ return t(e, r, n);
119
+ },
120
+ YlZGp: function(t, e) {
121
+ return t > e;
122
+ }
123
+ };
124
+ function W(t, e) {
125
+ return a0_0x10f4ac(e, t - -H);
126
+ }
127
+ for(var X = (W(-413, -442) + W(-e, -r) + "7")[W(-n, -o)]("|"), z = 0;;){
128
+ switch(X[z++]){
129
+ case "0":
130
+ var Y;
131
+ continue;
132
+ case "1":
133
+ var K = [];
134
+ continue;
135
+ case "2":
136
+ var J = V[W(-i, -a)]($, 3);
137
+ continue;
138
+ case "3":
139
+ var $ = t[W(-350, -u)];
140
+ continue;
141
+ case "4":
142
+ V[W(-s, -c)](J, 1) ? (Y = t[V[W(-l, -f)]($, 1)], K[W(-p, -346)](V[W(-h, -d)](encrypt_lookup[V[W(-503, -v)](Y, 2)] + encrypt_lookup[V[W(-g, -741)](V[W(-331, -m)](Y, 4), 63)], "=="))) : V[W(-y, -w)](J, 2) && (Y = V[W(-b, -_)](t[$ - 2], 8) + t[V[W(-l, -E)]($, 1)], K[W(-333, -x)](V[W(-k, -505)](V[W(-T, -S)](encrypt_lookup[Y >> 10], encrypt_lookup[V[W(-A, -L)](Y >> 4, 63)]) + encrypt_lookup[V[W(-I, -R)](V[W(-O, -C)](Y, 2), 63)], "=")));
143
+ continue;
144
+ case "5":
145
+ var Q = 16383;
146
+ continue;
147
+ case "6":
148
+ for(var Z = 0, tt = V[W(-509, -N)]($, J); V[W(-P, -B)](Z, tt); Z += Q)K[W(-M, -153)](V[W(-j, -F)](encrypt_encodeChunk, t, Z, V[W(-D, -413)](Z + Q, tt) ? tt : V[W(-q, -501)](Z, Q)));
149
+ continue;
150
+ case "7":
151
+ return K[W(-U, -G)]("");
152
+ }
153
+ break;
154
+ }
155
+ }
156
+ function encrypt_encodeUtf8(t) {
157
+ var e = 185, r = 410, n = 480, o = 222, i = 194, a = 165, u = 147, s = 290, c = 460, l = 472, f = 497, p = 462, h = 286, d = 209, v = 223, g = 590, m = {
158
+ bIGxm: function(t, e) {
159
+ return t(e);
160
+ },
161
+ MahgM: function(t, e) {
162
+ return t < e;
163
+ },
164
+ czxKn: function(t, e) {
165
+ return t === e;
166
+ },
167
+ clYIu: function(t, e) {
168
+ return t + e;
169
+ }
170
+ }, y = m[b(477, 488)](encodeURIComponent, t), w = [];
171
+ function b(t, e) {
172
+ return a0_0x10f4ac(t, e - g);
173
+ }
174
+ for(var _ = 0; m[b(333, e)](_, y[b(r, n)]); _++){
175
+ var E = y[b(o, 290)](_);
176
+ if (m[b(i, a)](E, "%")) {
177
+ var x = y[b(u, s)](m[b(574, 472)](_, 1)) + y[b(c, 290)](m[b(605, l)](_, 2)), k = parseInt(x, 16);
178
+ w[b(592, f)](k), _ += 2;
179
+ } else w[b(p, f)](E[b(217, h) + b(d, v)](0));
180
+ }
181
+ return w;
182
+ }
183
+ function sign_common(h) {
184
+ return encrypt_b64Encode(encrypt_encodeUtf8(JSON.stringify(h)));
185
+ }
186
+ function encrypt_tripletToBase64(t) {
187
+ var e = 11, r = 15, n = 199, o = 34, i = 4, a = 102, u = 276, s = 205, c = 218, l = 11, f = 115, p = 34, h = 161, d = 123, v = 335, g = {};
188
+ function m(t, e) {
189
+ return a0_0x10f4ac(e, t - v);
190
+ }
191
+ g[m(205, 328)] = function(t, e) {
192
+ return t + e;
193
+ }, g[m(e, 53)] = function(t, e) {
194
+ return t >> e;
195
+ }, g[m(r, n)] = function(t, e) {
196
+ return t & e;
197
+ }, g[m(o, i)] = function(t, e) {
198
+ return t >> e;
199
+ }, g[m(-a, -u)] = function(t, e) {
200
+ return t & e;
201
+ };
202
+ var y = g;
203
+ return y[m(s, c)](encrypt_lookup[63 & y[m(l, -75)](t, 18)], encrypt_lookup[y[m(r, f)](y[m(p, h)](t, 12), 63)]) + encrypt_lookup[t >> 6 & 63] + encrypt_lookup[y[m(-a, -d)](t, 63)];
204
+ }
205
+ function encrypt_encodeChunk(t, e, r) {
206
+ var n, o = 165, i = 246, a = 205, u = 353, s = 162, c = 17, l = 351, f = 191, p = 139, h = 79, d = 86, v = 233, g = 270, m = 166, y = {
207
+ hwomB: function(t, e) {
208
+ return t < e;
209
+ },
210
+ iHUeL: function(t, e) {
211
+ return t & e;
212
+ },
213
+ ELxEv: function(t, e) {
214
+ return t << e;
215
+ },
216
+ lBuRH: function(t, e) {
217
+ return t << e;
218
+ },
219
+ SkIJl: function(t, e) {
220
+ return t & e;
221
+ },
222
+ JYxWY: function(t, e) {
223
+ return t + e;
224
+ },
225
+ CxjtF: function(t, e) {
226
+ return t(e);
227
+ }
228
+ }, w = [];
229
+ function b(t, e) {
230
+ return a0_0x10f4ac(t, e - m);
231
+ }
232
+ for(var _ = e; y[b(-63, -o)](_, r); _ += 3)n = y[b(-i, -a)](y[b(-166, -124)](t[_], 16), 16711680) + y[b(-u, -205)](y[b(s, -c)](t[_ + 1], 8), 65280) + y[b(-l, -208)](t[y[b(-350, -f)](_, 2)], 255), w[b(p, 73)](y[b(h, d)](encrypt_tripletToBase64, n));
233
+ return w[b(-v, -g)]("");
234
+ }
235
+ function a0_0x3693(t, e) {
236
+ var r = [
237
+ "xUKNL",
238
+ "jUrZI",
239
+ "rviFu",
240
+ "join",
241
+ "get",
242
+ "LjDtD",
243
+ "ZJHyP",
244
+ "wOmGY",
245
+ "enumera",
246
+ "aONWR",
247
+ "string",
248
+ "kQpMi",
249
+ "mZPJZ",
250
+ "Ysiay",
251
+ "czxKn",
252
+ "|5|6|4|",
253
+ "prototy",
254
+ "jklmnop",
255
+ "MuYbw",
256
+ "diDwk",
257
+ "TRFtx",
258
+ "drDHI",
259
+ "WLARA",
260
+ "xyz0123",
261
+ "asBytes",
262
+ "|6|0|1|",
263
+ "JOtEi",
264
+ "Oialn",
265
+ "OQrEi",
266
+ "uPnXq",
267
+ "VWXYZab",
268
+ "cIbFa",
269
+ "qYuta",
270
+ "QDOZZ",
271
+ "MahgM",
272
+ "iRXZq",
273
+ "22098XlFGYn",
274
+ "mmLKn",
275
+ "jMcIE",
276
+ "stringi",
277
+ "[object",
278
+ "nYqUQ",
279
+ "jSgjk",
280
+ "ucyEo",
281
+ "iewJI",
282
+ "vgTwl",
283
+ "DnNGR",
284
+ "oBytes",
285
+ "Xtwzk",
286
+ "aqlTy",
287
+ "JWnPK",
288
+ "1|0|2|4",
289
+ "qrstuvw",
290
+ "_gg",
291
+ "QLthP",
292
+ "FJIWy",
293
+ "yRnhISG",
294
+ "pjUsr",
295
+ "KAwuh",
296
+ "Thhoa",
297
+ "jarkJ",
298
+ "WjRNN",
299
+ "asStrin",
300
+ "x3VT16I",
301
+ "357835LaQWjW",
302
+ "SkIJl",
303
+ "size",
304
+ "iyorr",
305
+ "iHUeL",
306
+ "tTanW",
307
+ "tNusJ",
308
+ "NiSrP",
309
+ "eAt",
310
+ "TCArD",
311
+ "a2r1ZQo",
312
+ "iamspam",
313
+ "bOnfu",
314
+ "UNSKg",
315
+ "HIJKLMN",
316
+ "ZfMKC",
317
+ "bJhXU",
318
+ "zwAAc",
319
+ "JYxWY",
320
+ "lUAFM97",
321
+ "mwaRe",
322
+ "EzYWD",
323
+ "replace",
324
+ "uOtUJ",
325
+ "__esMod",
326
+ "ViQWI",
327
+ "aCMFL",
328
+ "EAKSd",
329
+ "ule",
330
+ "pqnFP",
331
+ "qYDsL",
332
+ "270726pnaYfG",
333
+ "glBZG",
334
+ "OwjMq",
335
+ "YGrjc",
336
+ "ZhAcd",
337
+ "JDqFL",
338
+ "456789+",
339
+ "kEjQs",
340
+ "lWhbD",
341
+ "OaLTI",
342
+ "dXlgm",
343
+ "cVte9UJ",
344
+ "ctor",
345
+ "hwomB",
346
+ "wDtJz",
347
+ "constru",
348
+ "ABHuC",
349
+ "zDETq",
350
+ "SYNeA",
351
+ "BGbij",
352
+ "ionFq",
353
+ "QzaNS",
354
+ "7|3|5|4",
355
+ "YlZGp",
356
+ "Bjniw",
357
+ "ZITuN",
358
+ "KPTzH",
359
+ "HrBeq",
360
+ "xobsT",
361
+ "kXJkC",
362
+ "QSrEZ",
363
+ "ENXtO",
364
+ "FYbRJ",
365
+ "wOcza/L",
366
+ "_hh",
367
+ "dVXMb",
368
+ "ppkua",
369
+ "WgamZ",
370
+ "HuwCW",
371
+ "362424fnLCuh",
372
+ "charCod",
373
+ "HhPqg",
374
+ "ODunI",
375
+ "eJzqq",
376
+ "charAt",
377
+ "JGAgI",
378
+ "ZmserbB",
379
+ "TURcG",
380
+ "WyrqF",
381
+ "iYJzH",
382
+ "VIwfH",
383
+ "tzzOB",
384
+ "YgiCH",
385
+ "byyMQ",
386
+ "ELxEv",
387
+ "0DSfdik",
388
+ "HRihr",
389
+ "_ii",
390
+ "aDsrp",
391
+ "ble",
392
+ "jTGtW",
393
+ "configu",
394
+ "cXiYW",
395
+ "56kSpAsC",
396
+ "158KIldlA",
397
+ "oHQtNP+",
398
+ "BHavO",
399
+ "PCIlh",
400
+ "QatIf",
401
+ "IKyqh",
402
+ "Words",
403
+ "Qwnrg",
404
+ "44lQAgNu",
405
+ "cdefghi",
406
+ "nTwxD",
407
+ "RHteb",
408
+ "coqPr",
409
+ "rJwmI",
410
+ "aBoeK",
411
+ "default",
412
+ "exports",
413
+ "rceYY",
414
+ "isArray",
415
+ "mdKKO",
416
+ "kzxWE",
417
+ "DeBtm",
418
+ "tjjUn",
419
+ "vJEcD",
420
+ "LpfE8xz",
421
+ "bin",
422
+ "HKazo",
423
+ "rable",
424
+ "call",
425
+ "wordsTo",
426
+ "zBiyt",
427
+ "GrsGL",
428
+ "fqulF",
429
+ "jevwl",
430
+ "mxfLj",
431
+ "xlUnt",
432
+ "q42KWYj",
433
+ "endian",
434
+ "eEqDc",
435
+ "oyGAZ",
436
+ "bytesTo",
437
+ "OzjuJ",
438
+ "IfwWq",
439
+ "ize",
440
+ "6648810piiNEz",
441
+ "lTHdy",
442
+ "vDLZJ",
443
+ "stringT",
444
+ "A4NjFqY",
445
+ "GkjTz",
446
+ "eooJA",
447
+ "substr",
448
+ "veNiI",
449
+ "LYfDp",
450
+ "ljKsP",
451
+ "jJYWG",
452
+ "bcYAf",
453
+ "srikB",
454
+ "utf8",
455
+ "qTbeY",
456
+ "yqRzd",
457
+ "|3|5",
458
+ "bjbAy",
459
+ " Array]",
460
+ "rMbXP",
461
+ "u5wPHsO",
462
+ "test",
463
+ "gMIMC",
464
+ "Deyqv",
465
+ " argume",
466
+ "ABCDEFG",
467
+ "undefin",
468
+ "split",
469
+ "QTlsj",
470
+ "_isBuff",
471
+ "OPQRSTU",
472
+ "Illegal",
473
+ "loSen",
474
+ "navigat",
475
+ "ObwNo",
476
+ "qPbcq",
477
+ "7182692QogvXX",
478
+ "tvqSn",
479
+ "DGptJ",
480
+ "HhTfW",
481
+ "avIYx",
482
+ "defineP",
483
+ "PFQbW",
484
+ "CjFyM",
485
+ "toStrin",
486
+ "yMWXS",
487
+ "yMyOy",
488
+ "0XTdDgM",
489
+ "eXkru",
490
+ "_blocks",
491
+ "indexOf",
492
+ "mbBQr",
493
+ "lBuRH",
494
+ "HzGjH",
495
+ "HNErV",
496
+ "mEokX",
497
+ "userAge",
498
+ "UpmtD",
499
+ "sgomx",
500
+ "KDfKS",
501
+ "OTbSq",
502
+ "lxMGW",
503
+ "0|3|2|1",
504
+ "dfWyB",
505
+ "lWzAd",
506
+ "eyXTL",
507
+ "5624qreyZK",
508
+ "pow",
509
+ "IJstz",
510
+ "LMlMB",
511
+ "INlwI",
512
+ "lRulU",
513
+ "TCgZh",
514
+ "_digest",
515
+ "UBhIl",
516
+ "fLtZZ",
517
+ "FYSKq",
518
+ "2|8|0",
519
+ "IoCeZ",
520
+ " Object",
521
+ "UuTvI",
522
+ "lNKLD",
523
+ "String",
524
+ "Bytes",
525
+ "rBVvW",
526
+ "KblCWi+",
527
+ "pRaIH",
528
+ "roperty",
529
+ "vTINI",
530
+ "atLE",
531
+ "functio",
532
+ "Udqoy",
533
+ "nt ",
534
+ "htSWx",
535
+ "hEwRK",
536
+ "encodin",
537
+ "sCSVK",
538
+ "VuAZF",
539
+ "xeIIy",
540
+ "RBjMb",
541
+ "taTrq",
542
+ "vDLFJ",
543
+ "bPkya",
544
+ "HzimH",
545
+ "nCffO",
546
+ "BWbtU",
547
+ "2|8",
548
+ "slice",
549
+ "lxMGQ",
550
+ "tTiwe",
551
+ "JDhJB",
552
+ "rCode",
553
+ "gNDzY",
554
+ "wJkyu",
555
+ "cCZFe",
556
+ "RNGSl",
557
+ "floor",
558
+ "clYIu",
559
+ "vLiwz",
560
+ "BiNSE",
561
+ "MtYWB",
562
+ "fromCha",
563
+ "StNOc",
564
+ "|7|5|3|",
565
+ "9|1|4|6",
566
+ "length",
567
+ "UNYAE",
568
+ "pngG8yJ",
569
+ "hasOwnP",
570
+ "pYeWu",
571
+ "wTjkk",
572
+ "Bvk6/7=",
573
+ "KTmgk",
574
+ "bIGxm",
575
+ "readFlo",
576
+ "LFZch",
577
+ "_ff",
578
+ "1|3|4|2",
579
+ "binary",
580
+ "LLdJZ",
581
+ "ZofOU",
582
+ "6399uFPxTQ",
583
+ "push",
584
+ "YntPT",
585
+ "kSGXO",
586
+ "random",
587
+ "HfpCU",
588
+ "hECvuRX",
589
+ "getTime",
590
+ "iwSyV",
591
+ "alert",
592
+ "LKMcb",
593
+ "DJVdg",
594
+ "Hex",
595
+ "URzKO",
596
+ "CxjtF",
597
+ "ZVOCs",
598
+ "isBuffe",
599
+ "vGpbT",
600
+ "rotl",
601
+ "udFrB",
602
+ "CnbsH",
603
+ "crLST"
604
+ ];
605
+ return r[t -= 131];
606
+ }
607
+ function a0_0x10f4ac(t, e) {
608
+ return a0_0x3693(e - -570, t);
609
+ }
610
+ var encrypt_mcr = function(t) {
611
+ var e = 67, r = 15, n = 164, o = 126, i = 137, a = 39, u = 176, s = 72, c = 56, l = 21, f = 35, p = 34, h = 35, d = 18, v = 25, g = 185, m = 1149, y = 744, w = 1295, b = 1248, _ = 1310, E = 1096, x = 1166, k = 1095, T = 1196, S = 1180, A = 1039, L = 976, R = 1347, I = 1117, O = 1168, C = 1233, N = 1157, P = 1006, B = 1122, M = 1277, j = 1288, F = 1271, D = 986, q = 162, U = {};
612
+ function H(t, e) {
613
+ return a0_0x10f4ac(e, t - q);
614
+ }
615
+ U[H(-73, -66)] = function(t, e) {
616
+ return t === e;
617
+ }, U[H(e, 186)] = function(t, e) {
618
+ return t < e;
619
+ }, U[H(-r, -n)] = function(t, e) {
620
+ return t ^ e;
621
+ }, U[H(r, -o)] = function(t, e) {
622
+ return t & e;
623
+ }, U[H(-i, -a)] = function(t, e) {
624
+ return t < e;
625
+ }, U[H(-175, -u)] = function(t, e) {
626
+ return t ^ e;
627
+ }, U[H(-59, s)] = function(t, e) {
628
+ return t ^ e;
629
+ }, U[H(-c, -l)] = function(t, e) {
630
+ return t >>> e;
631
+ }, U[H(f, p)] = function(t, e) {
632
+ return t >>> e;
633
+ };
634
+ for(var G, V, W = U, z = 3988292384, X = 256, Y = []; X--; Y[X] = W[H(h, -66)](G, 0))for(V = 8, G = X; V--;)G = W[H(r, d)](G, 1) ? W[H(35, v)](G, 1) ^ z : W[H(h, g)](G, 1);
635
+ return function(t) {
636
+ function e(t, e) {
637
+ return H(e - 1181, t);
638
+ }
639
+ if (W[e(m, 1108)]((0, esm_typeof.A)(t), e(y, 914))) {
640
+ for(var r = 0, n = -1; W[e(w, b)](r, t[e(_, 1233)]); ++r)n = W[e(E, x)](Y[W[e(k, T)](n, 255) ^ t[e(S, A) + e(1022, L)](r)], n >>> 8);
641
+ return W[e(R, 1166)](n, -1) ^ z;
642
+ }
643
+ for(r = 0, n = -1; W[e(I, 1044)](r, t[e(O, C)]); ++r)n = W[e(N, P)](Y[W[e(1229, B)](W[e(M, T)](n, 255), t[r])], W[e(j, 1125)](n, 8));
644
+ return W[e(F, B)](W[e(D, 1122)](n, -1), z);
645
+ };
646
+ }();
647
+ function GenXSCommon(a1cookie, x_t, x_s) {
648
+ let b1 = 'I38rHdgsjopgIvesdVwgIC+oIELmBZ5e3VwXLgFTIxS3bqwErFeexd0ekncAzMFYnqthIhJeSnMDKutRI3KsYorWHPtGrbV0P9WfIi/eWc6eYqtyQApPI37ekmR1QL+5Ii6sdnoeSfqYHqwl2qt5B0DoIvMzOZQqZVw7IxOeTqwr4qtiIkrOIi/skccxICLdI3Oe0utl2ADZsLveDSKsSPw5IEvsiutJOqw8BVwfPpdeTDWOIx4VIiu6ZPwbPut5IvlaLbgs3qtxIxes1VwHIkumIkIyejgsY/WTge7sjutKrZgedWI9gfKeYWZGI36eWPwyIEJefut0ocVAPBLLI3Aeiqt3cZ7sVom4IESyIhEqQd4AICY24F4gIiifpVwAICZVJo3sWWJs1qwiIvdef97e0ekKIi/e1piS8qwUIE7s1fds6WAeiVwqed5sdut3IxILbd6sdqtDbgKs0PwgIv8aI3z5rqwGBVtwzfTsKD7sdBdskut+Iioed/As1SiiIkKs0F6s3nVuIkge1Pt0IkVkwPwwNVtMI3/e1qtdIkKs1VwVIEesdutA+qwKsuw7IvrRIxDgJfIj2IJexVtVIhiKIi6eDVw/bz4zLadsYjmfIkWo4VtPmVw5IvAe3qtk+LJeTl5sTSEyIEJekdgs3PtsnPwqI35sSPt0Ih/sV04TIk0ejjNsfqw7Iv3sVut04B8qIkWyIvKsxFOekzNsdAKsYPtKIiMFI3MurVtKIvzjIh6s6lFut//sWqtaI3IYbuwl';
649
+ let h = {
650
+ s0: 3,
651
+ s1: "",
652
+ x0: "1",
653
+ x1: "3.6.8",
654
+ x2: "Mac OS",
655
+ x3: "xhs-pc-web",
656
+ x4: "4.20.1",
657
+ x5: a1cookie,
658
+ x6: x_t,
659
+ x7: x_s,
660
+ x8: b1,
661
+ x9: encrypt_mcr(x_t + x_s + b1),
662
+ x10: 1
663
+ };
664
+ return sign_common(h);
665
+ }
666
+ module.exports = GenXSCommon;
667
+ },
2
668
  "./src/utils/ttABEncrypt.js": function(module, __unused_webpack_exports, __webpack_require__) {
3
669
  module = __webpack_require__.nmd(module);
4
670
  const a0_0x45db08 = a0_0x4b0d;
@@ -1168,7 +1834,9 @@ var __webpack_exports__ = {};
1168
1834
  };
1169
1835
  }
1170
1836
  constructor(config){
1171
- this.apiClient = external_axios_default().create(config);
1837
+ this.apiClient = external_axios_default().create({
1838
+ ...config
1839
+ });
1172
1840
  }
1173
1841
  addResponseInterceptor(findError) {
1174
1842
  this.apiClient.interceptors.response.use((response)=>{
@@ -1426,7 +2094,8 @@ var __webpack_exports__ = {};
1426
2094
  401100032: "异常,请检查图片(如:格式、版权、合规性等)。",
1427
2095
  20040034: "封面图片推荐jpg、png格式,不支持gif格式。",
1428
2096
  20040124: "服务器异常,请稍后重试!",
1429
- 20040001: "当前用户未登录,请登陆后重试!"
2097
+ 20040001: "当前用户未登录,请登陆后重试!",
2098
+ 401100025: "该应用不支持此媒资类型"
1430
2099
  };
1431
2100
  const mockAction = async (task, params)=>{
1432
2101
  const { baijiahaoSingleCover, baijiahaoMultCover, baijiahaoCoverType } = params.settingInfo;
@@ -1672,7 +2341,7 @@ var __webpack_exports__ = {};
1672
2341
  const findActivity = activityFormItem.locator(".cheetah-form-item-control").getByText(name, {
1673
2342
  exact: true
1674
2343
  });
1675
- if (await findActivity.count() > 0) findActivity.first().locator("..").click();
2344
+ if (await findActivity.count() > 0) await findActivity.first().locator("..").click();
1676
2345
  }
1677
2346
  }
1678
2347
  const { articleId, message } = await new Promise(async (resolve)=>{
@@ -1689,7 +2358,7 @@ var __webpack_exports__ = {};
1689
2358
  };
1690
2359
  page.on("response", handleResponse);
1691
2360
  const operatorContainer = page.locator(".editor-component-operator");
1692
- if ("draft" === params.saveType) operatorContainer.locator(".op-btn-outter-content").filter({
2361
+ if ("draft" === params.saveType) await operatorContainer.locator(".op-btn-outter-content").filter({
1693
2362
  hasText: "存草稿"
1694
2363
  }).locator("button").click();
1695
2364
  else if (params.settingInfo.timer) {
@@ -1754,7 +2423,7 @@ var __webpack_exports__ = {};
1754
2423
  await page.locator(".cheetah-modal-confirm-btns button").filter({
1755
2424
  hasText: "定时发布"
1756
2425
  }).click();
1757
- } else operatorContainer.locator(".op-btn-outter-content").filter({
2426
+ } else await operatorContainer.locator(".op-btn-outter-content").filter({
1758
2427
  hasText: /^发布/
1759
2428
  }).locator("button").click();
1760
2429
  });
@@ -1859,12 +2528,20 @@ var __webpack_exports__ = {};
1859
2528
  type: "news"
1860
2529
  }
1861
2530
  });
1862
- return (0, share_namespaceObject.success)(res?.data?.article.activity_list.map((_item)=>({
2531
+ const data = res?.data?.article.activity_list.map((_item)=>({
1863
2532
  id: _item.id,
1864
2533
  name: _item.name,
1865
2534
  detail: _item.detail,
1866
2535
  is_enable: _item.is_enable
1867
- })) ?? [], "获取头条发布配置项成功");
2536
+ })) ?? [];
2537
+ data.push({
2538
+ id: "bjh_publish_num_left",
2539
+ name: "账号剩余发文数",
2540
+ detail: "",
2541
+ is_enable: 1,
2542
+ publish_num_left: res.data.ability.publish_num_left
2543
+ });
2544
+ return (0, share_namespaceObject.success)(data, "获取百家号配置项成功!");
1868
2545
  };
1869
2546
  const searchToutiaoTopicList = async (_task, params)=>{
1870
2547
  const http = new Http({
@@ -2034,7 +2711,7 @@ var __webpack_exports__ = {};
2034
2711
  this.iv = external_node_buffer_namespaceObject.Buffer.from("4uzjr7mbsibcaldp", "utf8");
2035
2712
  }
2036
2713
  }
2037
- const xsEncrypt = new XsEncrypt();
2714
+ const searchXiaohongshuTopicList_xsEncrypt = new XsEncrypt();
2038
2715
  const searchXiaohongshuTopicList = async (_task, params)=>{
2039
2716
  const http = new Http({
2040
2717
  headers: {
@@ -2062,9 +2739,9 @@ var __webpack_exports__ = {};
2062
2739
  page: 1
2063
2740
  }
2064
2741
  };
2065
- const topicDataStr = xsEncrypt.dumps(topicData);
2742
+ const topicDataStr = searchXiaohongshuTopicList_xsEncrypt.dumps(topicData);
2066
2743
  const fatchTopic = `/web_api/sns/v1/search/topic${topicDataStr}`;
2067
- const xs = await xsEncrypt.encryptXs(fatchTopic, a1Cookie, xt);
2744
+ const xs = await searchXiaohongshuTopicList_xsEncrypt.encryptXs(fatchTopic, a1Cookie, xt);
2068
2745
  const result = await http.api({
2069
2746
  method: "post",
2070
2747
  url: "https://edith.xiaohongshu.com/web_api/sns/v1/search/topic",
@@ -2614,6 +3291,770 @@ var __webpack_exports__ = {};
2614
3291
  }, "获取粉丝数失败,请检查登陆有效性!");
2615
3292
  }
2616
3293
  };
3294
+ const TTSessionCheck = async (_task, params)=>{
3295
+ const http = new Http({
3296
+ headers: {
3297
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
3298
+ referer: "https://mp.toutiao.com/profile_v4/graphic/publish"
3299
+ }
3300
+ });
3301
+ try {
3302
+ const res = await http.api({
3303
+ method: "get",
3304
+ url: "https://mp.toutiao.com/mp/agw/creator_center/user_info",
3305
+ defaultErrorMsg: `头条号登录状态失效。`
3306
+ });
3307
+ return (0, share_namespaceObject.success)(0 === res.code ? {
3308
+ isValidSession: true
3309
+ } : {
3310
+ isValidSession: false
3311
+ }, "头条账号有效性检测完成!");
3312
+ } catch (error) {
3313
+ return (0, share_namespaceObject.success)({
3314
+ isValidSession: false
3315
+ }, "头条账号有效性检测失败!");
3316
+ }
3317
+ };
3318
+ const WxSessionCheck = async (_task, params)=>{
3319
+ const http = new Http({
3320
+ headers: {
3321
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";")
3322
+ }
3323
+ });
3324
+ const fingerprint = "4695500bc93ab4ce8fb2692da6564e04";
3325
+ try {
3326
+ const res = await http.api({
3327
+ method: "get",
3328
+ url: "https://mp.weixin.qq.com/cgi-bin/appmsgpublish",
3329
+ params: {
3330
+ fingerprint,
3331
+ sub: "list",
3332
+ begin: 0,
3333
+ count: 10,
3334
+ query: "",
3335
+ type: 1011102103,
3336
+ show_type: "",
3337
+ free_publish_type: 1102103,
3338
+ sub_action: "list_ex",
3339
+ search_card: 0,
3340
+ token: params.token,
3341
+ lang: "zh_CN",
3342
+ f: "json",
3343
+ ajax: 1
3344
+ }
3345
+ });
3346
+ return (0, share_namespaceObject.success)(0 === res.base_resp.ret ? {
3347
+ isValidSession: true
3348
+ } : {
3349
+ isValidSession: false
3350
+ }, "微信账号有效性检测完成!");
3351
+ } catch (error) {
3352
+ return (0, share_namespaceObject.success)({
3353
+ isValidSession: false
3354
+ }, "微信账号有效性检测失败!");
3355
+ }
3356
+ };
3357
+ const XhsSessionCheck = async (_task, params)=>{
3358
+ const http = new Http({
3359
+ headers: {
3360
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
3361
+ referer: "https://creator.xiaohongshu.com/new/home?source=official"
3362
+ }
3363
+ });
3364
+ try {
3365
+ const res = await http.api({
3366
+ method: "get",
3367
+ url: "https://creator.xiaohongshu.com/api/galaxy/user/info"
3368
+ });
3369
+ return (0, share_namespaceObject.success)(0 === res.result ? {
3370
+ isValidSession: true
3371
+ } : {
3372
+ isValidSession: false
3373
+ }, "小红书账号有效性检测完成!");
3374
+ } catch (error) {
3375
+ return (0, share_namespaceObject.success)({
3376
+ isValidSession: false
3377
+ }, "小红书账号有效性检测完成!");
3378
+ }
3379
+ };
3380
+ const BjhSessionCheck = async (_task, params)=>{
3381
+ const http = new Http({
3382
+ headers: {
3383
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
3384
+ referer: "https://baijiahao.baidu.com/builder/rc/home"
3385
+ }
3386
+ });
3387
+ try {
3388
+ const res = await http.api({
3389
+ method: "get",
3390
+ url: "https://baijiahao.baidu.com/pcui/home/index",
3391
+ defaultErrorMsg: `百家号登录状态失效。`
3392
+ });
3393
+ return (0, share_namespaceObject.success)(0 === res.errno ? {
3394
+ isValidSession: true
3395
+ } : {
3396
+ isValidSession: false
3397
+ }, "百家号账号有效性检测完成!");
3398
+ } catch (error) {
3399
+ return (0, share_namespaceObject.success)({
3400
+ isValidSession: false
3401
+ }, "百家号账号有效性检测失败!");
3402
+ }
3403
+ };
3404
+ const types_errorResponse = (message, code = 500)=>({
3405
+ code,
3406
+ message,
3407
+ data: null
3408
+ });
3409
+ async function getBaijiahaoData(params) {
3410
+ try {
3411
+ const { token } = params;
3412
+ if (!token) return types_errorResponse("缺少token", 200);
3413
+ const http = new Http({
3414
+ headers: {
3415
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
3416
+ token: String(token),
3417
+ Referer: "https://baijiahao.baidu.com/builder/rc/home"
3418
+ }
3419
+ });
3420
+ const yesterday = TimeFormatter.format(new Date().setDate(new Date().getDate() - 1), "yyyyMMdd");
3421
+ const [fansData, readData, incomeData, yesterdayData] = await Promise.all([
3422
+ http.api({
3423
+ method: "get",
3424
+ url: "https://baijiahao.baidu.com/pcui/home/index"
3425
+ }),
3426
+ http.api({
3427
+ method: "get",
3428
+ url: "https://baijiahao.baidu.com/author/eco/statistic/getauthorhistory"
3429
+ }),
3430
+ http.api({
3431
+ method: "get",
3432
+ url: "https://baijiahao.baidu.com/author/eco/income4/homepageincome"
3433
+ }),
3434
+ http.api({
3435
+ method: "get",
3436
+ url: "https://baijiahao.baidu.com/author/eco/statistics/appStatistic",
3437
+ params: {
3438
+ type: "all",
3439
+ is_yesterday: false,
3440
+ start_day: yesterday,
3441
+ end_day: yesterday,
3442
+ stat: 0
3443
+ }
3444
+ })
3445
+ ]);
3446
+ const bjhData = {
3447
+ fansNum: fansData.data.coreData.fansCount,
3448
+ fansNumYesterday: -1 == yesterdayData.data.data.fans_increase ? null : yesterdayData.data.data.fans_increase,
3449
+ readNum: readData.data.total.view_count,
3450
+ incomeNum: incomeData.data.all_income.total_income,
3451
+ incomeNumYesterday: -1 == incomeData.data.all_income.yesterday_income ? null : incomeData.data.all_income.yesterday_income,
3452
+ recommendNumYesterday: -1 == yesterdayData.data.data.recommend_count ? null : yesterdayData.data.data.recommend_count,
3453
+ readNumYesterday: -1 == yesterdayData.data.data.view_count ? null : yesterdayData.data.data.view_count,
3454
+ likeNumYesterday: -1 == yesterdayData.data.data.likes_count ? null : yesterdayData.data.data.likes_count,
3455
+ commentNumYesterday: -1 == yesterdayData.data.data.comment_count ? null : yesterdayData.data.data.comment_count
3456
+ };
3457
+ return (0, share_namespaceObject.success)(bjhData, "百家号平台数据获取成功!");
3458
+ } catch (error) {
3459
+ return types_errorResponse(error instanceof Error ? error.message : "百家号平台数据获取失败");
3460
+ }
3461
+ }
3462
+ async function getToutiaoData(params) {
3463
+ const { cookies } = params;
3464
+ try {
3465
+ const http = new Http({
3466
+ headers: {
3467
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
3468
+ referer: "https://mp.toutiao.com/profile_v4/graphic/publish"
3469
+ }
3470
+ });
3471
+ const [totalData, contentDataYesterday] = await Promise.all([
3472
+ http.api({
3473
+ method: "get",
3474
+ url: "https://mp.toutiao.com/mp/fe_api/home/merge_v2",
3475
+ params: {
3476
+ app_id: 1231
3477
+ }
3478
+ }),
3479
+ http.api({
3480
+ method: "get",
3481
+ url: "https://mp.toutiao.com/mp/agw/statistic/v2/content_stat",
3482
+ params: {
3483
+ type: 0,
3484
+ app_id: 1231
3485
+ }
3486
+ })
3487
+ ]);
3488
+ const isReday = void 0 !== totalData.data.statistic.data.yesterday_read_count;
3489
+ const ttData = {
3490
+ fansNum: Number(totalData.data.statistic.data.total_subscribe_count),
3491
+ fansNumYesterday: void 0 !== totalData.data.statistic.data.yesterday_fans ? Number(totalData.data.statistic.data.yesterday_fans) : null,
3492
+ readNum: Number(totalData.data.statistic.data.total_read_play_count),
3493
+ incomeNum: totalData.data.statistic.data.total_income,
3494
+ incomeNumYesterday: totalData.data.statistic.data.is_yesterday_income_ready ? totalData.data.statistic.data.yesterday_income : null,
3495
+ showNumYesterday: isReday ? contentDataYesterday.author_stat.consume_data.impression_count : null,
3496
+ readNumYesterday: isReday ? contentDataYesterday.author_stat.consume_data.go_detail_count : null,
3497
+ likeNumYesterday: isReday ? contentDataYesterday.author_stat.interaction_data.digg_count : null,
3498
+ commentNumYesterday: isReday ? contentDataYesterday.author_stat.interaction_data.comment_count : null
3499
+ };
3500
+ return (0, share_namespaceObject.success)(ttData, "头条号粉丝数据获取成功!");
3501
+ } catch (error) {
3502
+ return types_errorResponse(error instanceof Error ? error.message : "头条号数据获取失败");
3503
+ }
3504
+ }
3505
+ async function getWeixinData(params) {
3506
+ const { token } = params;
3507
+ if (!token) return {
3508
+ code: 200,
3509
+ message: "缺少token",
3510
+ data: null
3511
+ };
3512
+ try {
3513
+ const { token } = params;
3514
+ if (!token) return types_errorResponse("缺少token", 200);
3515
+ const http = new Http({
3516
+ headers: {
3517
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";")
3518
+ }
3519
+ });
3520
+ const userInfo = {
3521
+ originalCount: 0,
3522
+ totalUsers: 0,
3523
+ userIncrease: 0,
3524
+ yesterday: {
3525
+ read: 0,
3526
+ share: 0,
3527
+ subscribe: 0
3528
+ }
3529
+ };
3530
+ const userInfoHtml = await http.api({
3531
+ method: "get",
3532
+ url: "https://mp.weixin.qq.com/cgi-bin/home",
3533
+ params: {
3534
+ t: "home/index",
3535
+ token,
3536
+ lang: "zh_CN"
3537
+ }
3538
+ });
3539
+ const originalMatch = userInfoHtml.trim().match(/原创内容[\s\S]*?<mp-thousandth[^>]*>([\d,]+)<\/mp-thousandth>/i);
3540
+ if (originalMatch) userInfo.originalCount = parseInt(originalMatch[1].replace(/,/g, ''), 10);
3541
+ const totalUsersMatch = userInfoHtml.match(/总用户数[\s\S]*?<div[^>]*class=["']weui-desktop-user_sum["'][^>]*>[\s\S]*?<mp-thousandth[^>]*>([\d,]+)<\/mp-thousandth>/i);
3542
+ if (totalUsersMatch) userInfo.totalUsers = parseInt(totalUsersMatch[1].replace(/,/g, ''), 10);
3543
+ const increaseMatch = userInfoHtml.match(/weui-desktop-user_increase_num[^>]*>\s*([+-]?)\s*<mp-thousandth[^>]*>([\d,]+)<\/mp-thousandth>/i);
3544
+ if (increaseMatch) {
3545
+ const sign = '-' === increaseMatch[1] ? -1 : 1;
3546
+ userInfo.userIncrease = sign * parseInt(increaseMatch[2].replace(/,/g, ''), 10);
3547
+ }
3548
+ const readMatch = userInfoHtml.match(/昨日阅读[\s\S]*?<mp-thousandth[^>]*>([\d,]+)<\/mp-thousandth>/i);
3549
+ if (readMatch) userInfo.yesterday.read = parseInt(readMatch[1].replace(/,/g, ''), 10);
3550
+ const shareMatch = userInfoHtml.match(/昨日分享[\s\S]*?<mp-thousandth[^>]*>([\d,]+)<\/mp-thousandth>/i);
3551
+ if (shareMatch) userInfo.yesterday.share = parseInt(shareMatch[1].replace(/,/g, ''), 10);
3552
+ const subscribeMatch = userInfoHtml.match(/昨日新增关注[\s\S]*?<mp-thousandth[^>]*>([\d,]+)<\/mp-thousandth>/i);
3553
+ if (subscribeMatch) userInfo.yesterday.subscribe = parseInt(subscribeMatch[1].replace(/,/g, ''), 10);
3554
+ const wxData = {
3555
+ fansNum: userInfo.totalUsers,
3556
+ fansNumYesterday: userInfo.yesterday.subscribe,
3557
+ readNumYesterday: userInfo.yesterday.read,
3558
+ shareNumYesterday: userInfo.yesterday.share
3559
+ };
3560
+ return (0, share_namespaceObject.success)(wxData, "微信平台数据获取成功!");
3561
+ } catch (error) {
3562
+ return types_errorResponse(error instanceof Error ? error.message : "微信平台数据获取失败");
3563
+ }
3564
+ }
3565
+ async function getXiaohongshuData(params) {
3566
+ try {
3567
+ const a1Cookie = params.cookies.find((it)=>"a1" === it.name)?.value;
3568
+ if (!a1Cookie) return types_errorResponse("账号数据异常,请重新绑定账号后重试。", 200);
3569
+ const http = new Http({
3570
+ headers: {
3571
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
3572
+ referer: "https://creator.xiaohongshu.com",
3573
+ origin: "https://creator.xiaohongshu.com"
3574
+ }
3575
+ });
3576
+ const xsEncrypt = new XsEncrypt();
3577
+ const xt = Date.now().toString();
3578
+ const sevenDataUrl = "/api/galaxy/v2/creator/datacenter/account/base";
3579
+ const xs = await xsEncrypt.encryptXs(sevenDataUrl, a1Cookie, xt);
3580
+ const [overAllData, sevenData] = await Promise.all([
3581
+ http.api({
3582
+ method: "get",
3583
+ url: "https://creator.xiaohongshu.com/api/galaxy/creator/home/personal_info"
3584
+ }),
3585
+ http.api({
3586
+ method: "get",
3587
+ baseURL: "https://creator.xiaohongshu.com",
3588
+ url: sevenDataUrl,
3589
+ headers: {
3590
+ "x-s": xs,
3591
+ "x-t": xt
3592
+ }
3593
+ })
3594
+ ]);
3595
+ const xhsData = {
3596
+ fansNum: overAllData.data.fans_count,
3597
+ favedNum: overAllData.data.faved_count,
3598
+ watchNumLastWeek: sevenData.data.seven.view_count,
3599
+ likeNumLastWeek: sevenData.data.seven.like_count,
3600
+ collectNumLastWeek: sevenData.data.seven.collect_count,
3601
+ commentNumLastWeek: sevenData.data.seven.comment_count,
3602
+ fansNumLastWeek: sevenData.data.seven.rise_fans_count,
3603
+ fansNumYesterday: sevenData.data.seven.rise_fans_list[0].count
3604
+ };
3605
+ return (0, share_namespaceObject.success)(xhsData, "小红书平台数据获取成功!");
3606
+ } catch (error) {
3607
+ return types_errorResponse(error instanceof Error ? error.message : "小红书平台数据获取失败");
3608
+ }
3609
+ }
3610
+ const SearchAccountInfo = async (_task, params)=>{
3611
+ const { platform } = params;
3612
+ switch(platform){
3613
+ case "toutiao":
3614
+ return getToutiaoData(params);
3615
+ case "xiaohongshu":
3616
+ return getXiaohongshuData(params);
3617
+ case "weixin":
3618
+ return getWeixinData(params);
3619
+ case "baijiahao":
3620
+ return getBaijiahaoData(params);
3621
+ default:
3622
+ return (0, share_namespaceObject.success)(null, "暂不支持该平台");
3623
+ }
3624
+ };
3625
+ const searchPublishInfo_types_errorResponse = (message, code = 500)=>({
3626
+ code,
3627
+ message,
3628
+ data: null
3629
+ });
3630
+ async function handleToutiaoData(params) {
3631
+ try {
3632
+ const { cookies, pageNum = 1, pageSize = 10, showOriginalData = false, onlySuccess = false } = params;
3633
+ const http = new Http({
3634
+ headers: {
3635
+ cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";")
3636
+ }
3637
+ });
3638
+ const visitedUid = await http.api({
3639
+ url: "https://mp.toutiao.com/mp/agw/creator_center/user_info?",
3640
+ method: "get",
3641
+ params: {
3642
+ app_id: 1231
3643
+ }
3644
+ });
3645
+ const articleInfo = await http.api({
3646
+ method: "get",
3647
+ url: "https://mp.toutiao.com/api/feed/mp_provider/v1/",
3648
+ params: {
3649
+ provider_type: "mp_provider",
3650
+ aid: "13",
3651
+ app_name: "news_article",
3652
+ category: "mp_all",
3653
+ channel: "",
3654
+ stream_api_version: "88",
3655
+ genre_type_switch: '{"repost":1,"small_video":1,"toutiao_graphic":1,"weitoutiao":1,"xigua_video":1}',
3656
+ device_platform: "pc",
3657
+ platform_id: "0",
3658
+ visited_uid: visitedUid.user_id_str,
3659
+ offset: (pageNum - 1) * pageSize,
3660
+ count: pageSize,
3661
+ keyword: "",
3662
+ client_extra_params: `{"category":"mp_all","real_app_id":"1231","need_forward":"true","offset_mode":"1","page_index":"1","status":${onlySuccess ? "2" : "8"},"source":"0"}`,
3663
+ app_id: "1231"
3664
+ }
3665
+ });
3666
+ const articleCell = articleInfo.data.map((item)=>({
3667
+ title: item.assembleCell.itemCell.articleBase.title,
3668
+ imageUrl: item.assembleCell.itemCell.imageList.staggerFeedCover[0].url,
3669
+ createTime: item.assembleCell.itemCell.articleBase.publishTime,
3670
+ redirectUrl: item.assembleCell.itemCell.articleBase.articleURL,
3671
+ showNum: item.assembleCell.itemCell.itemCounter.showCount,
3672
+ readNum: item.assembleCell.itemCell.itemCounter.readCount,
3673
+ likeNum: item.assembleCell.itemCell.itemCounter.diggCount,
3674
+ commentNum: item.assembleCell.itemCell.itemCounter.commentCount,
3675
+ ...showOriginalData ? {
3676
+ originalData: item
3677
+ } : {}
3678
+ }));
3679
+ const api_base_info_json = JSON.parse(articleInfo.api_base_info.app_extra_params);
3680
+ return (0, share_namespaceObject.success)({
3681
+ articleCell,
3682
+ ...onlySuccess ? {
3683
+ pagination: {
3684
+ total: api_base_info_json.total_count,
3685
+ pageNum,
3686
+ pageSize
3687
+ }
3688
+ } : null
3689
+ }, "头条号文章文章获取成功");
3690
+ } catch (error) {
3691
+ return searchPublishInfo_types_errorResponse(error instanceof Error ? error.message : "头条号文章数据获取失败");
3692
+ }
3693
+ }
3694
+ async function handleWeixinData(params) {
3695
+ try {
3696
+ const { cookies, token, pageNum = 1, pageSize = 10, showOriginalData = false, onlySuccess = false, cursor, lastPage } = params;
3697
+ if (!token) return {
3698
+ code: 200,
3699
+ message: "缺少token",
3700
+ data: null
3701
+ };
3702
+ const http = new Http({
3703
+ headers: {
3704
+ cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";")
3705
+ }
3706
+ });
3707
+ const ParsePublishPage = (body)=>{
3708
+ const match = body.match(/publish_page\s*=\s*({[\s\S]*?});/);
3709
+ if (!match) throw new Error('无法提取 publish_page 字段');
3710
+ let parsedData = JSON.parse(match[1]);
3711
+ const decodeEntities = function(str, decode = false) {
3712
+ const encodeMap = [
3713
+ "&",
3714
+ "&amp;",
3715
+ "<",
3716
+ "&lt;",
3717
+ ">",
3718
+ "&gt;",
3719
+ " ",
3720
+ "&nbsp;",
3721
+ '"',
3722
+ "&quot;",
3723
+ "'",
3724
+ "&#39;"
3725
+ ];
3726
+ const decodeMap = [
3727
+ "&#39;",
3728
+ "'",
3729
+ "&quot;",
3730
+ '"',
3731
+ "&nbsp;",
3732
+ " ",
3733
+ "&gt;",
3734
+ ">",
3735
+ "&lt;",
3736
+ "<",
3737
+ "&amp;",
3738
+ "&",
3739
+ "&#60;",
3740
+ "<",
3741
+ "&#62;",
3742
+ ">"
3743
+ ];
3744
+ const map = decode ? decodeMap : encodeMap;
3745
+ let result = str;
3746
+ for(let i = 0; i < map.length; i += 2)result = result.replace(new RegExp(map[i], "g"), map[i + 1]);
3747
+ return result;
3748
+ };
3749
+ const finalData = {
3750
+ ...parsedData,
3751
+ publish_list: parsedData.publish_list.map((item)=>{
3752
+ const decoded = decodeEntities(item.publish_info, true);
3753
+ const parsedInfo = JSON.parse(decoded);
3754
+ return {
3755
+ publish_type: item.publish_type,
3756
+ publish_info: parsedInfo
3757
+ };
3758
+ })
3759
+ };
3760
+ return finalData;
3761
+ };
3762
+ async function fetchArticles(begin, pageSize, token) {
3763
+ return http.api({
3764
+ method: "get",
3765
+ url: 'https://mp.weixin.qq.com/cgi-bin/appmsgpublish',
3766
+ params: {
3767
+ sub: "list",
3768
+ begin: begin,
3769
+ count: pageSize,
3770
+ token: token,
3771
+ lang: "zh_CN"
3772
+ }
3773
+ });
3774
+ }
3775
+ let size = onlySuccess ? 10 : pageSize > 20 ? 20 : pageSize;
3776
+ let begin = (lastPage ?? pageNum) - 1;
3777
+ let rawArticlesInfo = await fetchArticles(begin * size, size, token);
3778
+ let articlesInfo = ParsePublishPage(rawArticlesInfo);
3779
+ let articleCell = [];
3780
+ if (!onlySuccess && pageSize > 20) {
3781
+ let totalFetched = articlesInfo.publish_list.length;
3782
+ let nextPage = pageNum + 1;
3783
+ while(totalFetched < pageSize){
3784
+ const remaining = pageSize - totalFetched;
3785
+ const currentPageSize = remaining > 20 ? 20 : remaining;
3786
+ let _rawArticlesInfo = await fetchArticles((nextPage - 1) * 20, currentPageSize, token);
3787
+ let parsed = ParsePublishPage(_rawArticlesInfo);
3788
+ articlesInfo.publish_list = articlesInfo.publish_list.concat(parsed.publish_list);
3789
+ totalFetched = articlesInfo.publish_list.length;
3790
+ if (parsed.publish_list.length < currentPageSize) break;
3791
+ nextPage++;
3792
+ }
3793
+ }
3794
+ let nextPage = false;
3795
+ if (onlySuccess) {
3796
+ let filteredList = articlesInfo.publish_list.filter((item)=>-1 == item.publish_info.appmsg_info[0].content_url.indexOf("tempkey")).map((item)=>item.publish_info);
3797
+ if (cursor) {
3798
+ const cursorIndex = filteredList.findIndex((item)=>item.msgid === cursor);
3799
+ if (-1 !== cursorIndex) filteredList = filteredList.slice(cursorIndex + 1);
3800
+ }
3801
+ let totalFetched = filteredList.length;
3802
+ while(totalFetched < pageSize && begin * size < articlesInfo.total_count){
3803
+ begin += 1;
3804
+ let nextRawArticlesInfo = await fetchArticles(begin * size, size, token);
3805
+ let nextArticlesInfo = ParsePublishPage(nextRawArticlesInfo);
3806
+ const newFiltered = nextArticlesInfo.publish_list.filter((item)=>-1 == item.publish_info.appmsg_info[0].content_url.indexOf("tempkey")).map((item)=>item.publish_info);
3807
+ filteredList = filteredList.concat(newFiltered);
3808
+ totalFetched = filteredList.length;
3809
+ }
3810
+ filteredList = filteredList.slice(0, pageSize);
3811
+ totalFetched = filteredList.length;
3812
+ if (totalFetched >= pageSize && begin * size < articlesInfo.total_count) {
3813
+ let nextRawArticlesInfo = await fetchArticles((begin + 1) * size, size, token);
3814
+ let nextArticlesInfo = ParsePublishPage(nextRawArticlesInfo);
3815
+ nextPage = nextArticlesInfo.publish_list.length > 0 && nextArticlesInfo.publish_list.some((item)=>-1 == item.publish_info.appmsg_info[0].content_url.indexOf("tempkey"));
3816
+ }
3817
+ const lastMsgId = filteredList.length > 0 ? filteredList[filteredList.length - 1].msgid : void 0;
3818
+ articleCell = filteredList.map((item)=>({
3819
+ title: item.appmsg_info[0].title,
3820
+ imageUrl: item.appmsg_info[0].cover,
3821
+ createTime: item.appmsg_info[0].line_info.send_time,
3822
+ redirectUrl: item.appmsg_info[0].content_url,
3823
+ readNum: item.appmsg_info[0].read_num,
3824
+ likeNum: item.appmsg_info[0].old_like_num,
3825
+ shareNum: item.appmsg_info[0].share_num,
3826
+ recommendNum: item.appmsg_info[0].like_num,
3827
+ ...showOriginalData ? {
3828
+ originalData: item
3829
+ } : {}
3830
+ }));
3831
+ return (0, share_namespaceObject.success)({
3832
+ articleCell,
3833
+ pagination: {
3834
+ nextPage,
3835
+ pageNum,
3836
+ pageSize,
3837
+ lastPage: begin + 1,
3838
+ cursor: lastMsgId
3839
+ }
3840
+ }, "微信文章文章获取成功");
3841
+ }
3842
+ articleCell = articlesInfo.publish_list.map((item)=>({
3843
+ title: item.publish_info.appmsg_info[0].title,
3844
+ imageUrl: item.publish_info.appmsg_info[0].cover,
3845
+ createTime: item.publish_info.appmsg_info[0].line_info.send_time,
3846
+ redirectUrl: item.publish_info.appmsg_info[0].content_url,
3847
+ readNum: item.publish_info.appmsg_info[0].read_num,
3848
+ likeNum: item.publish_info.appmsg_info[0].old_like_num,
3849
+ shareNum: item.publish_info.appmsg_info[0].share_num,
3850
+ recommendNum: item.publish_info.appmsg_info[0].like_num,
3851
+ ...showOriginalData ? {
3852
+ originalData: item
3853
+ } : {}
3854
+ }));
3855
+ return (0, share_namespaceObject.success)({
3856
+ articleCell
3857
+ }, "微信文章文章获取成功");
3858
+ } catch (error) {
3859
+ return searchPublishInfo_types_errorResponse(error instanceof Error ? error.message : "微信文章数据获取失败");
3860
+ }
3861
+ }
3862
+ async function handleBaijiahaoData(params) {
3863
+ try {
3864
+ const { cookies, token, pageNum = 1, pageSize = 10, showOriginalData = false, onlySuccess = false } = params;
3865
+ if (!token) return {
3866
+ code: 200,
3867
+ message: "缺少token",
3868
+ data: null
3869
+ };
3870
+ const http = new Http({
3871
+ headers: {
3872
+ cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
3873
+ token: token
3874
+ }
3875
+ });
3876
+ async function fetchArticles(pageNum, pageSize, onlySuccess = false) {
3877
+ return await http.api({
3878
+ method: "get",
3879
+ url: "https://baijiahao.baidu.com/pcui/article/lists",
3880
+ params: {
3881
+ currentPage: pageNum,
3882
+ pageSize: pageSize,
3883
+ search: "",
3884
+ type: "",
3885
+ collection: onlySuccess ? "publish" : "",
3886
+ clearBeforeFetch: false,
3887
+ dynamic: 1
3888
+ }
3889
+ });
3890
+ }
3891
+ const articleInfo = await fetchArticles(pageNum, pageSize, onlySuccess);
3892
+ let filtered = articleInfo.data.list.filter((item)=>"draft" !== item.status);
3893
+ const totalPage = articleInfo.data.page?.totalPage || 1;
3894
+ let currentPage = pageNum + 1;
3895
+ const usedPages = new Set();
3896
+ while(filtered.length < pageSize && currentPage <= totalPage){
3897
+ if (usedPages.has(currentPage)) {
3898
+ currentPage++;
3899
+ continue;
3900
+ }
3901
+ const res = await fetchArticles(currentPage, pageSize, onlySuccess);
3902
+ usedPages.add(currentPage);
3903
+ const validItems = res.data.list.filter((item)=>"draft" !== item.status);
3904
+ filtered.push(...validItems);
3905
+ currentPage++;
3906
+ }
3907
+ const final = filtered.slice(0, pageSize);
3908
+ const articleCell = final.map((item)=>({
3909
+ title: item.title,
3910
+ imageUrl: JSON.parse(item.cover_images)[0].src,
3911
+ createTime: Math.floor(new Date(item.publish_at.replace(/-/g, "/")).getTime() / 1000),
3912
+ redirectUrl: item.url,
3913
+ recommendNum: item.rec_amount | item.forward_num,
3914
+ collectNum: item.collection_amount,
3915
+ readNum: item.read_amount | item.read_num,
3916
+ likeNum: item.like_amount | item.praise_num,
3917
+ commentNum: item.comment_amount | item.comment_num,
3918
+ shareNum: item.share_amount,
3919
+ ...showOriginalData ? {
3920
+ originalData: item
3921
+ } : {}
3922
+ }));
3923
+ return (0, share_namespaceObject.success)({
3924
+ articleCell,
3925
+ ...onlySuccess ? {
3926
+ pagination: {
3927
+ total: articleInfo.data.page?.totalCount,
3928
+ pageNum,
3929
+ pageSize
3930
+ }
3931
+ } : null
3932
+ }, "百家号文章数据获取成功");
3933
+ } catch (error) {
3934
+ return searchPublishInfo_types_errorResponse(error instanceof Error ? error.message : "百家号文章数据获取失败");
3935
+ }
3936
+ }
3937
+ async function handleXiaohongshuData(params) {
3938
+ try {
3939
+ const { cookies, pageNum = 1, pageSize = 10, showOriginalData = false, onlySuccess = false } = params;
3940
+ const xsEncrypt = new XsEncrypt();
3941
+ const a1Cookie = cookies.find((it)=>"a1" === it.name)?.value;
3942
+ if (!a1Cookie) return {
3943
+ code: 200,
3944
+ message: "账号数据异常",
3945
+ data: null
3946
+ };
3947
+ if (onlySuccess && 10 != pageSize) return {
3948
+ code: 200,
3949
+ message: "小红书pageSize不可修改",
3950
+ data: null
3951
+ };
3952
+ const http = new Http({
3953
+ headers: {
3954
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
3955
+ referer: "https://creator.xiaohongshu.com",
3956
+ origin: "https://creator.xiaohongshu.com"
3957
+ }
3958
+ });
3959
+ async function fetchArticles(pageNum, a1Cookie, onlySuccess = false) {
3960
+ const xt = Date.now().toString();
3961
+ const serveUrl = `/web_api/sns/v5/creator/note/user/posted?tab=${onlySuccess ? 1 : 0}&page=${pageNum - 1}`;
3962
+ const xs = await xsEncrypt.encryptXs(serveUrl, a1Cookie, xt);
3963
+ return await http.api({
3964
+ method: "get",
3965
+ baseURL: "https://edith.xiaohongshu.com",
3966
+ url: serveUrl,
3967
+ headers: {
3968
+ "x-s": xs,
3969
+ "x-t": xt
3970
+ }
3971
+ });
3972
+ }
3973
+ const articleInfo = await fetchArticles(pageNum, a1Cookie, onlySuccess);
3974
+ let hasNextpage = -1 != articleInfo.data.page;
3975
+ let filtered = articleInfo.data.notes;
3976
+ let currentPage = pageNum + 1;
3977
+ const usedPages = new Set();
3978
+ while(filtered.length < pageSize && hasNextpage){
3979
+ if (usedPages.has(currentPage)) {
3980
+ currentPage++;
3981
+ continue;
3982
+ }
3983
+ const res = await fetchArticles(currentPage, a1Cookie, onlySuccess);
3984
+ usedPages.add(currentPage);
3985
+ const validItems = res.data.notes;
3986
+ filtered.push(...validItems);
3987
+ currentPage++;
3988
+ hasNextpage = -1 != res.data.page;
3989
+ }
3990
+ const final = filtered.slice(0, pageSize);
3991
+ const articleCell = final.map((item)=>({
3992
+ title: item.display_title,
3993
+ imageUrl: item.images_list[0].url,
3994
+ createTime: Math.floor(new Date(item.time.replace(/-/g, "/")).getTime() / 1000),
3995
+ redirectUrl: `https://www.xiaohongshu.com/explore/${item.id}?xsec_token=${item.xsec_token}&xsec_source=pc_creatormng`,
3996
+ readNum: item.view_count,
3997
+ likeNum: item.likes,
3998
+ commentNum: item.comments_count,
3999
+ collectNum: item.collected_count,
4000
+ shareNum: item.shared_count,
4001
+ ...showOriginalData ? {
4002
+ originalData: item
4003
+ } : {}
4004
+ }));
4005
+ return (0, share_namespaceObject.success)({
4006
+ articleCell,
4007
+ ...onlySuccess ? {
4008
+ pagination: {
4009
+ nextPage: hasNextpage,
4010
+ pageNum,
4011
+ pageSize
4012
+ }
4013
+ } : null
4014
+ }, "小红书文章数据获取成功");
4015
+ } catch (error) {
4016
+ return searchPublishInfo_types_errorResponse(error instanceof Error ? error.message : "小红书文章数据获取失败");
4017
+ }
4018
+ }
4019
+ const FetchArticles = async (_task, params)=>{
4020
+ const { platform } = params;
4021
+ switch(platform){
4022
+ case "toutiao":
4023
+ return handleToutiaoData(params);
4024
+ case "weixin":
4025
+ return handleWeixinData(params);
4026
+ case "baijiahao":
4027
+ return handleBaijiahaoData(params);
4028
+ case "xiaohongshu":
4029
+ return handleXiaohongshuData(params);
4030
+ default:
4031
+ return (0, share_namespaceObject.success)(null, "暂不支持该平台");
4032
+ }
4033
+ };
4034
+ const getWeixinConfig = async (_task, params)=>{
4035
+ const http = new Http({
4036
+ headers: {
4037
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";")
4038
+ }
4039
+ });
4040
+ const fingerprint = "4695500bc93ab4ce8fb2692da6564e04";
4041
+ const res = await http.api({
4042
+ method: "get",
4043
+ url: "https://mp.weixin.qq.com/cgi-bin/masssendpage",
4044
+ params: {
4045
+ f: 'json',
4046
+ token: params.token,
4047
+ lang: 'zh_CN',
4048
+ ajax: 1,
4049
+ fingerprint: fingerprint,
4050
+ random: Math.random().toString()
4051
+ }
4052
+ });
4053
+ const filtered = {
4054
+ publishQuota: 0 === res.base_resp.ret ? res.quota_detail_list.filter((item)=>"kQuotaTypeMassSendNormal" === item.quota_type).map((item)=>item.quota_item_list) : []
4055
+ };
4056
+ return (0, share_namespaceObject.success)(filtered, 0 === res.base_resp.ret ? "微信配置信息获取成功!" : "微信配置信息获取失败!");
4057
+ };
2617
4058
  const weitoutiaoPublish_mock_mockAction = async (task, params)=>{
2618
4059
  const tmpCachePath = task.getTmpPath();
2619
4060
  const http = new Http({
@@ -4135,6 +5576,7 @@ var __webpack_exports__ = {};
4135
5576
  if ("mockApi" === params.actionType) return weixinmpPublish_mock_mockAction(task, params);
4136
5577
  return executeAction(weixinmpPublish_mock_mockAction, weixinmpPublish_rpa_rpaAction)(task, params);
4137
5578
  };
5579
+ const GenXSCommon = __webpack_require__("./src/utils/XhsXsCommonEnc.js");
4138
5580
  const xiaohongshuPublish_mock_errnoMap = {
4139
5581
  915: "所属C端账号手机号被修改,请重新登录",
4140
5582
  914: "所属C端账号密码被修改,请重新登录",
@@ -4359,18 +5801,21 @@ var __webpack_exports__ = {};
4359
5801
  const publishDataStr = mock_xsEncrypt.dumps(publishData);
4360
5802
  const publishXt = Date.now().toString();
4361
5803
  const publishXs = await mock_xsEncrypt.encryptXs(`/web_api/sns/v2/note${publishDataStr}`, a1Cookie, publishXt);
5804
+ const xscommon = GenXSCommon(a1Cookie, publishXt, publishXs);
4362
5805
  const publishResult = await http.api({
4363
5806
  method: "post",
4364
5807
  url: "https://edith.xiaohongshu.com/web_api/sns/v2/note",
4365
5808
  data: publishData,
4366
5809
  headers: {
4367
5810
  "x-s": publishXs,
4368
- "x-t": publishXt
5811
+ "x-t": publishXt,
5812
+ "x-s-common": xscommon
4369
5813
  },
4370
5814
  defaultErrorMsg: "文章发布异常,请稍后重试。"
4371
5815
  });
4372
5816
  return (0, share_namespaceObject.success)(publishResult.data?.id);
4373
5817
  };
5818
+ const rpa_GenXSCommon = __webpack_require__("./src/utils/XhsXsCommonEnc.js");
4374
5819
  const rpa_xsEncrypt = new XsEncrypt();
4375
5820
  const xiaohongshuPublish_rpa_rpaAction = async (task, params)=>{
4376
5821
  const commonCookies = {
@@ -4423,9 +5868,11 @@ var __webpack_exports__ = {};
4423
5868
  const publishDataStr = rpa_xsEncrypt.dumps(publishData);
4424
5869
  return rpa_xsEncrypt.encryptXs(interceptUrls[5] + publishDataStr, a1Cookie, xt);
4425
5870
  })() : rpa_xsEncrypt.encryptXs(fetchCoverUrl, a1Cookie, xt));
5871
+ const xscommon = rpa_GenXSCommon(a1Cookie, xt, xs);
4426
5872
  const newHeaders = {
4427
5873
  ...request.headers(),
4428
- 'x-s': xs
5874
+ 'x-s': xs,
5875
+ 'x-s-common': xscommon
4429
5876
  };
4430
5877
  await route.continue({
4431
5878
  headers: newHeaders
@@ -4587,7 +6034,7 @@ var __webpack_exports__ = {};
4587
6034
  return executeAction(xiaohongshuPublish_mock_mockAction, xiaohongshuPublish_rpa_rpaAction)(task, params);
4588
6035
  };
4589
6036
  var package_namespaceObject = {
4590
- i8: "1.2.15"
6037
+ i8: "1.2.17"
4591
6038
  };
4592
6039
  class Action {
4593
6040
  constructor(task){
@@ -4609,6 +6056,24 @@ var __webpack_exports__ = {};
4609
6056
  } else this.task.logger.info(`${func.name} action success`);
4610
6057
  return responseData;
4611
6058
  }
6059
+ FetchArticles(params) {
6060
+ return this.bindTask(FetchArticles, params);
6061
+ }
6062
+ SearchAccountInfo(params) {
6063
+ return this.bindTask(SearchAccountInfo, params);
6064
+ }
6065
+ TTSessionCheck(params) {
6066
+ return this.bindTask(TTSessionCheck, params);
6067
+ }
6068
+ WxSessionCheck(params) {
6069
+ return this.bindTask(WxSessionCheck, params);
6070
+ }
6071
+ XhsSessionCheck(params) {
6072
+ return this.bindTask(XhsSessionCheck, params);
6073
+ }
6074
+ BjhSessionCheck(params) {
6075
+ return this.bindTask(BjhSessionCheck, params);
6076
+ }
4612
6077
  searchToutiaoTopicList(params) {
4613
6078
  return this.bindTask(searchToutiaoTopicList, params);
4614
6079
  }
@@ -4633,6 +6098,9 @@ var __webpack_exports__ = {};
4633
6098
  getToutiaoConfig(params) {
4634
6099
  return this.bindTask(getToutiaoConfig, params);
4635
6100
  }
6101
+ getWeixinConfig(params) {
6102
+ return this.bindTask(getWeixinConfig, params);
6103
+ }
4636
6104
  getBaijiahaoConfig(params) {
4637
6105
  return this.bindTask(getBaijiahaoConfig, params);
4638
6106
  }