Path: blob/master/node_modules/@bochilteam/scraper/lib/esm/utils.js
1126 views
export class ScraperError extends Error {1constructor(message, options) {2super(message);3this.name = 'ScraperError';4this.date = new Date();5this.message =6message +7'\n\nIf this is bug pls report to https://github.com/BochilTeam/scraper';8}9static createError(message, options) {10return new ScraperError(message, options);11}12}13export function decodeSnapApp(...args) {14// From reponse snap app15function _0xe78c(d, e, f) {16const g = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/'.split('');17const h = g.slice(0, e);18const i = g.slice(0, f);19// @ts-ignore20// eslint-disable-next-line array-callback-return21let j = d.split('').reverse().reduce(function (a, b, c) {22// eslint-disable-next-line no-return-assign23if (h.indexOf(b) !== -1)24return a += h.indexOf(b) * (Math.pow(e, c));25}, 0);26let k = '';27while (j > 0) {28k = i[j % f] + k;29j = (j - (j % f)) / f;30}31return k || '0';32}33function _0xc60e(h, u, n, t, e, r) {34r = '';35for (let i = 0, len = h.length; i < len; i++) {36let s = '';37while (h[i] !== n[e]) {38s += h[i];39i++;40}41for (let j = 0; j < n.length; j++) {42s = s.replace(new RegExp(n[j], 'g'), j.toString());43}44// @ts-ignore45r += String.fromCharCode((_0xe78c(s, e, 10) - t));46}47return decodeURIComponent(encodeURIComponent(r));48}49// @ts-ignore50return _0xc60e(...args);51}52//# sourceMappingURL=utils.js.map5354