let keyStr = "J8QoS9q62O4cnMVvkemfCdXE_-l3abjzRiHAP7uwFLZB0Ir=pKGxN5sgtYTWDy1hU";
encodeFuc = function (input) {
    let output = "", chr1, chr2, chr3, enc1, enc2, enc3, enc4, i = 0;
    input = utf8_encode(input);
    while (i < input.length) {
        chr1 = input.charCodeAt(i++);
        chr2 = input.charCodeAt(i++);
        chr3 = input.charCodeAt(i++);
        enc1 = chr1 >> 2;
        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
        enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
        enc4 = chr3 & 63;
        if (isNaN(chr2)) {
            enc3 = enc4 = 64;
        } else if (isNaN(chr3)) {
            enc4 = 64;
        }
        console.log(enc1, enc2, enc3, enc4)
        output = output +
            keyStr.charAt(enc1) + keyStr.charAt(enc2) +
            keyStr.charAt(enc3) + keyStr.charAt(enc4);
    }
    return output;
}
utf8_encode = function (string) {
    string = string.replace(/\r\n/g, "\n");
    let utftext = "";
    for (let n = 0; n < string.length; n++) {
        let c = string.charCodeAt(n);
        if (c < 128) {
            utftext += String.fromCharCode(c);
        } else if ((c > 127) && (c < 2048)) {
            utftext += String.fromCharCode((c >> 6) | 192);
            utftext += String.fromCharCode((c & 63) | 128);
        } else {
            utftext += String.fromCharCode((c >> 12) | 224);
            utftext += String.fromCharCode(((c >> 6) & 63) | 128);
            utftext += String.fromCharCode((c & 63) | 128);
        }

    }
    return utftext;
}
// 编码

decodeFuc = function (input) {
    let output = "", chr1, chr2, chr3, enc1, enc2, enc3, enc4, i = 0;
    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
    while (i < input.length) {
        enc1 = keyStr.indexOf(input.charAt(i++));
        enc2 = keyStr.indexOf(input.charAt(i++));
        enc3 = keyStr.indexOf(input.charAt(i++));
        enc4 = keyStr.indexOf(input.charAt(i++));
        chr1 = (enc1 << 2) | (enc2 >> 4);
        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
        chr3 = ((enc3 & 3) << 6) | enc4;
        output = output + String.fromCharCode(chr1);
        if (enc3 != 64) {
            output = output + String.fromCharCode(chr2);
        }
        if (enc4 != 64) {
            output = output + String.fromCharCode(chr3);
        }
    }
    output = utf8_decode(output);
    return output;
}
utf8_decode = function (utftext) {
    let string = "", i = 0, c = 0, c1 = 0, c2 = 0, c3 = 0;
    while (i < utftext.length) {
        c = utftext.charCodeAt(i);
        if (c < 128) {
            string += String.fromCharCode(c);
            i++;
        } else if ((c > 191) && (c < 224)) {
            c2 = utftext.charCodeAt(i + 1);
            string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
            i += 2;
        } else {
            c2 = utftext.charCodeAt(i + 1);
            c3 = utftext.charCodeAt(i + 2);
            string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
            i += 3;
        }
    }
    return string;
}
// 解码
newBase = 'in=eDHHPaDmolr10CVDvNKNG=9zLcX7CNqEW0VaeqbXh3nJu2eR0v20eXus4c3_8=_qR=BNbvwZeNPH67f=vVq35Zgnpa6VACYkRsespovj4yYA6xPccRrNzSof5KD57WKOj=2jHrpyDPr1xXinM5bQ4E96WjCJGyLGyNGmFK1c0nuSmAFRJcPObDWDv3M=BHMr1HTxeAxh7JcL==R3J_WzPweV63dAWKYIa7wJeSmT6QzNCHWCI68nmSV8eIZyXqBXhOHl4w2Eay4V2G_G9wq9ypoWvzwWTL5ecJnVcHwxSzXj9pMBcsJlqjVvS21zQBZQp4XKbAijypdX-Ir07H_f83ZYyF=EhZgiP7kvq3tAqal8bA_NL4s3hijdvJ4yrzT4mFDAFt_CmYv_Irh=rjS3B5mWhpbd9pHASuAh4XrXRxO7JH6ZfB0FfLu51cI9aBL5kjx1pzLfCZEvOLqoGqL=pzhxS2CQuZ8cKPuN92-=hSfm0MkrDfeQMi15ff3n1r4Vr-=OKIB=x6Pne43F_lZvXKjW_srDwqLudeGcS5EfXRRrJYNCOr-DlHRjbb60GsGPx1_GFRdYIHlk-JOwBQFlOcysqrwIoOZna32Kx4oZ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let b = 'A97nfY-IAQAAqoWs8TokCGd4ge9wiJWEtTySE7C1pLSDjEe4tzAzwKGvkJ2QASZebdKucn0ewH9eCOfvosJeCA=='
for (let i = 0; i < b.length; i+=2) {
    let n1 = b.charCodeAt(i)
    let n2 = b.charCodeAt(i+1)
    console.log(n1,n2, n1 << 16 | n2 )
    res.push(n1 << 16 | n2)
}
console.log(res+'')

[1, 147,  50, 194, 204, 152, 180, 131,  64, 139, 170, 159,
   46, 137, 179, 160,  78,  52,  56, 134,  92,  98, 147, 111,
  123,  77, 164, 251, 144, 151,  64,  45,   8, 210,  16, 122,
   64,  39, 236, 209, 135, 245, 192, 100, 251, 158,  99,  49,
   29,  36, 242,  67, 233,  33, 229,  27, 255,  50,  12,  67,
  159, 152, 223,  17, 105,  12, 244,  75,  37, 131, 161,  32,
   83, 215,  54, 120, 190,  29, 152, 148, 203, 176, 156, 226,
  101, 174, 220, 184, 116,  84, 173,  23,  77, 169, 244,  41,
  215, 201,  63,  87]


[
   1891353754, 1035793960,
  -1062579495,  971497754,
   2047861029,  453967604,
   1188017424,  886685092,
   1231819529,  845208169,
    104545809, 2142949960,
   2967616560,    1004220,
     26424002, -862407549
]
