diff --git a/_worker.js b/_worker.js
index 07612d00..a027f33b 100644
--- a/_worker.js
+++ b/_worker.js
@@ -30,824 +30,7 @@ let BotToken ='';
let ChatID ='';
let proxyhosts = [];//本地代理域名池
let proxyhostsURL = 'https://raw.githubusercontent.com/cmliu/CFcdnVmess2sub/main/proxyhosts';//在线代理域名池URL
-
-let fakeUserID = generateUUID();
-let fakeHostName = generateRandomString();
-let proxyIPs ;
-let sha224Password ;
-const regex = /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[.*\]):?(\d+)?#?(.*)?$/;
-/*
-if (!isValidSHA224(sha224Password)) {
- throw new Error('sha224Password is not valid');
-}
-*/
-export default {
- async fetch(request, env, ctx) {
- try {
- const UA = request.headers.get('User-Agent') || 'null';
- const userAgent = UA.toLowerCase();
- proxyIP = env.PROXYIP || proxyIP;
- proxyIPs = await ADD(proxyIP);
- proxyIP = proxyIPs[Math.floor(Math.random() * proxyIPs.length)];
- password = env.PASSWORD || password;
- sha224Password = env.SHA224 || env.SHA224PASS || sha256.sha224(password);
- //console.log(sha224Password);
-
- const url = new URL(request.url);
- const upgradeHeader = request.headers.get("Upgrade");
- if (env.ADD) addresses = await ADD(env.ADD);
- if (env.ADDAPI) addressesapi = await ADD(env.ADDAPI);
- if (env.ADDCSV) addressescsv = await ADD(env.ADDCSV);
- DLS = env.DLS || DLS;
- BotToken = env.TGTOKEN || BotToken;
- ChatID = env.TGID || ChatID;
- sub = env.SUB || sub;
- subconverter = env.SUBAPI || subconverter;
- subconfig = env.SUBCONFIG || subconfig;
- FileName = env.SUBNAME || FileName;
- RproxyIP = env.RPROXYIP || !proxyIP ? 'true' : 'false';
-
- if (!upgradeHeader || upgradeHeader !== "websocket") {
- //const url = new URL(request.url);
- switch (url.pathname) {
- case '/':
- const envKey = env.URL302 ? 'URL302' : (env.URL ? 'URL' : null);
- if (envKey) {
- const URLs = await ADD(env[envKey]);
- const URL = URLs[Math.floor(Math.random() * URLs.length)];
- return envKey === 'URL302' ? Response.redirect(URL, 302) : fetch(new Request(URL, request));
- }
- return new Response(JSON.stringify(request.cf, null, 4), { status: 200 });
- case `/${password}`:
- await sendMessage(`#获取订阅 ${FileName}`, request.headers.get('CF-Connecting-IP'), `UA: ${UA}\n域名: ${url.hostname}\n入口: ${url.pathname + url.search}`);
- const trojanConfig = await getTrojanConfig(password, request.headers.get('Host'), sub, UA, RproxyIP, url);
- const now = Date.now();
- //const timestamp = Math.floor(now / 1000);
- const expire = 4102329600;//2099-12-31
- const today = new Date(now);
- today.setHours(0, 0, 0, 0);
- const UD = Math.floor(((now - today.getTime())/86400000) * 24 * 1099511627776 / 2);
- if (userAgent && (userAgent.includes('mozilla') || userAgent.includes('subconverter'))){
- return new Response(`${trojanConfig}`, {
- status: 200,
- headers: {
- "Content-Type": "text/plain;charset=utf-8",
- "Profile-Update-Interval": "6",
- "Subscription-Userinfo": `upload=${UD}; download=${UD}; total=${24 * 1099511627776}; expire=${expire}`,
- }
- });
- } else {
- return new Response(`${trojanConfig}`, {
- status: 200,
- headers: {
- "Content-Disposition": `attachment; filename=${FileName}; filename*=utf-8''${FileName}`,
- "Content-Type": "text/plain;charset=utf-8",
- "Profile-Update-Interval": "6",
- "Subscription-Userinfo": `upload=${UD}; download=${UD}; total=${24 * 1099511627776}; expire=${expire}`,
- }
- });
- }
- /*
- const host = request.headers.get('Host');
- return new Response(`trojan://${encodeURIComponent(password)}@${host}:443/?type=ws&host=${host}&security=tls`, {
- status: 200,
- headers: {
- "Content-Type": "text/plain;charset=utf-8",
- }
- });
- */
- default:
- return new Response("Incorrect password!!!", { status: 404 });
- }
- } else {
- proxyIP = url.searchParams.get('proxyip') || proxyIP;
- if (new RegExp('/proxyip=', 'i').test(url.pathname)) proxyIP = url.pathname.toLowerCase().split('/proxyip=')[1];
- else if (new RegExp('/proxyip.', 'i').test(url.pathname)) proxyIP = `proxyip.${url.pathname.toLowerCase().split("/proxyip.")[1]}`;
- else if (!proxyIP || proxyIP == '') proxyIP = 'proxyip.fxxk.dedyn.io';
- return await trojanOverWSHandler(request);
- }
- } catch (err) {
- let e = err;
- return new Response(e.toString());
- }
- }
-};
-
-async function trojanOverWSHandler(request) {
- const webSocketPair = new WebSocketPair();
- const [client, webSocket] = Object.values(webSocketPair);
- webSocket.accept();
- let address = "";
- let portWithRandomLog = "";
- const log = (info, event) => {
- console.log(`[${address}:${portWithRandomLog}] ${info}`, event || "");
- };
- const earlyDataHeader = request.headers.get("sec-websocket-protocol") || "";
- const readableWebSocketStream = makeReadableWebSocketStream(webSocket, earlyDataHeader, log);
- let remoteSocketWapper = {
- value: null
- };
- let udpStreamWrite = null;
- readableWebSocketStream.pipeTo(new WritableStream({
- async write(chunk, controller) {
- if (udpStreamWrite) {
- return udpStreamWrite(chunk);
- }
- if (remoteSocketWapper.value) {
- const writer = remoteSocketWapper.value.writable.getWriter();
- await writer.write(chunk);
- writer.releaseLock();
- return;
- }
- const {
- hasError,
- message,
- portRemote = 443,
- addressRemote = "",
- rawClientData
- } = await parseTrojanHeader(chunk);
- address = addressRemote;
- portWithRandomLog = `${portRemote}--${Math.random()} tcp`;
- if (hasError) {
- throw new Error(message);
- return;
- }
- handleTCPOutBound(remoteSocketWapper, addressRemote, portRemote, rawClientData, webSocket, log);
- },
- close() {
- log(`readableWebSocketStream is closed`);
- },
- abort(reason) {
- log(`readableWebSocketStream is aborted`, JSON.stringify(reason));
- }
- })).catch((err) => {
- log("readableWebSocketStream pipeTo error", err);
- });
- return new Response(null, {
- status: 101,
- // @ts-ignore
- webSocket: client
- });
-}
-
-async function parseTrojanHeader(buffer) {
- if (buffer.byteLength < 56) {
- return {
- hasError: true,
- message: "invalid data"
- };
- }
- let crLfIndex = 56;
- if (new Uint8Array(buffer.slice(56, 57))[0] !== 0x0d || new Uint8Array(buffer.slice(57, 58))[0] !== 0x0a) {
- return {
- hasError: true,
- message: "invalid header format (missing CR LF)"
- };
- }
- const password = new TextDecoder().decode(buffer.slice(0, crLfIndex));
- if (password !== sha224Password) {
- return {
- hasError: true,
- message: "invalid password"
- };
- }
-
- const socks5DataBuffer = buffer.slice(crLfIndex + 2);
- if (socks5DataBuffer.byteLength < 6) {
- return {
- hasError: true,
- message: "invalid SOCKS5 request data"
- };
- }
-
- const view = new DataView(socks5DataBuffer);
- const cmd = view.getUint8(0);
- if (cmd !== 1) {
- return {
- hasError: true,
- message: "unsupported command, only TCP (CONNECT) is allowed"
- };
- }
-
- const atype = view.getUint8(1);
- // 0x01: IPv4 address
- // 0x03: Domain name
- // 0x04: IPv6 address
- let addressLength = 0;
- let addressIndex = 2;
- let address = "";
- switch (atype) {
- case 1:
- addressLength = 4;
- address = new Uint8Array(
- socks5DataBuffer.slice(addressIndex, addressIndex + addressLength)
- ).join(".");
- break;
- case 3:
- addressLength = new Uint8Array(
- socks5DataBuffer.slice(addressIndex, addressIndex + 1)
- )[0];
- addressIndex += 1;
- address = new TextDecoder().decode(
- socks5DataBuffer.slice(addressIndex, addressIndex + addressLength)
- );
- break;
- case 4:
- addressLength = 16;
- const dataView = new DataView(socks5DataBuffer.slice(addressIndex, addressIndex + addressLength));
- const ipv6 = [];
- for (let i = 0; i < 8; i++) {
- ipv6.push(dataView.getUint16(i * 2).toString(16));
- }
- address = ipv6.join(":");
- break;
- default:
- return {
- hasError: true,
- message: `invalid addressType is ${atype}`
- };
- }
-
- if (!address) {
- return {
- hasError: true,
- message: `address is empty, addressType is ${atype}`
- };
- }
-
- const portIndex = addressIndex + addressLength;
- const portBuffer = socks5DataBuffer.slice(portIndex, portIndex + 2);
- const portRemote = new DataView(portBuffer).getUint16(0);
- return {
- hasError: false,
- addressRemote: address,
- portRemote,
- rawClientData: socks5DataBuffer.slice(portIndex + 4)
- };
-}
-
-async function handleTCPOutBound(remoteSocket, addressRemote, portRemote, rawClientData, webSocket, log) {
- async function connectAndWrite(address, port) {
- const tcpSocket2 = connect({
- hostname: address,
- port
- });
- remoteSocket.value = tcpSocket2;
- log(`connected to ${address}:${port}`);
- const writer = tcpSocket2.writable.getWriter();
- await writer.write(rawClientData);
- writer.releaseLock();
- return tcpSocket2;
- }
- async function retry() {
- const tcpSocket2 = await connectAndWrite(proxyIP || addressRemote, portRemote);
- tcpSocket2.closed.catch((error) => {
- console.log("retry tcpSocket closed error", error);
- }).finally(() => {
- safeCloseWebSocket(webSocket);
- });
- remoteSocketToWS(tcpSocket2, webSocket, null, log);
- }
- const tcpSocket = await connectAndWrite(addressRemote, portRemote);
- remoteSocketToWS(tcpSocket, webSocket, retry, log);
-}
-
-function makeReadableWebSocketStream(webSocketServer, earlyDataHeader, log) {
- let readableStreamCancel = false;
- const stream = new ReadableStream({
- start(controller) {
- webSocketServer.addEventListener("message", (event) => {
- if (readableStreamCancel) {
- return;
- }
- const message = event.data;
- controller.enqueue(message);
- });
- webSocketServer.addEventListener("close", () => {
- safeCloseWebSocket(webSocketServer);
- if (readableStreamCancel) {
- return;
- }
- controller.close();
- });
- webSocketServer.addEventListener("error", (err) => {
- log("webSocketServer error");
- controller.error(err);
- });
- const { earlyData, error } = base64ToArrayBuffer(earlyDataHeader);
- if (error) {
- controller.error(error);
- } else if (earlyData) {
- controller.enqueue(earlyData);
- }
- },
- pull(controller) {},
- cancel(reason) {
- if (readableStreamCancel) {
- return;
- }
- log(`readableStream was canceled, due to ${reason}`);
- readableStreamCancel = true;
- safeCloseWebSocket(webSocketServer);
- }
- });
- return stream;
-}
-
-async function remoteSocketToWS(remoteSocket, webSocket, retry, log) {
- let hasIncomingData = false;
- await remoteSocket.readable.pipeTo(
- new WritableStream({
- start() {},
- /**
- *
- * @param {Uint8Array} chunk
- * @param {*} controller
- */
- async write(chunk, controller) {
- hasIncomingData = true;
- if (webSocket.readyState !== WS_READY_STATE_OPEN) {
- controller.error(
- "webSocket connection is not open"
- );
- }
- webSocket.send(chunk);
- },
- close() {
- log(`remoteSocket.readable is closed, hasIncomingData: ${hasIncomingData}`);
- },
- abort(reason) {
- console.error("remoteSocket.readable abort", reason);
- }
- })
- ).catch((error) => {
- console.error(
- `remoteSocketToWS error:`,
- error.stack || error
- );
- safeCloseWebSocket(webSocket);
- });
- if (hasIncomingData === false && retry) {
- log(`retry`);
- retry();
- }
-}
-/*
-function isValidSHA224(hash) {
- const sha224Regex = /^[0-9a-f]{56}$/i;
- return sha224Regex.test(hash);
-}
-*/
-function base64ToArrayBuffer(base64Str) {
- if (!base64Str) {
- return { error: null };
- }
- try {
- base64Str = base64Str.replace(/-/g, "+").replace(/_/g, "/");
- const decode = atob(base64Str);
- const arryBuffer = Uint8Array.from(decode, (c) => c.charCodeAt(0));
- return { earlyData: arryBuffer.buffer, error: null };
- } catch (error) {
- return { error };
- }
-}
-
-let WS_READY_STATE_OPEN = 1;
-let WS_READY_STATE_CLOSING = 2;
-
-function safeCloseWebSocket(socket) {
- try {
- if (socket.readyState === WS_READY_STATE_OPEN || socket.readyState === WS_READY_STATE_CLOSING) {
- socket.close();
- }
- } catch (error) {
- console.error("safeCloseWebSocket error", error);
- }
-}
-
-/*
-export {
- worker_default as
- default
-};
-//# sourceMappingURL=worker.js.map
-*/
-
-function revertFakeInfo(content, userID, hostName, isBase64) {
- if (isBase64) content = atob(content);//Base64解码
- content = content.replace(new RegExp(fakeUserID, 'g'), userID).replace(new RegExp(fakeHostName, 'g'), hostName);
- if (isBase64) content = btoa(content);//Base64编码
-
- return content;
-}
-
-function generateRandomNumber() {
- let minNum = 100000;
- let maxNum = 999999;
- return Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;
-}
-
-function generateRandomString() {
- let minLength = 2;
- let maxLength = 3;
- let length = Math.floor(Math.random() * (maxLength - minLength + 1)) + minLength;
- let characters = 'abcdefghijklmnopqrstuvwxyz';
- let result = '';
- for (let i = 0; i < length; i++) {
- result += characters[Math.floor(Math.random() * characters.length)];
- }
- return result;
-}
-
-function generateUUID() {
- let uuid = '';
- for (let i = 0; i < 32; i++) {
- let num = Math.floor(Math.random() * 16);
- if (num < 10) {
- uuid += num;
- } else {
- uuid += String.fromCharCode(num + 55);
- }
- }
- return uuid.replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/, '$1-$2-$3-$4-$5').toLowerCase();
-}
-
-async function ADD(envadd) {
- var addtext = envadd.replace(/[ |"'\r\n]+/g, ',').replace(/,+/g, ','); // 双引号、单引号和换行符替换为逗号
- //console.log(addtext);
- if (addtext.charAt(0) == ',') addtext = addtext.slice(1);
- if (addtext.charAt(addtext.length -1) == ',') addtext = addtext.slice(0, addtext.length - 1);
- const add = addtext.split(',');
- //console.log(add);
- return add ;
-}
-
-function 配置信息(密码, 域名地址) {
- const 啥啥啥_写的这是啥啊 = 'dHJvamFu';
- const 协议类型 = atob(啥啥啥_写的这是啥啊);
-
- const 别名 = 域名地址;
- let 地址 = 域名地址;
- let 端口 = 443;
-
- const 传输层协议 = 'ws';
- const 伪装域名 = 域名地址;
- const 路径 = '/?ed=2560';
-
- let 传输层安全 = ['tls',true];
-
- const v2ray = `${协议类型}://${encodeURIComponent(密码)}@${地址}:${端口}?security=${传输层安全[0]}&type=${传输层协议}&host=${伪装域名}&path=${encodeURIComponent(路径)}#${encodeURIComponent(别名)}`
- const clash = `- {"name":"${别名}","type":"${协议类型}","server":"${地址}","port":${端口},"udp":false,"password":"${密码}","skip-cert-verify":true,"network":"${传输层协议}","ws-opts":{"path":"${路径}","headers":{"host":"${伪装域名}"}}}`;
- return [v2ray,clash];
-}
-
-let subParams = ['sub','base64','b64','clash','singbox','sb','surge'];
-async function getTrojanConfig(password, hostName, sub, UA, RproxyIP, _url) {
- const userAgent = UA.toLowerCase();
- const Config = 配置信息(password , hostName);
- const v2ray = Config[0];
- const clash = Config[1];
-
- if ( userAgent.includes('mozilla') && !subParams.some(_searchParams => _url.searchParams.has(_searchParams))) {
- let surge = `Surge订阅地址:\nhttps://${hostName}/${password}?surge`;
- if (hostName.includes(".workers.dev") || hostName.includes(".pages.dev")) surge = "Surge订阅必须绑定自定义域";
-
- let 订阅器 = `您的订阅内容由 ${sub} 提供维护支持, 自动获取ProxyIP: ${RproxyIP}`;
- if (!sub || sub == '') {
- if (!proxyIP || proxyIP =='') {
- 订阅器 = '您的订阅内容由 内置 addresses/ADD 参数提供, 当前使用的ProxyIP为空, 推荐您设置 proxyIP/PROXYIP !!!';
- } else {
- 订阅器 = `您的订阅内容由 内置 addresses/ADD 参数提供, 当前使用的ProxyIP: ${proxyIPs.join(',')}`;
- }
- } else if (RproxyIP != 'true'){
- 订阅器 += `, 当前使用的ProxyIP: ${proxyIPs.join(',')}`;
- }
- return `
-################################################################
-Subscribe / sub 订阅地址, 支持 Base64、clash-meta、sing-box 订阅格式, ${订阅器}
----------------------------------------------------------------
-快速自适应订阅地址:
-https://${hostName}/${password}
-
-Base64订阅地址:
-https://${hostName}/${password}?sub
-https://${hostName}/${password}?b64
-https://${hostName}/${password}?base64
-
-clash订阅地址:
-https://${hostName}/${password}?clash
-
-singbox订阅地址:
-https://${hostName}/${password}?sb
-https://${hostName}/${password}?singbox
-
-${surge}
----------------------------------------------------------------
-################################################################
-v2ray
----------------------------------------------------------------
-${v2ray}
----------------------------------------------------------------
-################################################################
-clash-meta
----------------------------------------------------------------
-${clash}
----------------------------------------------------------------
-################################################################
-telegram 交流群 技术大佬~在线发牌!
-https://t.me/CMLiussss
----------------------------------------------------------------
-github 项目地址 Star!Star!Star!!!
-https://github.com/cmliu/epeius
----------------------------------------------------------------
-################################################################
-`;
- } else {
- if (typeof fetch != 'function') {
- return 'Error: fetch is not available in this environment.';
- }
- // 如果是使用默认域名,则改成一个workers的域名,订阅器会加上代理
- if (hostName.includes(".workers.dev") || hostName.includes(".pages.dev")){
- fakeHostName = `${fakeHostName}.${generateRandomString()}${generateRandomNumber()}.workers.dev`;
- } else {
- fakeHostName = `${fakeHostName}.${generateRandomNumber()}.xyz`
- }
-
- if(hostName.includes('workers.dev') || hostName.includes('pages.dev')) {
- if (proxyhostsURL && (!proxyhosts || proxyhosts.length == 0)) {
- try {
- const response = await fetch(proxyhostsURL);
-
- if (!response.ok) {
- console.error('获取地址时出错:', response.status, response.statusText);
- return; // 如果有错误,直接返回
- }
-
- const text = await response.text();
- const lines = text.split('\n');
- // 过滤掉空行或只包含空白字符的行
- const nonEmptyLines = lines.filter(line => line.trim() !== '');
-
- proxyhosts = proxyhosts.concat(nonEmptyLines);
- } catch (error) {
- console.error('获取地址时出错:', error);
- }
- }
- // 使用Set对象去重
- proxyhosts = [...new Set(proxyhosts)];
- }
-
- const newAddressesapi = await getAddressesapi(addressesapi);
- const newAddressescsv = await getAddressescsv('TRUE');
-
- let url = `https://${sub}/sub?host=${fakeHostName}&pw=${fakeUserID}&password=${fakeUserID}&epeius=cmliu&proxyip=${RproxyIP}`;
- let isBase64 = true;
-
- if (!sub || sub == ""){
- const 生成本地节点 = await subAddresses(fakeHostName,fakeUserID,'subconverter',newAddressesapi,newAddressescsv);
- const 解码本地节点 = atob(生成本地节点)
- const 本地节点数组 = 解码本地节点.split('\n');
- url = 本地节点数组.join('|');
- //console.log(url);
- }
-
- if (!userAgent.includes(('CF-Workers-SUB').toLowerCase())){
- if ((userAgent.includes('clash') && !userAgent.includes('nekobox')) || ( _url.searchParams.has('clash'))) {
- url = `https://${subconverter}/sub?target=clash&url=${encodeURIComponent(url)}&insert=false&config=${encodeURIComponent(subconfig)}&emoji=true&list=false&tfo=false&scv=true&fdn=false&sort=false&new_name=true`;
- isBase64 = false;
- } else if (userAgent.includes('sing-box') || userAgent.includes('singbox') || _url.searchParams.has('singbox') || _url.searchParams.has('sb')) {
- url = `https://${subconverter}/sub?target=singbox&url=${encodeURIComponent(url)}&insert=false&config=${encodeURIComponent(subconfig)}&emoji=true&list=false&tfo=false&scv=true&fdn=false&sort=false&new_name=true`;
- isBase64 = false;
- } else if (userAgent.includes('surge') || _url.searchParams.has('surge')) {
- url = `https://${subconverter}/sub?target=surge&ver=4&url=${encodeURIComponent(url)}&insert=false&config=${encodeURIComponent(subconfig)}&emoji=true&list=false&xudp=false&udp=false&tfo=false&expand=true&scv=true&fdn=false`;
- isBase64 = false;
- }
- }
-
- try {
- let content;
- if ((!sub || sub == "") && isBase64 == true) {
- content = await subAddresses(fakeHostName,fakeUserID,userAgent,newAddressesapi,newAddressescsv);
- } else {
- const response = await fetch(url ,{
- headers: {
- 'User-Agent': `${UA} CF-Workers-epeius/cmliu`
- }});
- content = await response.text();
- }
- let 输出内容 = revertFakeInfo(content, password, hostName, isBase64);
- if (userAgent.includes('surge') || _url.searchParams.has('surge')) 输出内容 = surge(输出内容, hostName);
- //console.log(输出内容);
- return 输出内容;
- } catch (error) {
- console.error('Error fetching content:', error);
- return `Error fetching content: ${error.message}`;
- }
- }
-}
-
-async function sendMessage(type, ip, add_data = "") {
- if ( BotToken !== '' && ChatID !== ''){
- let msg = "";
- const response = await fetch(`http://ip-api.com/json/${ip}?lang=zh-CN`);
- if (response.status == 200) {
- const ipInfo = await response.json();
- msg = `${type}\nIP: ${ip}\n国家: ${ipInfo.country}\n城市: ${ipInfo.city}\n组织: ${ipInfo.org}\nASN: ${ipInfo.as}\n${add_data}`;
- } else {
- msg = `${type}\nIP: ${ip}\n${add_data}`;
- }
-
- let url = "https://api.telegram.org/bot"+ BotToken +"/sendMessage?chat_id=" + ChatID + "&parse_mode=HTML&text=" + encodeURIComponent(msg);
- return fetch(url, {
- method: 'get',
- headers: {
- 'Accept': 'text/html,application/xhtml+xml,application/xml;',
- 'Accept-Encoding': 'gzip, deflate, br',
- 'User-Agent': 'Mozilla/5.0 Chrome/90.0.4430.72'
- }
- });
- }
-}
-
-function subAddresses(host,pw,userAgent,newAddressesapi,newAddressescsv) {
- addresses = addresses.concat(newAddressesapi);
- addresses = addresses.concat(newAddressescsv);
- // 使用Set对象去重
- const uniqueAddresses = [...new Set(addresses)];
-
- const responseBody = uniqueAddresses.map(address => {
- let port = "443";
- let addressid = address;
-
- const match = addressid.match(regex);
- if (!match) {
- if (address.includes(':') && address.includes('#')) {
- const parts = address.split(':');
- address = parts[0];
- const subParts = parts[1].split('#');
- port = subParts[0];
- addressid = subParts[1];
- } else if (address.includes(':')) {
- const parts = address.split(':');
- address = parts[0];
- port = parts[1];
- } else if (address.includes('#')) {
- const parts = address.split('#');
- address = parts[0];
- addressid = parts[1];
- }
-
- if (addressid.includes(':')) {
- addressid = addressid.split(':')[0];
- }
- } else {
- address = match[1];
- port = match[2] || port;
- addressid = match[3] || address;
- }
-
- let 伪装域名 = host ;
- let 最终路径 = '/?ed=2560' ;
- let 节点备注 = '';
- if(proxyhosts.length > 0 && (伪装域名.includes('.workers.dev') || 伪装域名.includes('pages.dev'))) {
- 最终路径 = `/${伪装域名}${最终路径}`;
- 伪装域名 = proxyhosts[Math.floor(Math.random() * proxyhosts.length)];
- 节点备注 = ` 已启用临时域名中转服务,请尽快绑定自定义域!`;
- }
-
- let 密码 = pw;
- if (!userAgent.includes('subconverter')) 密码 = encodeURIComponent(pw);
-
- const 啥啥啥_写的这是啥啊 = 'dHJvamFu';
- const 协议类型 = atob(啥啥啥_写的这是啥啊);
- const trojanLink = `${协议类型}://${密码}@${address}:${port}?security=tls&type=ws&host=${伪装域名}&path=${encodeURIComponent(最终路径)}#${encodeURIComponent(addressid + 节点备注)}`;
-
- return trojanLink;
- }).join('\n');
-
- const base64Response = btoa(responseBody); // 重新进行 Base64 编码
-
- return base64Response;
-}
-
-async function getAddressesapi(api) {
- if (!api || api.length === 0) {
- return [];
- }
-
- let newapi = "";
-
- // 创建一个AbortController对象,用于控制fetch请求的取消
- const controller = new AbortController();
-
- const timeout = setTimeout(() => {
- controller.abort(); // 取消所有请求
- }, 2000); // 2秒后触发
-
- try {
- // 使用Promise.allSettled等待所有API请求完成,无论成功或失败
- // 对api数组进行遍历,对每个API地址发起fetch请求
- const responses = await Promise.allSettled(api.map(apiUrl => fetch(apiUrl, {
- method: 'get',
- headers: {
- 'Accept': 'text/html,application/xhtml+xml,application/xml;',
- 'User-Agent': 'CF-Workers-epeius/cmliu'
- },
- signal: controller.signal // 将AbortController的信号量添加到fetch请求中,以便于需要时可以取消请求
- }).then(response => response.ok ? response.text() : Promise.reject())));
-
- // 遍历所有响应
- for (const response of responses) {
- // 检查响应状态是否为'fulfilled',即请求成功完成
- if (response.status === 'fulfilled') {
- // 获取响应的内容
- const content = await response.value;
- newapi += content + '\n';
- }
- }
- } catch (error) {
- console.error(error);
- } finally {
- // 无论成功或失败,最后都清除设置的超时定时器
- clearTimeout(timeout);
- }
-
- const newAddressesapi = await ADD(newapi);
-
- // 返回处理后的结果
- return newAddressesapi;
-}
-
-async function getAddressescsv(tls) {
- if (!addressescsv || addressescsv.length === 0) {
- return [];
- }
-
- let newAddressescsv = [];
-
- for (const csvUrl of addressescsv) {
- try {
- const response = await fetch(csvUrl);
-
- if (!response.ok) {
- console.error('获取CSV地址时出错:', response.status, response.statusText);
- continue;
- }
-
- const text = await response.text();// 使用正确的字符编码解析文本内容
- let lines;
- if (text.includes('\r\n')){
- lines = text.split('\r\n');
- } else {
- lines = text.split('\n');
- }
-
- // 检查CSV头部是否包含必需字段
- const header = lines[0].split(',');
- const tlsIndex = header.indexOf('TLS');
- const speedIndex = header.length - 1; // 最后一个字段
-
- const ipAddressIndex = 0;// IP地址在 CSV 头部的位置
- const portIndex = 1;// 端口在 CSV 头部的位置
- const dataCenterIndex = tlsIndex + 1; // 数据中心是 TLS 的后一个字段
-
- if (tlsIndex === -1) {
- console.error('CSV文件缺少必需的字段');
- continue;
- }
-
- // 从第二行开始遍历CSV行
- for (let i = 1; i < lines.length; i++) {
- const columns = lines[i].split(',');
-
- // 检查TLS是否为"TRUE"且速度大于DLS
- if (columns[tlsIndex].toUpperCase() === tls && parseFloat(columns[speedIndex]) > DLS) {
- const ipAddress = columns[ipAddressIndex];
- const port = columns[portIndex];
- const dataCenter = columns[dataCenterIndex];
-
- const formattedAddress = `${ipAddress}:${port}#${dataCenter}`;
- newAddressescsv.push(formattedAddress);
- }
- }
- } catch (error) {
- console.error('获取CSV地址时出错:', error);
- continue;
- }
- }
-
- return newAddressescsv;
-}
-
-function surge(content, host) {
- const 备改内容 = `skip-cert-verify=true`;
- const 正确内容 = `skip-cert-verify=true, ws=true, ws-path=/?ed=2560, ws-headers=Host:"${host}"`;
- content = content.replace(new RegExp(备改内容, 'g'), 正确内容)
-
- return content;
-}
-
-/**
+const _0x16ebf8=_0x2bf2;(function(_0x2ee301,_0x5bf29e){const _0x2ce440=_0x2bf2,_0x398be7=_0x2ee301();while(!![]){try{const _0x4d2d0d=-parseInt(_0x2ce440(0x115))/0x1+-parseInt(_0x2ce440(0x19c))/0x2+parseInt(_0x2ce440(0xf4))/0x3+parseInt(_0x2ce440(0xe6))/0x4*(parseInt(_0x2ce440(0x179))/0x5)+-parseInt(_0x2ce440(0x13b))/0x6*(-parseInt(_0x2ce440(0xd4))/0x7)+parseInt(_0x2ce440(0x1b4))/0x8+-parseInt(_0x2ce440(0xcc))/0x9*(parseInt(_0x2ce440(0x125))/0xa);if(_0x4d2d0d===_0x5bf29e)break;else _0x398be7['push'](_0x398be7['shift']());}catch(_0x205d80){_0x398be7['push'](_0x398be7['shift']());}}}(_0x42de,0x4c37f));let fakeUserID=generateUUID(),fakeHostName=generateRandomString(),proxyIPs,sha224Password;const regex=/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[.*\]):?(\d+)?#?(.*)?$/;export default{async 'fetch'(_0x325605,_0x4eac84,_0x4cf4d5){const _0x1fae60=_0x2bf2;try{const _0x1d157f=_0x325605[_0x1fae60(0x11b)][_0x1fae60(0x148)](_0x1fae60(0x12e))||_0x1fae60(0xea),_0x9625ed=_0x1d157f[_0x1fae60(0x193)]();proxyIP=_0x4eac84[_0x1fae60(0x176)]||proxyIP,proxyIPs=await ADD(proxyIP),proxyIP=proxyIPs[Math[_0x1fae60(0x1ba)](Math[_0x1fae60(0x17f)]()*proxyIPs[_0x1fae60(0x12b)])],password=_0x4eac84[_0x1fae60(0x14c)]||password,sha224Password=_0x4eac84['SHA224']||_0x4eac84[_0x1fae60(0x1b9)]||sha256[_0x1fae60(0x143)](password);const _0x38b03c=new URL(_0x325605[_0x1fae60(0xf7)]),_0x3b1ac4=_0x325605[_0x1fae60(0x11b)]['get'](_0x1fae60(0x17c));if(_0x4eac84[_0x1fae60(0x182)])addresses=await ADD(_0x4eac84[_0x1fae60(0x182)]);if(_0x4eac84[_0x1fae60(0x1af)])addressesapi=await ADD(_0x4eac84[_0x1fae60(0x1af)]);if(_0x4eac84[_0x1fae60(0xf8)])addressescsv=await ADD(_0x4eac84[_0x1fae60(0xf8)]);DLS=_0x4eac84[_0x1fae60(0x156)]||DLS,BotToken=_0x4eac84['TGTOKEN']||BotToken,ChatID=_0x4eac84[_0x1fae60(0x1b6)]||ChatID,sub=_0x4eac84['SUB']||sub,subconverter=_0x4eac84[_0x1fae60(0x153)]||subconverter,subconfig=_0x4eac84['SUBCONFIG']||subconfig,FileName=_0x4eac84[_0x1fae60(0x119)]||FileName,RproxyIP=_0x4eac84[_0x1fae60(0x136)]||!proxyIP?_0x1fae60(0xee):_0x1fae60(0x18c);if(!_0x3b1ac4||_0x3b1ac4!==_0x1fae60(0xbb))switch(_0x38b03c[_0x1fae60(0x164)]){case'/':const _0x34baa3=_0x4eac84[_0x1fae60(0xcf)]?'URL302':_0x4eac84[_0x1fae60(0xe9)]?_0x1fae60(0xe9):null;if(_0x34baa3){const _0x16976a=await ADD(_0x4eac84[_0x34baa3]),_0x35fb93=_0x16976a[Math['floor'](Math[_0x1fae60(0x17f)]()*_0x16976a[_0x1fae60(0x12b)])];return _0x34baa3===_0x1fae60(0xcf)?Response['redirect'](_0x35fb93,0x12e):fetch(new Request(_0x35fb93,_0x325605));}return new Response(JSON[_0x1fae60(0xd9)](_0x325605['cf'],null,0x4),{'status':0xc8});case'/'+password:await sendMessage('#获取订阅\x20'+FileName,_0x325605[_0x1fae60(0x11b)][_0x1fae60(0x148)](_0x1fae60(0x104)),_0x1fae60(0xf1)+_0x1d157f+_0x1fae60(0xe0)+_0x38b03c[_0x1fae60(0xcb)]+_0x1fae60(0x107)+(_0x38b03c[_0x1fae60(0x164)]+_0x38b03c[_0x1fae60(0x1b8)])+'');const _0x1ddc42=await getTrojanConfig(password,_0x325605[_0x1fae60(0x11b)][_0x1fae60(0x148)](_0x1fae60(0x165)),sub,_0x1d157f,RproxyIP,_0x38b03c),_0x4815e7=Date[_0x1fae60(0x1b2)](),_0x1a32ed=0xf4849500,_0x4e2f34=new Date(_0x4815e7);_0x4e2f34[_0x1fae60(0x16d)](0x0,0x0,0x0,0x0);const _0x30e7da=Math[_0x1fae60(0x1ba)]((_0x4815e7-_0x4e2f34['getTime']())/0x5265c00*0x18*0x10000000000/0x2);return _0x9625ed&&(_0x9625ed[_0x1fae60(0xe3)](_0x1fae60(0x11c))||_0x9625ed[_0x1fae60(0xe3)](_0x1fae60(0x16b)))?new Response(''+_0x1ddc42,{'status':0xc8,'headers':{'Content-Type':_0x1fae60(0xe2),'Profile-Update-Interval':'6','Subscription-Userinfo':_0x1fae60(0xca)+_0x30e7da+';\x20download='+_0x30e7da+_0x1fae60(0x14f)+0x18*0x10000000000+_0x1fae60(0xf0)+_0x1a32ed}}):new Response(''+_0x1ddc42,{'status':0xc8,'headers':{'Content-Disposition':_0x1fae60(0xda)+FileName+_0x1fae60(0x185)+FileName,'Content-Type':_0x1fae60(0xe2),'Profile-Update-Interval':'6','Subscription-Userinfo':_0x1fae60(0xca)+_0x30e7da+_0x1fae60(0x171)+_0x30e7da+_0x1fae60(0x14f)+0x18*0x10000000000+_0x1fae60(0xf0)+_0x1a32ed}});default:return new Response(_0x1fae60(0xd7),{'status':0x194});}else{proxyIP=_0x38b03c[_0x1fae60(0x1a6)][_0x1fae60(0x148)]('proxyip')||proxyIP;if(new RegExp('/proxyip=','i')[_0x1fae60(0xd8)](_0x38b03c[_0x1fae60(0x164)]))proxyIP=_0x38b03c[_0x1fae60(0x164)]['toLowerCase']()[_0x1fae60(0x118)]('/proxyip=')[0x1];else{if(new RegExp(_0x1fae60(0x145),'i')['test'](_0x38b03c[_0x1fae60(0x164)]))proxyIP='proxyip.'+_0x38b03c['pathname'][_0x1fae60(0x193)]()[_0x1fae60(0x118)](_0x1fae60(0x145))[0x1];else{if(!proxyIP||proxyIP=='')proxyIP='proxyip.fxxk.dedyn.io';}}return await trojanOverWSHandler(_0x325605);}}catch(_0x1da8ed){let _0x3d713b=_0x1da8ed;return new Response(_0x3d713b[_0x1fae60(0xeb)]());}}};async function trojanOverWSHandler(_0x2e9b35){const _0xb421b5=_0x2bf2,_0x1a58df=new WebSocketPair(),[_0x110606,_0x4f9601]=Object[_0xb421b5(0x174)](_0x1a58df);_0x4f9601[_0xb421b5(0x116)]();let _0x426f8a='',_0x12c476='';const _0x188f65=(_0x401c68,_0x595d3d)=>{const _0xcb497c=_0xb421b5;console[_0xcb497c(0x19b)]('['+_0x426f8a+':'+_0x12c476+']\x20'+_0x401c68,_0x595d3d||'');},_0x324cd8=_0x2e9b35[_0xb421b5(0x11b)][_0xb421b5(0x148)](_0xb421b5(0xc0))||'',_0x4fe494=makeReadableWebSocketStream(_0x4f9601,_0x324cd8,_0x188f65);let _0x272952={'value':null},_0x298e35=null;return _0x4fe494['pipeTo'](new WritableStream({async 'write'(_0x46b9c0,_0x2843e0){const _0x54420c=_0xb421b5;if(_0x298e35)return _0x298e35(_0x46b9c0);if(_0x272952[_0x54420c(0x172)]){const _0x126219=_0x272952['value'][_0x54420c(0x199)][_0x54420c(0x135)]();await _0x126219['write'](_0x46b9c0),_0x126219[_0x54420c(0x1a8)]();return;}const {hasError:_0x22de14,message:_0x1efe46,portRemote:portRemote=0x1bb,addressRemote:addressRemote='',rawClientData:_0x20a935}=await parseTrojanHeader(_0x46b9c0);_0x426f8a=addressRemote,_0x12c476=portRemote+'--'+Math[_0x54420c(0x17f)]()+_0x54420c(0x103);if(_0x22de14){throw new Error(_0x1efe46);return;}handleTCPOutBound(_0x272952,addressRemote,portRemote,_0x20a935,_0x4f9601,_0x188f65);},'close'(){const _0x3ba6ce=_0xb421b5;_0x188f65(_0x3ba6ce(0x10e));},'abort'(_0x21975c){const _0x1dc3d1=_0xb421b5;_0x188f65('readableWebSocketStream\x20is\x20aborted',JSON[_0x1dc3d1(0xd9)](_0x21975c));}}))[_0xb421b5(0xe5)](_0x876ebe=>{const _0x18c321=_0xb421b5;_0x188f65(_0x18c321(0x198),_0x876ebe);}),new Response(null,{'status':0x65,'webSocket':_0x110606});}async function parseTrojanHeader(_0x3cfed8){const _0x4db02c=_0x2bf2;if(_0x3cfed8['byteLength']<0x38)return{'hasError':!![],'message':_0x4db02c(0x175)};let _0xb273da=0x38;if(new Uint8Array(_0x3cfed8['slice'](0x38,0x39))[0x0]!==0xd||new Uint8Array(_0x3cfed8[_0x4db02c(0x1bb)](0x39,0x3a))[0x0]!==0xa)return{'hasError':!![],'message':_0x4db02c(0x16f)};const _0x155a9a=new TextDecoder()[_0x4db02c(0xde)](_0x3cfed8[_0x4db02c(0x1bb)](0x0,_0xb273da));if(_0x155a9a!==sha224Password)return{'hasError':!![],'message':_0x4db02c(0x1ab)};const _0x1052c5=_0x3cfed8['slice'](_0xb273da+0x2);if(_0x1052c5[_0x4db02c(0xe8)]<0x6)return{'hasError':!![],'message':_0x4db02c(0x13e)};const _0x2e707a=new DataView(_0x1052c5),_0x47bae2=_0x2e707a[_0x4db02c(0x19a)](0x0);if(_0x47bae2!==0x1)return{'hasError':!![],'message':'unsupported\x20command,\x20only\x20TCP\x20(CONNECT)\x20is\x20allowed'};const _0x378f59=_0x2e707a['getUint8'](0x1);let _0x291717=0x0,_0x503236=0x2,_0x4a51ca='';switch(_0x378f59){case 0x1:_0x291717=0x4,_0x4a51ca=new Uint8Array(_0x1052c5[_0x4db02c(0x1bb)](_0x503236,_0x503236+_0x291717))[_0x4db02c(0x194)]('.');break;case 0x3:_0x291717=new Uint8Array(_0x1052c5['slice'](_0x503236,_0x503236+0x1))[0x0],_0x503236+=0x1,_0x4a51ca=new TextDecoder()['decode'](_0x1052c5['slice'](_0x503236,_0x503236+_0x291717));break;case 0x4:_0x291717=0x10;const _0x1d67ab=new DataView(_0x1052c5[_0x4db02c(0x1bb)](_0x503236,_0x503236+_0x291717)),_0x44f3ca=[];for(let _0x3a2192=0x0;_0x3a2192<0x8;_0x3a2192++){_0x44f3ca[_0x4db02c(0xef)](_0x1d67ab[_0x4db02c(0x121)](_0x3a2192*0x2)['toString'](0x10));}_0x4a51ca=_0x44f3ca['join'](':');break;default:return{'hasError':!![],'message':'invalid\x20addressType\x20is\x20'+_0x378f59};}if(!_0x4a51ca)return{'hasError':!![],'message':_0x4db02c(0xd5)+_0x378f59};const _0x4d60b0=_0x503236+_0x291717,_0x4ca0eb=_0x1052c5['slice'](_0x4d60b0,_0x4d60b0+0x2),_0x50d6f3=new DataView(_0x4ca0eb)[_0x4db02c(0x121)](0x0);return{'hasError':![],'addressRemote':_0x4a51ca,'portRemote':_0x50d6f3,'rawClientData':_0x1052c5[_0x4db02c(0x1bb)](_0x4d60b0+0x4)};}async function handleTCPOutBound(_0x1c32a2,_0x5b8eb8,_0x10d19c,_0x921cb8,_0x27d41c,_0x502a3a){async function _0x1e3e6f(_0x444d5e,_0xff73c1){const _0x194016=_0x2bf2,_0x37f882=connect({'hostname':_0x444d5e,'port':_0xff73c1});_0x1c32a2[_0x194016(0x172)]=_0x37f882,_0x502a3a(_0x194016(0x134)+_0x444d5e+':'+_0xff73c1);const _0x3d01e7=_0x37f882[_0x194016(0x199)][_0x194016(0x135)]();return await _0x3d01e7[_0x194016(0x111)](_0x921cb8),_0x3d01e7[_0x194016(0x1a8)](),_0x37f882;}async function _0xf5c4aa(){const _0x4141c2=_0x2bf2,_0x2a6aa9=await _0x1e3e6f(proxyIP||_0x5b8eb8,_0x10d19c);_0x2a6aa9[_0x4141c2(0x124)][_0x4141c2(0xe5)](_0x44c606=>{const _0x488e4c=_0x4141c2;console['log'](_0x488e4c(0x187),_0x44c606);})[_0x4141c2(0x109)](()=>{safeCloseWebSocket(_0x27d41c);}),remoteSocketToWS(_0x2a6aa9,_0x27d41c,null,_0x502a3a);}const _0x42ac94=await _0x1e3e6f(_0x5b8eb8,_0x10d19c);remoteSocketToWS(_0x42ac94,_0x27d41c,_0xf5c4aa,_0x502a3a);}function makeReadableWebSocketStream(_0x4f51f9,_0x5c5680,_0x32c0fa){let _0x1d9e0b=![];const _0x5bdc9d=new ReadableStream({'start'(_0x24910b){const _0x29484a=_0x2bf2;_0x4f51f9[_0x29484a(0x126)](_0x29484a(0x1b3),_0xba9c91=>{const _0xb2125b=_0x29484a;if(_0x1d9e0b)return;const _0x3d34a0=_0xba9c91['data'];_0x24910b[_0xb2125b(0xd1)](_0x3d34a0);}),_0x4f51f9[_0x29484a(0x126)](_0x29484a(0x1ac),()=>{safeCloseWebSocket(_0x4f51f9);if(_0x1d9e0b)return;_0x24910b['close']();}),_0x4f51f9[_0x29484a(0x126)](_0x29484a(0x184),_0x161049=>{const _0xb9cc35=_0x29484a;_0x32c0fa(_0xb9cc35(0x137)),_0x24910b[_0xb9cc35(0x184)](_0x161049);});const {earlyData:_0xed687d,error:_0x2e430f}=base64ToArrayBuffer(_0x5c5680);if(_0x2e430f)_0x24910b[_0x29484a(0x184)](_0x2e430f);else _0xed687d&&_0x24910b[_0x29484a(0xd1)](_0xed687d);},'pull'(_0x58495a){},'cancel'(_0x39e79f){const _0x525965=_0x2bf2;if(_0x1d9e0b)return;_0x32c0fa(_0x525965(0x1b1)+_0x39e79f),_0x1d9e0b=!![],safeCloseWebSocket(_0x4f51f9);}});return _0x5bdc9d;}async function remoteSocketToWS(_0x101612,_0x3104ca,_0x3f2f65,_0x5e223c){const _0x1c03db=_0x2bf2;let _0x2beb23=![];await _0x101612[_0x1c03db(0x12f)][_0x1c03db(0x162)](new WritableStream({'start'(){},async 'write'(_0x196a2e,_0x23f36e){const _0x16fd42=_0x1c03db;_0x2beb23=!![],_0x3104ca[_0x16fd42(0xbc)]!==WS_READY_STATE_OPEN&&_0x23f36e[_0x16fd42(0x184)](_0x16fd42(0x117)),_0x3104ca['send'](_0x196a2e);},'close'(){_0x5e223c('remoteSocket.readable\x20is\x20closed,\x20hasIncomingData:\x20'+_0x2beb23);},'abort'(_0x4f1dcb){const _0x3f8d50=_0x1c03db;console[_0x3f8d50(0x184)](_0x3f8d50(0x113),_0x4f1dcb);}}))[_0x1c03db(0xe5)](_0xc7a739=>{const _0x2f5d07=_0x1c03db;console[_0x2f5d07(0x184)](_0x2f5d07(0x160),_0xc7a739['stack']||_0xc7a739),safeCloseWebSocket(_0x3104ca);}),_0x2beb23===![]&&_0x3f2f65&&(_0x5e223c(_0x1c03db(0x114)),_0x3f2f65());}function base64ToArrayBuffer(_0x49507e){const _0x17ca93=_0x2bf2;if(!_0x49507e)return{'error':null};try{_0x49507e=_0x49507e[_0x17ca93(0x161)](/-/g,'+')[_0x17ca93(0x161)](/_/g,'/');const _0x1607f4=atob(_0x49507e),_0x3e1a8c=Uint8Array[_0x17ca93(0x108)](_0x1607f4,_0x491254=>_0x491254[_0x17ca93(0x13c)](0x0));return{'earlyData':_0x3e1a8c[_0x17ca93(0xbf)],'error':null};}catch(_0x103183){return{'error':_0x103183};}}let WS_READY_STATE_OPEN=0x1,WS_READY_STATE_CLOSING=0x2;function safeCloseWebSocket(_0x586cce){const _0x42b4e=_0x2bf2;try{(_0x586cce[_0x42b4e(0xbc)]===WS_READY_STATE_OPEN||_0x586cce[_0x42b4e(0xbc)]===WS_READY_STATE_CLOSING)&&_0x586cce[_0x42b4e(0x1ac)]();}catch(_0xeabf88){console['error'](_0x42b4e(0xfc),_0xeabf88);}}function revertFakeInfo(_0x3a6a4c,_0x336661,_0x42d444,_0x1c92aa){const _0x2e7f75=_0x2bf2;if(_0x1c92aa)_0x3a6a4c=atob(_0x3a6a4c);_0x3a6a4c=_0x3a6a4c['replace'](new RegExp(fakeUserID,'g'),_0x336661)[_0x2e7f75(0x161)](new RegExp(fakeHostName,'g'),_0x42d444);if(_0x1c92aa)_0x3a6a4c=btoa(_0x3a6a4c);return _0x3a6a4c;}function generateRandomNumber(){const _0x45309a=_0x2bf2;let _0x4832b1=0x186a0,_0x9654ff=0xf423f;return Math[_0x45309a(0x1ba)](Math[_0x45309a(0x17f)]()*(_0x9654ff-_0x4832b1+0x1))+_0x4832b1;}function generateRandomString(){const _0x122efe=_0x2bf2;let _0x25a6f8=0x2,_0x10fa46=0x3,_0xf41ba9=Math[_0x122efe(0x1ba)](Math[_0x122efe(0x17f)]()*(_0x10fa46-_0x25a6f8+0x1))+_0x25a6f8,_0x9ce1a0='abcdefghijklmnopqrstuvwxyz',_0x27013d='';for(let _0x36be07=0x0;_0x36be07<_0xf41ba9;_0x36be07++){_0x27013d+=_0x9ce1a0[Math['floor'](Math[_0x122efe(0x17f)]()*_0x9ce1a0[_0x122efe(0x12b)])];}return _0x27013d;}function generateUUID(){const _0x361c4d=_0x2bf2;let _0x56df10='';for(let _0x590ec4=0x0;_0x590ec4<0x20;_0x590ec4++){let _0x1fbff4=Math[_0x361c4d(0x1ba)](Math[_0x361c4d(0x17f)]()*0x10);_0x1fbff4<0xa?_0x56df10+=_0x1fbff4:_0x56df10+=String[_0x361c4d(0xc9)](_0x1fbff4+0x37);}return _0x56df10['replace'](/(.{8})(.{4})(.{4})(.{4})(.{12})/,'$1-$2-$3-$4-$5')[_0x361c4d(0x193)]();}async function ADD(_0x5ac0a0){const _0x5e7a41=_0x2bf2;var _0x1d0f12=_0x5ac0a0[_0x5e7a41(0x161)](/[ |"'\r\n]+/g,',')[_0x5e7a41(0x161)](/,+/g,',');if(_0x1d0f12[_0x5e7a41(0x149)](0x0)==',')_0x1d0f12=_0x1d0f12[_0x5e7a41(0x1bb)](0x1);if(_0x1d0f12[_0x5e7a41(0x149)](_0x1d0f12[_0x5e7a41(0x12b)]-0x1)==',')_0x1d0f12=_0x1d0f12[_0x5e7a41(0x1bb)](0x0,_0x1d0f12[_0x5e7a41(0x12b)]-0x1);const _0x15b862=_0x1d0f12[_0x5e7a41(0x118)](',');return _0x15b862;}function 配置信息(_0x3edfb5,_0x144a01){const _0x52c624=_0x2bf2,_0x796a7b=_0x52c624(0xf2),_0x6744=atob(_0x796a7b),_0x13da3b=_0x144a01;let _0x5246a4=_0x144a01,_0x1937b5=0x1bb;const _0x3407c5='ws',_0x18f7d0=_0x144a01,_0x4ed212='/?ed=2560';let _0x277e03=[_0x52c624(0xe7),!![]];const _0x4e8549=_0x6744+_0x52c624(0xc8)+encodeURIComponent(_0x3edfb5)+'@'+_0x5246a4+':'+_0x1937b5+'?security='+_0x277e03[0x0]+'&type='+_0x3407c5+_0x52c624(0x138)+_0x18f7d0+_0x52c624(0x18d)+encodeURIComponent(_0x4ed212)+'#'+encodeURIComponent(_0x13da3b),_0x342969='-\x20{\x22name\x22:\x22'+_0x13da3b+_0x52c624(0x128)+_0x6744+_0x52c624(0xc7)+_0x5246a4+_0x52c624(0x15b)+_0x1937b5+',\x22udp\x22:false,\x22password\x22:\x22'+_0x3edfb5+_0x52c624(0xdb)+_0x3407c5+_0x52c624(0xd2)+_0x4ed212+_0x52c624(0x15d)+_0x18f7d0+_0x52c624(0x151);return[_0x4e8549,_0x342969];}let subParams=[_0x16ebf8(0x12c),_0x16ebf8(0x19e),'b64',_0x16ebf8(0x130),_0x16ebf8(0x173),'sb','surge'];async function getTrojanConfig(_0x1b5035,_0x20c2e4,_0x3e1c7c,_0x3f7da0,_0x552248,_0x1bc29b){const _0x588944=_0x16ebf8,_0x4ee3fd=_0x3f7da0[_0x588944(0x193)](),_0x5052b8=配置信息(_0x1b5035,_0x20c2e4),_0x480e4e=_0x5052b8[0x0],_0x2fc685=_0x5052b8[0x1];if(_0x4ee3fd['includes'](_0x588944(0x11c))&&!subParams[_0x588944(0xd3)](_0x118850=>_0x1bc29b[_0x588944(0x1a6)][_0x588944(0x1a5)](_0x118850))){let _0x9f247b=_0x588944(0x12d)+_0x20c2e4+'/'+_0x1b5035+_0x588944(0x131);if(_0x20c2e4[_0x588944(0xe3)](_0x588944(0x1b0))||_0x20c2e4[_0x588944(0xe3)](_0x588944(0x178)))_0x9f247b=_0x588944(0x133);let _0x32b4f0=_0x588944(0x195)+_0x3e1c7c+_0x588944(0x1a2)+_0x552248;if(!_0x3e1c7c||_0x3e1c7c=='')!proxyIP||proxyIP==''?_0x32b4f0=_0x588944(0x18b):_0x32b4f0=_0x588944(0xfb)+proxyIPs[_0x588944(0x194)](',');else _0x552248!=_0x588944(0xee)&&(_0x32b4f0+=_0x588944(0x186)+proxyIPs[_0x588944(0x194)](','));return _0x588944(0x16a)+_0x32b4f0+_0x588944(0x10f)+_0x20c2e4+'/'+_0x1b5035+_0x588944(0x159)+_0x20c2e4+'/'+_0x1b5035+_0x588944(0x129)+_0x20c2e4+'/'+_0x1b5035+_0x588944(0x18a)+_0x20c2e4+'/'+_0x1b5035+_0x588944(0x122)+_0x20c2e4+'/'+_0x1b5035+_0x588944(0x150)+_0x20c2e4+'/'+_0x1b5035+_0x588944(0x167)+_0x20c2e4+'/'+_0x1b5035+_0x588944(0xfe)+_0x9f247b+_0x588944(0x1b7)+_0x480e4e+_0x588944(0xc5)+_0x2fc685+_0x588944(0x190);}else{if(typeof fetch!=_0x588944(0x16e))return _0x588944(0x19d);_0x20c2e4[_0x588944(0xe3)](_0x588944(0x1b0))||_0x20c2e4[_0x588944(0xe3)](_0x588944(0x178))?fakeHostName=fakeHostName+'.'+generateRandomString()+generateRandomNumber()+_0x588944(0x1b0):fakeHostName=fakeHostName+'.'+generateRandomNumber()+_0x588944(0x183);if(_0x20c2e4[_0x588944(0xe3)](_0x588944(0x142))||_0x20c2e4[_0x588944(0xe3)](_0x588944(0x146))){if(proxyhostsURL&&(!proxyhosts||proxyhosts[_0x588944(0x12b)]==0x0))try{const _0x4c7a0c=await fetch(proxyhostsURL);if(!_0x4c7a0c['ok']){console[_0x588944(0x184)](_0x588944(0x188),_0x4c7a0c['status'],_0x4c7a0c[_0x588944(0xbd)]);return;}const _0xe79208=await _0x4c7a0c[_0x588944(0xdd)](),_0x3009ce=_0xe79208[_0x588944(0x118)]('\x0a'),_0x40141a=_0x3009ce['filter'](_0x3eddf5=>_0x3eddf5[_0x588944(0x13d)]()!=='');proxyhosts=proxyhosts[_0x588944(0xf9)](_0x40141a);}catch(_0x69dadf){console[_0x588944(0x184)](_0x588944(0x188),_0x69dadf);}proxyhosts=[...new Set(proxyhosts)];}const _0x2a27a4=await getAddressesapi(addressesapi),_0x5a16ea=await getAddressescsv('TRUE');let _0x47ffe6=_0x588944(0x17d)+_0x3e1c7c+'/sub?host='+fakeHostName+_0x588944(0x158)+fakeUserID+_0x588944(0x11f)+fakeUserID+'&epeius=cmliu&proxyip='+_0x552248,_0x4fcfae=!![];if(!_0x3e1c7c||_0x3e1c7c==''){const _0x3caad3=await subAddresses(fakeHostName,fakeUserID,_0x588944(0x16b),_0x2a27a4,_0x5a16ea),_0x3f9876=atob(_0x3caad3),_0x32c542=_0x3f9876[_0x588944(0x118)]('\x0a');_0x47ffe6=_0x32c542[_0x588944(0x194)]('|');}if(!_0x4ee3fd[_0x588944(0xe3)]('CF-Workers-SUB'[_0x588944(0x193)]())){if(_0x4ee3fd[_0x588944(0xe3)](_0x588944(0x130))&&!_0x4ee3fd[_0x588944(0xe3)](_0x588944(0x1ad))||_0x1bc29b[_0x588944(0x1a6)][_0x588944(0x1a5)](_0x588944(0x130)))_0x47ffe6='https://'+subconverter+_0x588944(0xc4)+encodeURIComponent(_0x47ffe6)+_0x588944(0xf6)+encodeURIComponent(subconfig)+_0x588944(0xf3),_0x4fcfae=![];else{if(_0x4ee3fd[_0x588944(0xe3)](_0x588944(0x112))||_0x4ee3fd[_0x588944(0xe3)](_0x588944(0x173))||_0x1bc29b[_0x588944(0x1a6)]['has'](_0x588944(0x173))||_0x1bc29b['searchParams']['has']('sb'))_0x47ffe6=_0x588944(0x17d)+subconverter+'/sub?target=singbox&url='+encodeURIComponent(_0x47ffe6)+_0x588944(0xf6)+encodeURIComponent(subconfig)+'&emoji=true&list=false&tfo=false&scv=true&fdn=false&sort=false&new_name=true',_0x4fcfae=![];else(_0x4ee3fd[_0x588944(0xe3)]('surge')||_0x1bc29b[_0x588944(0x1a6)][_0x588944(0x1a5)](_0x588944(0x10c)))&&(_0x47ffe6=_0x588944(0x17d)+subconverter+_0x588944(0x100)+encodeURIComponent(_0x47ffe6)+'&insert=false&config='+encodeURIComponent(subconfig)+_0x588944(0x17e),_0x4fcfae=![]);}}try{let _0x22094f;if((!_0x3e1c7c||_0x3e1c7c=='')&&_0x4fcfae==!![])_0x22094f=await subAddresses(fakeHostName,fakeUserID,_0x4ee3fd,_0x2a27a4,_0x5a16ea);else{const _0x1388d2=await fetch(_0x47ffe6,{'headers':{'User-Agent':_0x3f7da0+_0x588944(0x14d)}});_0x22094f=await _0x1388d2[_0x588944(0xdd)]();}let _0x51a622=revertFakeInfo(_0x22094f,_0x1b5035,_0x20c2e4,_0x4fcfae);if(_0x4ee3fd[_0x588944(0xe3)](_0x588944(0x10c))||_0x1bc29b[_0x588944(0x1a6)][_0x588944(0x1a5)](_0x588944(0x10c)))_0x51a622=surge(_0x51a622,_0x20c2e4);return _0x51a622;}catch(_0x13c4a4){return console[_0x588944(0x184)](_0x588944(0x177),_0x13c4a4),_0x588944(0x132)+_0x13c4a4[_0x588944(0x1b3)];}}}function _0x2bf2(_0x93d05d,_0x5deb60){const _0x42de7a=_0x42de();return _0x2bf2=function(_0x2bf2e9,_0x466d0d){_0x2bf2e9=_0x2bf2e9-0xbb;let _0x25c425=_0x42de7a[_0x2bf2e9];return _0x25c425;},_0x2bf2(_0x93d05d,_0x5deb60);}async function sendMessage(_0x5ad5c0,_0xc8547a,_0x1b61c4=''){const _0x89ee36=_0x16ebf8;if(BotToken!==''&&ChatID!==''){let _0x171533='';const _0x2dc27a=await fetch(_0x89ee36(0x189)+_0xc8547a+_0x89ee36(0x157));if(_0x2dc27a['status']==0xc8){const _0x1a556a=await _0x2dc27a[_0x89ee36(0x105)]();_0x171533=_0x5ad5c0+_0x89ee36(0x1a4)+_0xc8547a+'\x0a国家:\x20'+_0x1a556a[_0x89ee36(0xdc)]+_0x89ee36(0x191)+_0x1a556a[_0x89ee36(0x139)]+_0x89ee36(0x16c)+_0x1a556a[_0x89ee36(0x192)]+_0x89ee36(0x155)+_0x1a556a['as']+'\x0a'+_0x1b61c4;}else _0x171533=_0x5ad5c0+_0x89ee36(0x1a4)+_0xc8547a+_0x89ee36(0x15a)+_0x1b61c4;let _0x308c78='https://api.telegram.org/bot'+BotToken+_0x89ee36(0xdf)+ChatID+_0x89ee36(0x15c)+encodeURIComponent(_0x171533);return fetch(_0x308c78,{'method':_0x89ee36(0x148),'headers':{'Accept':_0x89ee36(0x11a),'Accept-Encoding':_0x89ee36(0x1a7),'User-Agent':_0x89ee36(0x1aa)}});}}function _0x42de(){const _0x1d6f34=['User-Agent','readable','clash','?surge','Error\x20fetching\x20content:\x20','Surge订阅必须绑定自定义域','connected\x20to\x20','getWriter','RPROXYIP','webSocketServer\x20error','&host=','city','sha256','12yhyXKU','charCodeAt','trim','invalid\x20SOCKS5\x20request\x20data','arrayBuffer','amd','hBytes','workers.dev','sha224','isView','/proxyip.','pages.dev','allSettled','get','charAt','prototype','skip-cert-verify=true','PASSWORD','\x20CF-Workers-epeius/cmliu','443',';\x20total=','?clash\x0a\x0asingbox订阅地址:\x0ahttps://','\x22}}}','indexOf','SUBAPI','string','\x0aASN:\x20','DLS','?lang=zh-CN','&pw=','\x0a\x0aBase64订阅地址:\x0ahttps://','\x0a','\x22,\x22port\x22:','&parse_mode=HTML&text=','\x22,\x22headers\x22:{\x22host\x22:\x22','hash','object','remoteSocketToWS\x20error:','replace','pipeTo','Buffer','pathname','Host','create','?sb\x0ahttps://','is224','abort','\x0a################################################################\x0aSubscribe\x20/\x20sub\x20订阅地址,\x20支持\x20Base64、clash-meta、sing-box\x20订阅格式,\x20','subconverter','\x0a组织:\x20','setHours','function','invalid\x20header\x20format\x20(missing\x20CR\x20LF)','0123456789abcdef',';\x20download=','value','singbox','values','invalid\x20data','PROXYIP','Error\x20fetching\x20content:','.pages.dev','15LOkLyn','call','lastByteIndex','Upgrade','https://','&emoji=true&list=false&xudp=false&udp=false&tfo=false&expand=true&scv=true&fdn=false','random','exports','/?ed=2560','ADD','.xyz','error',';\x20filename*=utf-8\x27\x27',',\x20当前使用的ProxyIP:\x20','retry\x20tcpSocket\x20closed\x20error','获取地址时出错:','http://ip-api.com/json/','?b64\x0ahttps://','您的订阅内容由\x20内置\x20addresses/ADD\x20参数提供,\x20当前使用的ProxyIP为空,\x20推荐您设置\x20proxyIP/PROXYIP\x20!!!','false','&path=','update','status','\x0a---------------------------------------------------------------\x0a################################################################\x0atelegram\x20交流群\x20技术大佬~在线发牌!\x0ahttps://t.me/CMLiussss\x0a---------------------------------------------------------------\x0agithub\x20项目地址\x20Star!Star!Star!!!\x0ahttps://github.com/cmliu/epeius\x0a---------------------------------------------------------------\x0a################################################################\x0a','\x0a城市:\x20','org','toLowerCase','join','您的订阅内容由\x20','toUpperCase','chromeBugWorkAround','readableWebSocketStream\x20pipeTo\x20error','writable','getUint8','log','832958arMYbA','Error:\x20fetch\x20is\x20not\x20available\x20in\x20this\x20environment.','base64','hex','setUint32','fulfilled','\x20提供维护支持,\x20自动获取ProxyIP:\x20','first','\x0aIP:\x20','has','searchParams','gzip,\x20deflate,\x20br','releaseLock','JS_SHA256_NO_WINDOW','Mozilla/5.0\x20Chrome/90.0.4430.72','invalid\x20password','close','nekobox','bytes','ADDAPI','.workers.dev','readableStream\x20was\x20canceled,\x20due\x20to\x20','now','message','4501136pjihrr','JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW','TGID','\x0a---------------------------------------------------------------\x0a################################################################\x0av2ray\x0a---------------------------------------------------------------\x0a','search','SHA224PASS','floor','slice','websocket','readyState','statusText','signal','buffer','sec-websocket-protocol','constructor','\x20已启用临时域名中转服务,请尽快绑定自定义域!','blocks','/sub?target=clash&url=','\x0a---------------------------------------------------------------\x0a################################################################\x0aclash-meta\x0a---------------------------------------------------------------\x0a','获取CSV地址时出错:','\x22,\x22server\x22:\x22','://','fromCharCode','upload=','hostname','1372212Fipvgl','CSV文件缺少必需的字段','oKeyPad','URL302','hashed','enqueue','\x22,\x22ws-opts\x22:{\x22path\x22:\x22','some','380268iCtngd','address\x20is\x20empty,\x20addressType\x20is\x20','array','Incorrect\x20password!!!','test','stringify','attachment;\x20filename=','\x22,\x22skip-cert-verify\x22:true,\x22network\x22:\x22','country','text','decode','/sendMessage?chat_id=','\x0a域名:\x20','createHash','text/plain;charset=utf-8','includes','input\x20is\x20invalid\x20type','catch','757820YHwHWu','tls','byteLength','URL','null','toString','CF-Workers-epeius/cmliu','sharedMemory','true','push',';\x20expire=','UA:\x20','dHJvamFu','&emoji=true&list=false&tfo=false&scv=true&fdn=false&sort=false&new_name=true','1258695GLCNye','TLS','&insert=false&config=','url','ADDCSV','concat','match','您的订阅内容由\x20内置\x20addresses/ADD\x20参数提供,\x20当前使用的ProxyIP:\x20','safeCloseWebSocket\x20error','JS_SHA256_NO_BUFFER_FROM','?singbox\x0a\x0a','then','/sub?target=surge&ver=4&url=','digest','crypto','\x20tcp','CF-Connecting-IP','json','inner','\x0a入口:\x20','from','finally','start','node','surge','JS_SHA256_NO_NODE_JS','readableWebSocketStream\x20is\x20closed','\x0a---------------------------------------------------------------\x0a快速自适应订阅地址:\x0ahttps://','skip-cert-verify=true,\x20ws=true,\x20ws-path=/?ed=2560,\x20ws-headers=Host:\x22','write','sing-box','remoteSocket.readable\x20abort','retry','320678ejJRnp','accept','webSocket\x20connection\x20is\x20not\x20open','split','SUBNAME','text/html,application/xhtml+xml,application/xml;','headers','mozilla','finalize','finalized','&password=','utf8','getUint16','?base64\x0a\x0aclash订阅地址:\x0ahttps://','block','closed','40rBYwdt','addEventListener','undefined','\x22,\x22type\x22:\x22','?sub\x0ahttps://','isArray','length','sub','Surge订阅地址:\x0ahttps://'];_0x42de=function(){return _0x1d6f34;};return _0x42de();}function subAddresses(_0x54b791,_0x3346f7,_0x39c72f,_0xcd326c,_0xeceb15){const _0x4022a7=_0x16ebf8;addresses=addresses['concat'](_0xcd326c),addresses=addresses[_0x4022a7(0xf9)](_0xeceb15);const _0x43a379=[...new Set(addresses)],_0x5f18c3=_0x43a379['map'](_0x25fc3e=>{const _0x286d9b=_0x4022a7;let _0x2988df=_0x286d9b(0x14e),_0x59f500=_0x25fc3e;const _0xefc594=_0x59f500[_0x286d9b(0xfa)](regex);if(!_0xefc594){if(_0x25fc3e[_0x286d9b(0xe3)](':')&&_0x25fc3e[_0x286d9b(0xe3)]('#')){const _0x4673a0=_0x25fc3e[_0x286d9b(0x118)](':');_0x25fc3e=_0x4673a0[0x0];const _0x107ad2=_0x4673a0[0x1][_0x286d9b(0x118)]('#');_0x2988df=_0x107ad2[0x0],_0x59f500=_0x107ad2[0x1];}else{if(_0x25fc3e[_0x286d9b(0xe3)](':')){const _0x58ffaa=_0x25fc3e[_0x286d9b(0x118)](':');_0x25fc3e=_0x58ffaa[0x0],_0x2988df=_0x58ffaa[0x1];}else{if(_0x25fc3e[_0x286d9b(0xe3)]('#')){const _0x4bf898=_0x25fc3e['split']('#');_0x25fc3e=_0x4bf898[0x0],_0x59f500=_0x4bf898[0x1];}}}_0x59f500[_0x286d9b(0xe3)](':')&&(_0x59f500=_0x59f500[_0x286d9b(0x118)](':')[0x0]);}else _0x25fc3e=_0xefc594[0x1],_0x2988df=_0xefc594[0x2]||_0x2988df,_0x59f500=_0xefc594[0x3]||_0x25fc3e;let _0xf7e5d4=_0x54b791,_0x455c24=_0x286d9b(0x181),_0x1299d0='';proxyhosts['length']>0x0&&(_0xf7e5d4['includes']('.workers.dev')||_0xf7e5d4['includes'](_0x286d9b(0x146)))&&(_0x455c24='/'+_0xf7e5d4+_0x455c24,_0xf7e5d4=proxyhosts[Math[_0x286d9b(0x1ba)](Math[_0x286d9b(0x17f)]()*proxyhosts[_0x286d9b(0x12b)])],_0x1299d0=_0x286d9b(0xc2));let _0x2a5f37=_0x3346f7;if(!_0x39c72f[_0x286d9b(0xe3)](_0x286d9b(0x16b)))_0x2a5f37=encodeURIComponent(_0x3346f7);const _0x491a53=_0x286d9b(0xf2),_0x4f5ee4=atob(_0x491a53),_0xff1b59=_0x4f5ee4+_0x286d9b(0xc8)+_0x2a5f37+'@'+_0x25fc3e+':'+_0x2988df+'?security=tls&type=ws&host='+_0xf7e5d4+_0x286d9b(0x18d)+encodeURIComponent(_0x455c24)+'#'+encodeURIComponent(_0x59f500+_0x1299d0);return _0xff1b59;})[_0x4022a7(0x194)]('\x0a'),_0x21e818=btoa(_0x5f18c3);return _0x21e818;}async function getAddressesapi(_0x46cd00){const _0x59769b=_0x16ebf8;if(!_0x46cd00||_0x46cd00['length']===0x0)return[];let _0x1838cc='';const _0x4e86bc=new AbortController(),_0x36cc74=setTimeout(()=>{const _0x24b0ec=_0x2bf2;_0x4e86bc[_0x24b0ec(0x169)]();},0x7d0);try{const _0x21d271=await Promise[_0x59769b(0x147)](_0x46cd00['map'](_0x360875=>fetch(_0x360875,{'method':_0x59769b(0x148),'headers':{'Accept':_0x59769b(0x11a),'User-Agent':_0x59769b(0xec)},'signal':_0x4e86bc[_0x59769b(0xbe)]})[_0x59769b(0xff)](_0x27958d=>_0x27958d['ok']?_0x27958d[_0x59769b(0xdd)]():Promise['reject']())));for(const _0x22d896 of _0x21d271){if(_0x22d896['status']===_0x59769b(0x1a1)){const _0x261b9b=await _0x22d896['value'];_0x1838cc+=_0x261b9b+'\x0a';}}}catch(_0x14f35b){console['error'](_0x14f35b);}finally{clearTimeout(_0x36cc74);}const _0x3adb62=await ADD(_0x1838cc);return _0x3adb62;}async function getAddressescsv(_0x450435){const _0x3f0e07=_0x16ebf8;if(!addressescsv||addressescsv[_0x3f0e07(0x12b)]===0x0)return[];let _0x1cd60c=[];for(const _0x1080e6 of addressescsv){try{const _0x50fb75=await fetch(_0x1080e6);if(!_0x50fb75['ok']){console[_0x3f0e07(0x184)](_0x3f0e07(0xc6),_0x50fb75[_0x3f0e07(0x18f)],_0x50fb75['statusText']);continue;}const _0x1f7e20=await _0x50fb75[_0x3f0e07(0xdd)]();let _0x3a952c;_0x1f7e20['includes']('\x0d\x0a')?_0x3a952c=_0x1f7e20['split']('\x0d\x0a'):_0x3a952c=_0x1f7e20[_0x3f0e07(0x118)]('\x0a');const _0x5f4995=_0x3a952c[0x0][_0x3f0e07(0x118)](','),_0x123d89=_0x5f4995[_0x3f0e07(0x152)](_0x3f0e07(0xf5)),_0xcf5ba8=_0x5f4995[_0x3f0e07(0x12b)]-0x1,_0x3811da=0x0,_0x1e2533=0x1,_0x3628f3=_0x123d89+0x1;if(_0x123d89===-0x1){console['error'](_0x3f0e07(0xcd));continue;}for(let _0x9f12b1=0x1;_0x9f12b1<_0x3a952c[_0x3f0e07(0x12b)];_0x9f12b1++){const _0x46661f=_0x3a952c[_0x9f12b1][_0x3f0e07(0x118)](',');if(_0x46661f[_0x123d89][_0x3f0e07(0x196)]()===_0x450435&&parseFloat(_0x46661f[_0xcf5ba8])>DLS){const _0x26ae91=_0x46661f[_0x3811da],_0x279ff9=_0x46661f[_0x1e2533],_0x3fc4b3=_0x46661f[_0x3628f3],_0x3150a3=_0x26ae91+':'+_0x279ff9+'#'+_0x3fc4b3;_0x1cd60c[_0x3f0e07(0xef)](_0x3150a3);}}}catch(_0x245d6a){console['error'](_0x3f0e07(0xc6),_0x245d6a);continue;}}return _0x1cd60c;}function surge(_0x36fb5f,_0x5094f2){const _0x288a0b=_0x16ebf8,_0x361532=_0x288a0b(0x14b),_0x7f9717=_0x288a0b(0x110)+_0x5094f2+'\x22';return _0x36fb5f=_0x36fb5f[_0x288a0b(0x161)](new RegExp(_0x361532,'g'),_0x7f9717),_0x36fb5f;}/**
* [js-sha256]{@link https://github.com/emn178/js-sha256}
*
* @version 0.11.0
@@ -855,521 +38,4 @@ function surge(content, host) {
* @copyright Chen, Yi-Cyuan 2014-2024
* @license MIT
*/
-/*jslint bitwise: true */
-(function () {
- 'use strict';
-
- var ERROR = 'input is invalid type';
- var WINDOW = typeof window === 'object';
- var root = WINDOW ? window : {};
- if (root.JS_SHA256_NO_WINDOW) {
- WINDOW = false;
- }
- var WEB_WORKER = !WINDOW && typeof self === 'object';
- var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
- if (NODE_JS) {
- root = global;
- } else if (WEB_WORKER) {
- root = self;
- }
- var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports;
- var AMD = typeof define === 'function' && define.amd;
- var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';
- var HEX_CHARS = '0123456789abcdef'.split('');
- var EXTRA = [-2147483648, 8388608, 32768, 128];
- var SHIFT = [24, 16, 8, 0];
- var K = [
- 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
- 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
- 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
- 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
- 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
- 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
- 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
- 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
- ];
- var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];
-
- var blocks = [];
-
- if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {
- Array.isArray = function (obj) {
- return Object.prototype.toString.call(obj) === '[object Array]';
- };
- }
-
- if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {
- ArrayBuffer.isView = function (obj) {
- return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;
- };
- }
-
- var createOutputMethod = function (outputType, is224) {
- return function (message) {
- return new Sha256(is224, true).update(message)[outputType]();
- };
- };
-
- var createMethod = function (is224) {
- var method = createOutputMethod('hex', is224);
- if (NODE_JS) {
- method = nodeWrap(method, is224);
- }
- method.create = function () {
- return new Sha256(is224);
- };
- method.update = function (message) {
- return method.create().update(message);
- };
- for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
- var type = OUTPUT_TYPES[i];
- method[type] = createOutputMethod(type, is224);
- }
- return method;
- };
-
- var nodeWrap = function (method, is224) {
- var crypto = require('crypto')
- var Buffer = require('buffer').Buffer;
- var algorithm = is224 ? 'sha224' : 'sha256';
- var bufferFrom;
- if (Buffer.from && !root.JS_SHA256_NO_BUFFER_FROM) {
- bufferFrom = Buffer.from;
- } else {
- bufferFrom = function (message) {
- return new Buffer(message);
- };
- }
- var nodeMethod = function (message) {
- if (typeof message === 'string') {
- return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');
- } else {
- if (message === null || message === undefined) {
- throw new Error(ERROR);
- } else if (message.constructor === ArrayBuffer) {
- message = new Uint8Array(message);
- }
- }
- if (Array.isArray(message) || ArrayBuffer.isView(message) ||
- message.constructor === Buffer) {
- return crypto.createHash(algorithm).update(bufferFrom(message)).digest('hex');
- } else {
- return method(message);
- }
- };
- return nodeMethod;
- };
-
- var createHmacOutputMethod = function (outputType, is224) {
- return function (key, message) {
- return new HmacSha256(key, is224, true).update(message)[outputType]();
- };
- };
-
- var createHmacMethod = function (is224) {
- var method = createHmacOutputMethod('hex', is224);
- method.create = function (key) {
- return new HmacSha256(key, is224);
- };
- method.update = function (key, message) {
- return method.create(key).update(message);
- };
- for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
- var type = OUTPUT_TYPES[i];
- method[type] = createHmacOutputMethod(type, is224);
- }
- return method;
- };
-
- function Sha256(is224, sharedMemory) {
- if (sharedMemory) {
- blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =
- blocks[4] = blocks[5] = blocks[6] = blocks[7] =
- blocks[8] = blocks[9] = blocks[10] = blocks[11] =
- blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
- this.blocks = blocks;
- } else {
- this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- }
-
- if (is224) {
- this.h0 = 0xc1059ed8;
- this.h1 = 0x367cd507;
- this.h2 = 0x3070dd17;
- this.h3 = 0xf70e5939;
- this.h4 = 0xffc00b31;
- this.h5 = 0x68581511;
- this.h6 = 0x64f98fa7;
- this.h7 = 0xbefa4fa4;
- } else { // 256
- this.h0 = 0x6a09e667;
- this.h1 = 0xbb67ae85;
- this.h2 = 0x3c6ef372;
- this.h3 = 0xa54ff53a;
- this.h4 = 0x510e527f;
- this.h5 = 0x9b05688c;
- this.h6 = 0x1f83d9ab;
- this.h7 = 0x5be0cd19;
- }
-
- this.block = this.start = this.bytes = this.hBytes = 0;
- this.finalized = this.hashed = false;
- this.first = true;
- this.is224 = is224;
- }
-
- Sha256.prototype.update = function (message) {
- if (this.finalized) {
- return;
- }
- var notString, type = typeof message;
- if (type !== 'string') {
- if (type === 'object') {
- if (message === null) {
- throw new Error(ERROR);
- } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
- message = new Uint8Array(message);
- } else if (!Array.isArray(message)) {
- if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {
- throw new Error(ERROR);
- }
- }
- } else {
- throw new Error(ERROR);
- }
- notString = true;
- }
- var code, index = 0, i, length = message.length, blocks = this.blocks;
- while (index < length) {
- if (this.hashed) {
- this.hashed = false;
- blocks[0] = this.block;
- this.block = blocks[16] = blocks[1] = blocks[2] = blocks[3] =
- blocks[4] = blocks[5] = blocks[6] = blocks[7] =
- blocks[8] = blocks[9] = blocks[10] = blocks[11] =
- blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
- }
-
- if (notString) {
- for (i = this.start; index < length && i < 64; ++index) {
- blocks[i >>> 2] |= message[index] << SHIFT[i++ & 3];
- }
- } else {
- for (i = this.start; index < length && i < 64; ++index) {
- code = message.charCodeAt(index);
- if (code < 0x80) {
- blocks[i >>> 2] |= code << SHIFT[i++ & 3];
- } else if (code < 0x800) {
- blocks[i >>> 2] |= (0xc0 | (code >>> 6)) << SHIFT[i++ & 3];
- blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
- } else if (code < 0xd800 || code >= 0xe000) {
- blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];
- blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
- blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
- } else {
- code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
- blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];
- blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];
- blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
- blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
- }
- }
- }
-
- this.lastByteIndex = i;
- this.bytes += i - this.start;
- if (i >= 64) {
- this.block = blocks[16];
- this.start = i - 64;
- this.hash();
- this.hashed = true;
- } else {
- this.start = i;
- }
- }
- if (this.bytes > 4294967295) {
- this.hBytes += this.bytes / 4294967296 << 0;
- this.bytes = this.bytes % 4294967296;
- }
- return this;
- };
-
- Sha256.prototype.finalize = function () {
- if (this.finalized) {
- return;
- }
- this.finalized = true;
- var blocks = this.blocks, i = this.lastByteIndex;
- blocks[16] = this.block;
- blocks[i >>> 2] |= EXTRA[i & 3];
- this.block = blocks[16];
- if (i >= 56) {
- if (!this.hashed) {
- this.hash();
- }
- blocks[0] = this.block;
- blocks[16] = blocks[1] = blocks[2] = blocks[3] =
- blocks[4] = blocks[5] = blocks[6] = blocks[7] =
- blocks[8] = blocks[9] = blocks[10] = blocks[11] =
- blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
- }
- blocks[14] = this.hBytes << 3 | this.bytes >>> 29;
- blocks[15] = this.bytes << 3;
- this.hash();
- };
-
- Sha256.prototype.hash = function () {
- var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6,
- h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;
-
- for (j = 16; j < 64; ++j) {
- // rightrotate
- t1 = blocks[j - 15];
- s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);
- t1 = blocks[j - 2];
- s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);
- blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;
- }
-
- bc = b & c;
- for (j = 0; j < 64; j += 4) {
- if (this.first) {
- if (this.is224) {
- ab = 300032;
- t1 = blocks[0] - 1413257819;
- h = t1 - 150054599 << 0;
- d = t1 + 24177077 << 0;
- } else {
- ab = 704751109;
- t1 = blocks[0] - 210244248;
- h = t1 - 1521486534 << 0;
- d = t1 + 143694565 << 0;
- }
- this.first = false;
- } else {
- s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));
- s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));
- ab = a & b;
- maj = ab ^ (a & c) ^ bc;
- ch = (e & f) ^ (~e & g);
- t1 = h + s1 + ch + K[j] + blocks[j];
- t2 = s0 + maj;
- h = d + t1 << 0;
- d = t1 + t2 << 0;
- }
- s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10));
- s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7));
- da = d & a;
- maj = da ^ (d & b) ^ ab;
- ch = (h & e) ^ (~h & f);
- t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];
- t2 = s0 + maj;
- g = c + t1 << 0;
- c = t1 + t2 << 0;
- s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10));
- s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7));
- cd = c & d;
- maj = cd ^ (c & a) ^ da;
- ch = (g & h) ^ (~g & e);
- t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];
- t2 = s0 + maj;
- f = b + t1 << 0;
- b = t1 + t2 << 0;
- s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10));
- s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7));
- bc = b & c;
- maj = bc ^ (b & d) ^ cd;
- ch = (f & g) ^ (~f & h);
- t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];
- t2 = s0 + maj;
- e = a + t1 << 0;
- a = t1 + t2 << 0;
- this.chromeBugWorkAround = true;
- }
-
- this.h0 = this.h0 + a << 0;
- this.h1 = this.h1 + b << 0;
- this.h2 = this.h2 + c << 0;
- this.h3 = this.h3 + d << 0;
- this.h4 = this.h4 + e << 0;
- this.h5 = this.h5 + f << 0;
- this.h6 = this.h6 + g << 0;
- this.h7 = this.h7 + h << 0;
- };
-
- Sha256.prototype.hex = function () {
- this.finalize();
-
- var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,
- h6 = this.h6, h7 = this.h7;
-
- var hex = HEX_CHARS[(h0 >>> 28) & 0x0F] + HEX_CHARS[(h0 >>> 24) & 0x0F] +
- HEX_CHARS[(h0 >>> 20) & 0x0F] + HEX_CHARS[(h0 >>> 16) & 0x0F] +
- HEX_CHARS[(h0 >>> 12) & 0x0F] + HEX_CHARS[(h0 >>> 8) & 0x0F] +
- HEX_CHARS[(h0 >>> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +
- HEX_CHARS[(h1 >>> 28) & 0x0F] + HEX_CHARS[(h1 >>> 24) & 0x0F] +
- HEX_CHARS[(h1 >>> 20) & 0x0F] + HEX_CHARS[(h1 >>> 16) & 0x0F] +
- HEX_CHARS[(h1 >>> 12) & 0x0F] + HEX_CHARS[(h1 >>> 8) & 0x0F] +
- HEX_CHARS[(h1 >>> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +
- HEX_CHARS[(h2 >>> 28) & 0x0F] + HEX_CHARS[(h2 >>> 24) & 0x0F] +
- HEX_CHARS[(h2 >>> 20) & 0x0F] + HEX_CHARS[(h2 >>> 16) & 0x0F] +
- HEX_CHARS[(h2 >>> 12) & 0x0F] + HEX_CHARS[(h2 >>> 8) & 0x0F] +
- HEX_CHARS[(h2 >>> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +
- HEX_CHARS[(h3 >>> 28) & 0x0F] + HEX_CHARS[(h3 >>> 24) & 0x0F] +
- HEX_CHARS[(h3 >>> 20) & 0x0F] + HEX_CHARS[(h3 >>> 16) & 0x0F] +
- HEX_CHARS[(h3 >>> 12) & 0x0F] + HEX_CHARS[(h3 >>> 8) & 0x0F] +
- HEX_CHARS[(h3 >>> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +
- HEX_CHARS[(h4 >>> 28) & 0x0F] + HEX_CHARS[(h4 >>> 24) & 0x0F] +
- HEX_CHARS[(h4 >>> 20) & 0x0F] + HEX_CHARS[(h4 >>> 16) & 0x0F] +
- HEX_CHARS[(h4 >>> 12) & 0x0F] + HEX_CHARS[(h4 >>> 8) & 0x0F] +
- HEX_CHARS[(h4 >>> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] +
- HEX_CHARS[(h5 >>> 28) & 0x0F] + HEX_CHARS[(h5 >>> 24) & 0x0F] +
- HEX_CHARS[(h5 >>> 20) & 0x0F] + HEX_CHARS[(h5 >>> 16) & 0x0F] +
- HEX_CHARS[(h5 >>> 12) & 0x0F] + HEX_CHARS[(h5 >>> 8) & 0x0F] +
- HEX_CHARS[(h5 >>> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] +
- HEX_CHARS[(h6 >>> 28) & 0x0F] + HEX_CHARS[(h6 >>> 24) & 0x0F] +
- HEX_CHARS[(h6 >>> 20) & 0x0F] + HEX_CHARS[(h6 >>> 16) & 0x0F] +
- HEX_CHARS[(h6 >>> 12) & 0x0F] + HEX_CHARS[(h6 >>> 8) & 0x0F] +
- HEX_CHARS[(h6 >>> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F];
- if (!this.is224) {
- hex += HEX_CHARS[(h7 >>> 28) & 0x0F] + HEX_CHARS[(h7 >>> 24) & 0x0F] +
- HEX_CHARS[(h7 >>> 20) & 0x0F] + HEX_CHARS[(h7 >>> 16) & 0x0F] +
- HEX_CHARS[(h7 >>> 12) & 0x0F] + HEX_CHARS[(h7 >>> 8) & 0x0F] +
- HEX_CHARS[(h7 >>> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F];
- }
- return hex;
- };
-
- Sha256.prototype.toString = Sha256.prototype.hex;
-
- Sha256.prototype.digest = function () {
- this.finalize();
-
- var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,
- h6 = this.h6, h7 = this.h7;
-
- var arr = [
- (h0 >>> 24) & 0xFF, (h0 >>> 16) & 0xFF, (h0 >>> 8) & 0xFF, h0 & 0xFF,
- (h1 >>> 24) & 0xFF, (h1 >>> 16) & 0xFF, (h1 >>> 8) & 0xFF, h1 & 0xFF,
- (h2 >>> 24) & 0xFF, (h2 >>> 16) & 0xFF, (h2 >>> 8) & 0xFF, h2 & 0xFF,
- (h3 >>> 24) & 0xFF, (h3 >>> 16) & 0xFF, (h3 >>> 8) & 0xFF, h3 & 0xFF,
- (h4 >>> 24) & 0xFF, (h4 >>> 16) & 0xFF, (h4 >>> 8) & 0xFF, h4 & 0xFF,
- (h5 >>> 24) & 0xFF, (h5 >>> 16) & 0xFF, (h5 >>> 8) & 0xFF, h5 & 0xFF,
- (h6 >>> 24) & 0xFF, (h6 >>> 16) & 0xFF, (h6 >>> 8) & 0xFF, h6 & 0xFF
- ];
- if (!this.is224) {
- arr.push((h7 >>> 24) & 0xFF, (h7 >>> 16) & 0xFF, (h7 >>> 8) & 0xFF, h7 & 0xFF);
- }
- return arr;
- };
-
- Sha256.prototype.array = Sha256.prototype.digest;
-
- Sha256.prototype.arrayBuffer = function () {
- this.finalize();
-
- var buffer = new ArrayBuffer(this.is224 ? 28 : 32);
- var dataView = new DataView(buffer);
- dataView.setUint32(0, this.h0);
- dataView.setUint32(4, this.h1);
- dataView.setUint32(8, this.h2);
- dataView.setUint32(12, this.h3);
- dataView.setUint32(16, this.h4);
- dataView.setUint32(20, this.h5);
- dataView.setUint32(24, this.h6);
- if (!this.is224) {
- dataView.setUint32(28, this.h7);
- }
- return buffer;
- };
-
- function HmacSha256(key, is224, sharedMemory) {
- var i, type = typeof key;
- if (type === 'string') {
- var bytes = [], length = key.length, index = 0, code;
- for (i = 0; i < length; ++i) {
- code = key.charCodeAt(i);
- if (code < 0x80) {
- bytes[index++] = code;
- } else if (code < 0x800) {
- bytes[index++] = (0xc0 | (code >>> 6));
- bytes[index++] = (0x80 | (code & 0x3f));
- } else if (code < 0xd800 || code >= 0xe000) {
- bytes[index++] = (0xe0 | (code >>> 12));
- bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
- bytes[index++] = (0x80 | (code & 0x3f));
- } else {
- code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
- bytes[index++] = (0xf0 | (code >>> 18));
- bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
- bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
- bytes[index++] = (0x80 | (code & 0x3f));
- }
- }
- key = bytes;
- } else {
- if (type === 'object') {
- if (key === null) {
- throw new Error(ERROR);
- } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {
- key = new Uint8Array(key);
- } else if (!Array.isArray(key)) {
- if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {
- throw new Error(ERROR);
- }
- }
- } else {
- throw new Error(ERROR);
- }
- }
-
- if (key.length > 64) {
- key = (new Sha256(is224, true)).update(key).array();
- }
-
- var oKeyPad = [], iKeyPad = [];
- for (i = 0; i < 64; ++i) {
- var b = key[i] || 0;
- oKeyPad[i] = 0x5c ^ b;
- iKeyPad[i] = 0x36 ^ b;
- }
-
- Sha256.call(this, is224, sharedMemory);
-
- this.update(iKeyPad);
- this.oKeyPad = oKeyPad;
- this.inner = true;
- this.sharedMemory = sharedMemory;
- }
- HmacSha256.prototype = new Sha256();
-
- HmacSha256.prototype.finalize = function () {
- Sha256.prototype.finalize.call(this);
- if (this.inner) {
- this.inner = false;
- var innerHash = this.array();
- Sha256.call(this, this.is224, this.sharedMemory);
- this.update(this.oKeyPad);
- this.update(innerHash);
- Sha256.prototype.finalize.call(this);
- }
- };
-
- var exports = createMethod();
- exports.sha256 = exports;
- exports.sha224 = createMethod(true);
- exports.sha256.hmac = createHmacMethod();
- exports.sha224.hmac = createHmacMethod(true);
-
- if (COMMON_JS) {
- module.exports = exports;
- } else {
- root.sha256 = exports.sha256;
- root.sha224 = exports.sha224;
- if (AMD) {
- define(function () {
- return exports;
- });
- }
- }
- })();
+(function(){'use strict';const _0x15dcdf=_0x16ebf8;var _0x4a2383=_0x15dcdf(0xe4),_0x490fec=typeof window===_0x15dcdf(0x15f),_0x181c99=_0x490fec?window:{};_0x181c99[_0x15dcdf(0x1a9)]&&(_0x490fec=![]);var _0x3a365a=!_0x490fec&&typeof self===_0x15dcdf(0x15f),_0x317457=!_0x181c99[_0x15dcdf(0x10d)]&&typeof process===_0x15dcdf(0x15f)&&process['versions']&&process['versions'][_0x15dcdf(0x10b)];if(_0x317457)_0x181c99=global;else _0x3a365a&&(_0x181c99=self);var _0x47b540=!_0x181c99['JS_SHA256_NO_COMMON_JS']&&typeof module==='object'&&module[_0x15dcdf(0x180)],_0x3ba32f=typeof define===_0x15dcdf(0x16e)&&define[_0x15dcdf(0x140)],_0x5a5908=!_0x181c99['JS_SHA256_NO_ARRAY_BUFFER']&&typeof ArrayBuffer!==_0x15dcdf(0x127),_0x5495c7=_0x15dcdf(0x170)[_0x15dcdf(0x118)](''),_0x2e1483=[-0x80000000,0x800000,0x8000,0x80],_0x1e6787=[0x18,0x10,0x8,0x0],_0x75899e=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],_0x3f5ed1=[_0x15dcdf(0x19f),_0x15dcdf(0xd6),_0x15dcdf(0x101),_0x15dcdf(0x13f)],_0x3744f5=[];(_0x181c99[_0x15dcdf(0x10d)]||!Array[_0x15dcdf(0x12a)])&&(Array[_0x15dcdf(0x12a)]=function(_0x3b5c75){const _0x3f921d=_0x15dcdf;return Object[_0x3f921d(0x14a)][_0x3f921d(0xeb)]['call'](_0x3b5c75)==='[object\x20Array]';});_0x5a5908&&(_0x181c99[_0x15dcdf(0x1b5)]||!ArrayBuffer[_0x15dcdf(0x144)])&&(ArrayBuffer[_0x15dcdf(0x144)]=function(_0x1a6604){const _0x2b6cd9=_0x15dcdf;return typeof _0x1a6604===_0x2b6cd9(0x15f)&&_0x1a6604[_0x2b6cd9(0xbf)]&&_0x1a6604[_0x2b6cd9(0xbf)][_0x2b6cd9(0xc1)]===ArrayBuffer;});var _0x4a57a8=function(_0x2880ed,_0x500311){return function(_0x20abe0){const _0x5c7217=_0x2bf2;return new _0x53a223(_0x500311,!![])[_0x5c7217(0x18e)](_0x20abe0)[_0x2880ed]();};},_0x3153b3=function(_0x30cd8c){const _0x211f9d=_0x15dcdf;var _0x265e24=_0x4a57a8(_0x211f9d(0x19f),_0x30cd8c);_0x317457&&(_0x265e24=_0x1d7a36(_0x265e24,_0x30cd8c));_0x265e24[_0x211f9d(0x166)]=function(){return new _0x53a223(_0x30cd8c);},_0x265e24[_0x211f9d(0x18e)]=function(_0x19c6aa){const _0xe4973e=_0x211f9d;return _0x265e24[_0xe4973e(0x166)]()[_0xe4973e(0x18e)](_0x19c6aa);};for(var _0x417373=0x0;_0x417373<_0x3f5ed1[_0x211f9d(0x12b)];++_0x417373){var _0x39fe24=_0x3f5ed1[_0x417373];_0x265e24[_0x39fe24]=_0x4a57a8(_0x39fe24,_0x30cd8c);}return _0x265e24;},_0x1d7a36=function(_0x2b4ab3,_0x32bca8){const _0x3e5036=_0x15dcdf;var _0x5d17d3=require(_0x3e5036(0x102)),_0x440d6c=require(_0x3e5036(0xbf))[_0x3e5036(0x163)],_0x173a9c=_0x32bca8?_0x3e5036(0x143):_0x3e5036(0x13a),_0x1781ae;_0x440d6c['from']&&!_0x181c99[_0x3e5036(0xfd)]?_0x1781ae=_0x440d6c['from']:_0x1781ae=function(_0x5c1d72){return new _0x440d6c(_0x5c1d72);};var _0x55b8df=function(_0x66f85b){const _0x499fcf=_0x3e5036;if(typeof _0x66f85b==='string')return _0x5d17d3[_0x499fcf(0xe1)](_0x173a9c)[_0x499fcf(0x18e)](_0x66f85b,_0x499fcf(0x120))['digest'](_0x499fcf(0x19f));else{if(_0x66f85b===null||_0x66f85b===undefined)throw new Error(_0x4a2383);else _0x66f85b[_0x499fcf(0xc1)]===ArrayBuffer&&(_0x66f85b=new Uint8Array(_0x66f85b));}return Array[_0x499fcf(0x12a)](_0x66f85b)||ArrayBuffer[_0x499fcf(0x144)](_0x66f85b)||_0x66f85b[_0x499fcf(0xc1)]===_0x440d6c?_0x5d17d3['createHash'](_0x173a9c)[_0x499fcf(0x18e)](_0x1781ae(_0x66f85b))['digest'](_0x499fcf(0x19f)):_0x2b4ab3(_0x66f85b);};return _0x55b8df;},_0x1ea106=function(_0x4b244f,_0x1cc0c5){return function(_0x3ca086,_0xad52d6){const _0x1ded5d=_0x2bf2;return new _0x925b9e(_0x3ca086,_0x1cc0c5,!![])[_0x1ded5d(0x18e)](_0xad52d6)[_0x4b244f]();};},_0x371b2b=function(_0x173df3){const _0x24f826=_0x15dcdf;var _0x3a8357=_0x1ea106('hex',_0x173df3);_0x3a8357[_0x24f826(0x166)]=function(_0x4d9ce2){return new _0x925b9e(_0x4d9ce2,_0x173df3);},_0x3a8357[_0x24f826(0x18e)]=function(_0x4f00ba,_0xc31e68){const _0x3021b0=_0x24f826;return _0x3a8357['create'](_0x4f00ba)[_0x3021b0(0x18e)](_0xc31e68);};for(var _0x320092=0x0;_0x320092<_0x3f5ed1['length'];++_0x320092){var _0x58508f=_0x3f5ed1[_0x320092];_0x3a8357[_0x58508f]=_0x1ea106(_0x58508f,_0x173df3);}return _0x3a8357;};function _0x53a223(_0x5d4f0e,_0x1ca8d5){const _0x5e2872=_0x15dcdf;_0x1ca8d5?(_0x3744f5[0x0]=_0x3744f5[0x10]=_0x3744f5[0x1]=_0x3744f5[0x2]=_0x3744f5[0x3]=_0x3744f5[0x4]=_0x3744f5[0x5]=_0x3744f5[0x6]=_0x3744f5[0x7]=_0x3744f5[0x8]=_0x3744f5[0x9]=_0x3744f5[0xa]=_0x3744f5[0xb]=_0x3744f5[0xc]=_0x3744f5[0xd]=_0x3744f5[0xe]=_0x3744f5[0xf]=0x0,this[_0x5e2872(0xc3)]=_0x3744f5):this[_0x5e2872(0xc3)]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],_0x5d4f0e?(this['h0']=0xc1059ed8,this['h1']=0x367cd507,this['h2']=0x3070dd17,this['h3']=0xf70e5939,this['h4']=0xffc00b31,this['h5']=0x68581511,this['h6']=0x64f98fa7,this['h7']=0xbefa4fa4):(this['h0']=0x6a09e667,this['h1']=0xbb67ae85,this['h2']=0x3c6ef372,this['h3']=0xa54ff53a,this['h4']=0x510e527f,this['h5']=0x9b05688c,this['h6']=0x1f83d9ab,this['h7']=0x5be0cd19),this['block']=this['start']=this[_0x5e2872(0x1ae)]=this[_0x5e2872(0x141)]=0x0,this[_0x5e2872(0x11e)]=this[_0x5e2872(0xd0)]=![],this['first']=!![],this[_0x5e2872(0x168)]=_0x5d4f0e;}_0x53a223[_0x15dcdf(0x14a)][_0x15dcdf(0x18e)]=function(_0x5df23b){const _0x34cd80=_0x15dcdf;if(this[_0x34cd80(0x11e)])return;var _0x333d71,_0x10090c=typeof _0x5df23b;if(_0x10090c!==_0x34cd80(0x154)){if(_0x10090c===_0x34cd80(0x15f)){if(_0x5df23b===null)throw new Error(_0x4a2383);else{if(_0x5a5908&&_0x5df23b[_0x34cd80(0xc1)]===ArrayBuffer)_0x5df23b=new Uint8Array(_0x5df23b);else{if(!Array[_0x34cd80(0x12a)](_0x5df23b)){if(!_0x5a5908||!ArrayBuffer[_0x34cd80(0x144)](_0x5df23b))throw new Error(_0x4a2383);}}}}else throw new Error(_0x4a2383);_0x333d71=!![];}var _0x335ff1,_0x47d9e0=0x0,_0x37eba1,_0x718f36=_0x5df23b[_0x34cd80(0x12b)],_0xb8b3b3=this['blocks'];while(_0x47d9e0<_0x718f36){this[_0x34cd80(0xd0)]&&(this['hashed']=![],_0xb8b3b3[0x0]=this[_0x34cd80(0x123)],this['block']=_0xb8b3b3[0x10]=_0xb8b3b3[0x1]=_0xb8b3b3[0x2]=_0xb8b3b3[0x3]=_0xb8b3b3[0x4]=_0xb8b3b3[0x5]=_0xb8b3b3[0x6]=_0xb8b3b3[0x7]=_0xb8b3b3[0x8]=_0xb8b3b3[0x9]=_0xb8b3b3[0xa]=_0xb8b3b3[0xb]=_0xb8b3b3[0xc]=_0xb8b3b3[0xd]=_0xb8b3b3[0xe]=_0xb8b3b3[0xf]=0x0);if(_0x333d71)for(_0x37eba1=this[_0x34cd80(0x10a)];_0x47d9e0<_0x718f36&&_0x37eba1<0x40;++_0x47d9e0){_0xb8b3b3[_0x37eba1>>>0x2]|=_0x5df23b[_0x47d9e0]<<_0x1e6787[_0x37eba1++&0x3];}else for(_0x37eba1=this[_0x34cd80(0x10a)];_0x47d9e0<_0x718f36&&_0x37eba1<0x40;++_0x47d9e0){_0x335ff1=_0x5df23b[_0x34cd80(0x13c)](_0x47d9e0);if(_0x335ff1<0x80)_0xb8b3b3[_0x37eba1>>>0x2]|=_0x335ff1<<_0x1e6787[_0x37eba1++&0x3];else{if(_0x335ff1<0x800)_0xb8b3b3[_0x37eba1>>>0x2]|=(0xc0|_0x335ff1>>>0x6)<<_0x1e6787[_0x37eba1++&0x3],_0xb8b3b3[_0x37eba1>>>0x2]|=(0x80|_0x335ff1&0x3f)<<_0x1e6787[_0x37eba1++&0x3];else _0x335ff1<0xd800||_0x335ff1>=0xe000?(_0xb8b3b3[_0x37eba1>>>0x2]|=(0xe0|_0x335ff1>>>0xc)<<_0x1e6787[_0x37eba1++&0x3],_0xb8b3b3[_0x37eba1>>>0x2]|=(0x80|_0x335ff1>>>0x6&0x3f)<<_0x1e6787[_0x37eba1++&0x3],_0xb8b3b3[_0x37eba1>>>0x2]|=(0x80|_0x335ff1&0x3f)<<_0x1e6787[_0x37eba1++&0x3]):(_0x335ff1=0x10000+((_0x335ff1&0x3ff)<<0xa|_0x5df23b[_0x34cd80(0x13c)](++_0x47d9e0)&0x3ff),_0xb8b3b3[_0x37eba1>>>0x2]|=(0xf0|_0x335ff1>>>0x12)<<_0x1e6787[_0x37eba1++&0x3],_0xb8b3b3[_0x37eba1>>>0x2]|=(0x80|_0x335ff1>>>0xc&0x3f)<<_0x1e6787[_0x37eba1++&0x3],_0xb8b3b3[_0x37eba1>>>0x2]|=(0x80|_0x335ff1>>>0x6&0x3f)<<_0x1e6787[_0x37eba1++&0x3],_0xb8b3b3[_0x37eba1>>>0x2]|=(0x80|_0x335ff1&0x3f)<<_0x1e6787[_0x37eba1++&0x3]);}}this[_0x34cd80(0x17b)]=_0x37eba1,this[_0x34cd80(0x1ae)]+=_0x37eba1-this['start'],_0x37eba1>=0x40?(this[_0x34cd80(0x123)]=_0xb8b3b3[0x10],this['start']=_0x37eba1-0x40,this['hash'](),this[_0x34cd80(0xd0)]=!![]):this[_0x34cd80(0x10a)]=_0x37eba1;}return this[_0x34cd80(0x1ae)]>0xffffffff&&(this[_0x34cd80(0x141)]+=this[_0x34cd80(0x1ae)]/0x100000000<<0x0,this['bytes']=this['bytes']%0x100000000),this;},_0x53a223[_0x15dcdf(0x14a)][_0x15dcdf(0x11d)]=function(){const _0x34ec4c=_0x15dcdf;if(this[_0x34ec4c(0x11e)])return;this[_0x34ec4c(0x11e)]=!![];var _0x41018b=this['blocks'],_0x517c70=this[_0x34ec4c(0x17b)];_0x41018b[0x10]=this[_0x34ec4c(0x123)],_0x41018b[_0x517c70>>>0x2]|=_0x2e1483[_0x517c70&0x3],this[_0x34ec4c(0x123)]=_0x41018b[0x10],_0x517c70>=0x38&&(!this['hashed']&&this['hash'](),_0x41018b[0x0]=this[_0x34ec4c(0x123)],_0x41018b[0x10]=_0x41018b[0x1]=_0x41018b[0x2]=_0x41018b[0x3]=_0x41018b[0x4]=_0x41018b[0x5]=_0x41018b[0x6]=_0x41018b[0x7]=_0x41018b[0x8]=_0x41018b[0x9]=_0x41018b[0xa]=_0x41018b[0xb]=_0x41018b[0xc]=_0x41018b[0xd]=_0x41018b[0xe]=_0x41018b[0xf]=0x0),_0x41018b[0xe]=this['hBytes']<<0x3|this[_0x34ec4c(0x1ae)]>>>0x1d,_0x41018b[0xf]=this[_0x34ec4c(0x1ae)]<<0x3,this[_0x34ec4c(0x15e)]();},_0x53a223['prototype'][_0x15dcdf(0x15e)]=function(){const _0x1f3582=_0x15dcdf;var _0x3f13d4=this['h0'],_0x19d6d7=this['h1'],_0x46c490=this['h2'],_0x8bda3b=this['h3'],_0x349802=this['h4'],_0x3607e4=this['h5'],_0x5bfaae=this['h6'],_0x467d6e=this['h7'],_0x8c17c0=this[_0x1f3582(0xc3)],_0x1e97d5,_0x46f951,_0x209b36,_0x45b308,_0x3df3aa,_0x3dd5ab,_0x38378a,_0x3e4b8b,_0x450252,_0x1a6ffc,_0x26cc00;for(_0x1e97d5=0x10;_0x1e97d5<0x40;++_0x1e97d5){_0x3df3aa=_0x8c17c0[_0x1e97d5-0xf],_0x46f951=(_0x3df3aa>>>0x7|_0x3df3aa<<0x19)^(_0x3df3aa>>>0x12|_0x3df3aa<<0xe)^_0x3df3aa>>>0x3,_0x3df3aa=_0x8c17c0[_0x1e97d5-0x2],_0x209b36=(_0x3df3aa>>>0x11|_0x3df3aa<<0xf)^(_0x3df3aa>>>0x13|_0x3df3aa<<0xd)^_0x3df3aa>>>0xa,_0x8c17c0[_0x1e97d5]=_0x8c17c0[_0x1e97d5-0x10]+_0x46f951+_0x8c17c0[_0x1e97d5-0x7]+_0x209b36<<0x0;}_0x26cc00=_0x19d6d7&_0x46c490;for(_0x1e97d5=0x0;_0x1e97d5<0x40;_0x1e97d5+=0x4){this[_0x1f3582(0x1a3)]?(this[_0x1f3582(0x168)]?(_0x3e4b8b=0x49400,_0x3df3aa=_0x8c17c0[0x0]-0x543c9a5b,_0x467d6e=_0x3df3aa-0x8f1a6c7<<0x0,_0x8bda3b=_0x3df3aa+0x170e9b5<<0x0):(_0x3e4b8b=0x2a01a605,_0x3df3aa=_0x8c17c0[0x0]-0xc881298,_0x467d6e=_0x3df3aa-0x5ab00ac6<<0x0,_0x8bda3b=_0x3df3aa+0x8909ae5<<0x0),this[_0x1f3582(0x1a3)]=![]):(_0x46f951=(_0x3f13d4>>>0x2|_0x3f13d4<<0x1e)^(_0x3f13d4>>>0xd|_0x3f13d4<<0x13)^(_0x3f13d4>>>0x16|_0x3f13d4<<0xa),_0x209b36=(_0x349802>>>0x6|_0x349802<<0x1a)^(_0x349802>>>0xb|_0x349802<<0x15)^(_0x349802>>>0x19|_0x349802<<0x7),_0x3e4b8b=_0x3f13d4&_0x19d6d7,_0x45b308=_0x3e4b8b^_0x3f13d4&_0x46c490^_0x26cc00,_0x38378a=_0x349802&_0x3607e4^~_0x349802&_0x5bfaae,_0x3df3aa=_0x467d6e+_0x209b36+_0x38378a+_0x75899e[_0x1e97d5]+_0x8c17c0[_0x1e97d5],_0x3dd5ab=_0x46f951+_0x45b308,_0x467d6e=_0x8bda3b+_0x3df3aa<<0x0,_0x8bda3b=_0x3df3aa+_0x3dd5ab<<0x0),_0x46f951=(_0x8bda3b>>>0x2|_0x8bda3b<<0x1e)^(_0x8bda3b>>>0xd|_0x8bda3b<<0x13)^(_0x8bda3b>>>0x16|_0x8bda3b<<0xa),_0x209b36=(_0x467d6e>>>0x6|_0x467d6e<<0x1a)^(_0x467d6e>>>0xb|_0x467d6e<<0x15)^(_0x467d6e>>>0x19|_0x467d6e<<0x7),_0x450252=_0x8bda3b&_0x3f13d4,_0x45b308=_0x450252^_0x8bda3b&_0x19d6d7^_0x3e4b8b,_0x38378a=_0x467d6e&_0x349802^~_0x467d6e&_0x3607e4,_0x3df3aa=_0x5bfaae+_0x209b36+_0x38378a+_0x75899e[_0x1e97d5+0x1]+_0x8c17c0[_0x1e97d5+0x1],_0x3dd5ab=_0x46f951+_0x45b308,_0x5bfaae=_0x46c490+_0x3df3aa<<0x0,_0x46c490=_0x3df3aa+_0x3dd5ab<<0x0,_0x46f951=(_0x46c490>>>0x2|_0x46c490<<0x1e)^(_0x46c490>>>0xd|_0x46c490<<0x13)^(_0x46c490>>>0x16|_0x46c490<<0xa),_0x209b36=(_0x5bfaae>>>0x6|_0x5bfaae<<0x1a)^(_0x5bfaae>>>0xb|_0x5bfaae<<0x15)^(_0x5bfaae>>>0x19|_0x5bfaae<<0x7),_0x1a6ffc=_0x46c490&_0x8bda3b,_0x45b308=_0x1a6ffc^_0x46c490&_0x3f13d4^_0x450252,_0x38378a=_0x5bfaae&_0x467d6e^~_0x5bfaae&_0x349802,_0x3df3aa=_0x3607e4+_0x209b36+_0x38378a+_0x75899e[_0x1e97d5+0x2]+_0x8c17c0[_0x1e97d5+0x2],_0x3dd5ab=_0x46f951+_0x45b308,_0x3607e4=_0x19d6d7+_0x3df3aa<<0x0,_0x19d6d7=_0x3df3aa+_0x3dd5ab<<0x0,_0x46f951=(_0x19d6d7>>>0x2|_0x19d6d7<<0x1e)^(_0x19d6d7>>>0xd|_0x19d6d7<<0x13)^(_0x19d6d7>>>0x16|_0x19d6d7<<0xa),_0x209b36=(_0x3607e4>>>0x6|_0x3607e4<<0x1a)^(_0x3607e4>>>0xb|_0x3607e4<<0x15)^(_0x3607e4>>>0x19|_0x3607e4<<0x7),_0x26cc00=_0x19d6d7&_0x46c490,_0x45b308=_0x26cc00^_0x19d6d7&_0x8bda3b^_0x1a6ffc,_0x38378a=_0x3607e4&_0x5bfaae^~_0x3607e4&_0x467d6e,_0x3df3aa=_0x349802+_0x209b36+_0x38378a+_0x75899e[_0x1e97d5+0x3]+_0x8c17c0[_0x1e97d5+0x3],_0x3dd5ab=_0x46f951+_0x45b308,_0x349802=_0x3f13d4+_0x3df3aa<<0x0,_0x3f13d4=_0x3df3aa+_0x3dd5ab<<0x0,this[_0x1f3582(0x197)]=!![];}this['h0']=this['h0']+_0x3f13d4<<0x0,this['h1']=this['h1']+_0x19d6d7<<0x0,this['h2']=this['h2']+_0x46c490<<0x0,this['h3']=this['h3']+_0x8bda3b<<0x0,this['h4']=this['h4']+_0x349802<<0x0,this['h5']=this['h5']+_0x3607e4<<0x0,this['h6']=this['h6']+_0x5bfaae<<0x0,this['h7']=this['h7']+_0x467d6e<<0x0;},_0x53a223[_0x15dcdf(0x14a)]['hex']=function(){const _0x5947e9=_0x15dcdf;this[_0x5947e9(0x11d)]();var _0x3376ab=this['h0'],_0x3d0f1a=this['h1'],_0x331609=this['h2'],_0x50bc88=this['h3'],_0x302913=this['h4'],_0x56ccfd=this['h5'],_0x5ee841=this['h6'],_0x3bff8f=this['h7'],_0x4b78a5=_0x5495c7[_0x3376ab>>>0x1c&0xf]+_0x5495c7[_0x3376ab>>>0x18&0xf]+_0x5495c7[_0x3376ab>>>0x14&0xf]+_0x5495c7[_0x3376ab>>>0x10&0xf]+_0x5495c7[_0x3376ab>>>0xc&0xf]+_0x5495c7[_0x3376ab>>>0x8&0xf]+_0x5495c7[_0x3376ab>>>0x4&0xf]+_0x5495c7[_0x3376ab&0xf]+_0x5495c7[_0x3d0f1a>>>0x1c&0xf]+_0x5495c7[_0x3d0f1a>>>0x18&0xf]+_0x5495c7[_0x3d0f1a>>>0x14&0xf]+_0x5495c7[_0x3d0f1a>>>0x10&0xf]+_0x5495c7[_0x3d0f1a>>>0xc&0xf]+_0x5495c7[_0x3d0f1a>>>0x8&0xf]+_0x5495c7[_0x3d0f1a>>>0x4&0xf]+_0x5495c7[_0x3d0f1a&0xf]+_0x5495c7[_0x331609>>>0x1c&0xf]+_0x5495c7[_0x331609>>>0x18&0xf]+_0x5495c7[_0x331609>>>0x14&0xf]+_0x5495c7[_0x331609>>>0x10&0xf]+_0x5495c7[_0x331609>>>0xc&0xf]+_0x5495c7[_0x331609>>>0x8&0xf]+_0x5495c7[_0x331609>>>0x4&0xf]+_0x5495c7[_0x331609&0xf]+_0x5495c7[_0x50bc88>>>0x1c&0xf]+_0x5495c7[_0x50bc88>>>0x18&0xf]+_0x5495c7[_0x50bc88>>>0x14&0xf]+_0x5495c7[_0x50bc88>>>0x10&0xf]+_0x5495c7[_0x50bc88>>>0xc&0xf]+_0x5495c7[_0x50bc88>>>0x8&0xf]+_0x5495c7[_0x50bc88>>>0x4&0xf]+_0x5495c7[_0x50bc88&0xf]+_0x5495c7[_0x302913>>>0x1c&0xf]+_0x5495c7[_0x302913>>>0x18&0xf]+_0x5495c7[_0x302913>>>0x14&0xf]+_0x5495c7[_0x302913>>>0x10&0xf]+_0x5495c7[_0x302913>>>0xc&0xf]+_0x5495c7[_0x302913>>>0x8&0xf]+_0x5495c7[_0x302913>>>0x4&0xf]+_0x5495c7[_0x302913&0xf]+_0x5495c7[_0x56ccfd>>>0x1c&0xf]+_0x5495c7[_0x56ccfd>>>0x18&0xf]+_0x5495c7[_0x56ccfd>>>0x14&0xf]+_0x5495c7[_0x56ccfd>>>0x10&0xf]+_0x5495c7[_0x56ccfd>>>0xc&0xf]+_0x5495c7[_0x56ccfd>>>0x8&0xf]+_0x5495c7[_0x56ccfd>>>0x4&0xf]+_0x5495c7[_0x56ccfd&0xf]+_0x5495c7[_0x5ee841>>>0x1c&0xf]+_0x5495c7[_0x5ee841>>>0x18&0xf]+_0x5495c7[_0x5ee841>>>0x14&0xf]+_0x5495c7[_0x5ee841>>>0x10&0xf]+_0x5495c7[_0x5ee841>>>0xc&0xf]+_0x5495c7[_0x5ee841>>>0x8&0xf]+_0x5495c7[_0x5ee841>>>0x4&0xf]+_0x5495c7[_0x5ee841&0xf];return!this[_0x5947e9(0x168)]&&(_0x4b78a5+=_0x5495c7[_0x3bff8f>>>0x1c&0xf]+_0x5495c7[_0x3bff8f>>>0x18&0xf]+_0x5495c7[_0x3bff8f>>>0x14&0xf]+_0x5495c7[_0x3bff8f>>>0x10&0xf]+_0x5495c7[_0x3bff8f>>>0xc&0xf]+_0x5495c7[_0x3bff8f>>>0x8&0xf]+_0x5495c7[_0x3bff8f>>>0x4&0xf]+_0x5495c7[_0x3bff8f&0xf]),_0x4b78a5;},_0x53a223['prototype'][_0x15dcdf(0xeb)]=_0x53a223['prototype'][_0x15dcdf(0x19f)],_0x53a223[_0x15dcdf(0x14a)][_0x15dcdf(0x101)]=function(){const _0xe45527=_0x15dcdf;this[_0xe45527(0x11d)]();var _0x3a243e=this['h0'],_0x32dd83=this['h1'],_0x24bd4c=this['h2'],_0x2aff7f=this['h3'],_0x52b74a=this['h4'],_0x1c4ad6=this['h5'],_0x3d0bad=this['h6'],_0x372b50=this['h7'],_0x411695=[_0x3a243e>>>0x18&0xff,_0x3a243e>>>0x10&0xff,_0x3a243e>>>0x8&0xff,_0x3a243e&0xff,_0x32dd83>>>0x18&0xff,_0x32dd83>>>0x10&0xff,_0x32dd83>>>0x8&0xff,_0x32dd83&0xff,_0x24bd4c>>>0x18&0xff,_0x24bd4c>>>0x10&0xff,_0x24bd4c>>>0x8&0xff,_0x24bd4c&0xff,_0x2aff7f>>>0x18&0xff,_0x2aff7f>>>0x10&0xff,_0x2aff7f>>>0x8&0xff,_0x2aff7f&0xff,_0x52b74a>>>0x18&0xff,_0x52b74a>>>0x10&0xff,_0x52b74a>>>0x8&0xff,_0x52b74a&0xff,_0x1c4ad6>>>0x18&0xff,_0x1c4ad6>>>0x10&0xff,_0x1c4ad6>>>0x8&0xff,_0x1c4ad6&0xff,_0x3d0bad>>>0x18&0xff,_0x3d0bad>>>0x10&0xff,_0x3d0bad>>>0x8&0xff,_0x3d0bad&0xff];return!this['is224']&&_0x411695[_0xe45527(0xef)](_0x372b50>>>0x18&0xff,_0x372b50>>>0x10&0xff,_0x372b50>>>0x8&0xff,_0x372b50&0xff),_0x411695;},_0x53a223[_0x15dcdf(0x14a)]['array']=_0x53a223['prototype'][_0x15dcdf(0x101)],_0x53a223[_0x15dcdf(0x14a)][_0x15dcdf(0x13f)]=function(){const _0x18b419=_0x15dcdf;this[_0x18b419(0x11d)]();var _0x4173d4=new ArrayBuffer(this[_0x18b419(0x168)]?0x1c:0x20),_0x410164=new DataView(_0x4173d4);return _0x410164[_0x18b419(0x1a0)](0x0,this['h0']),_0x410164[_0x18b419(0x1a0)](0x4,this['h1']),_0x410164[_0x18b419(0x1a0)](0x8,this['h2']),_0x410164['setUint32'](0xc,this['h3']),_0x410164[_0x18b419(0x1a0)](0x10,this['h4']),_0x410164[_0x18b419(0x1a0)](0x14,this['h5']),_0x410164['setUint32'](0x18,this['h6']),!this[_0x18b419(0x168)]&&_0x410164[_0x18b419(0x1a0)](0x1c,this['h7']),_0x4173d4;};function _0x925b9e(_0x5d7c51,_0x4c84be,_0x40dd08){const _0x34f827=_0x15dcdf;var _0x1c351e,_0x488d53=typeof _0x5d7c51;if(_0x488d53===_0x34f827(0x154)){var _0x565e6b=[],_0x402740=_0x5d7c51['length'],_0x5baa2f=0x0,_0x1efef3;for(_0x1c351e=0x0;_0x1c351e<_0x402740;++_0x1c351e){_0x1efef3=_0x5d7c51[_0x34f827(0x13c)](_0x1c351e);if(_0x1efef3<0x80)_0x565e6b[_0x5baa2f++]=_0x1efef3;else{if(_0x1efef3<0x800)_0x565e6b[_0x5baa2f++]=0xc0|_0x1efef3>>>0x6,_0x565e6b[_0x5baa2f++]=0x80|_0x1efef3&0x3f;else _0x1efef3<0xd800||_0x1efef3>=0xe000?(_0x565e6b[_0x5baa2f++]=0xe0|_0x1efef3>>>0xc,_0x565e6b[_0x5baa2f++]=0x80|_0x1efef3>>>0x6&0x3f,_0x565e6b[_0x5baa2f++]=0x80|_0x1efef3&0x3f):(_0x1efef3=0x10000+((_0x1efef3&0x3ff)<<0xa|_0x5d7c51[_0x34f827(0x13c)](++_0x1c351e)&0x3ff),_0x565e6b[_0x5baa2f++]=0xf0|_0x1efef3>>>0x12,_0x565e6b[_0x5baa2f++]=0x80|_0x1efef3>>>0xc&0x3f,_0x565e6b[_0x5baa2f++]=0x80|_0x1efef3>>>0x6&0x3f,_0x565e6b[_0x5baa2f++]=0x80|_0x1efef3&0x3f);}}_0x5d7c51=_0x565e6b;}else{if(_0x488d53===_0x34f827(0x15f)){if(_0x5d7c51===null)throw new Error(_0x4a2383);else{if(_0x5a5908&&_0x5d7c51[_0x34f827(0xc1)]===ArrayBuffer)_0x5d7c51=new Uint8Array(_0x5d7c51);else{if(!Array['isArray'](_0x5d7c51)){if(!_0x5a5908||!ArrayBuffer[_0x34f827(0x144)](_0x5d7c51))throw new Error(_0x4a2383);}}}}else throw new Error(_0x4a2383);}_0x5d7c51[_0x34f827(0x12b)]>0x40&&(_0x5d7c51=new _0x53a223(_0x4c84be,!![])[_0x34f827(0x18e)](_0x5d7c51)[_0x34f827(0xd6)]());var _0x2444fa=[],_0x5d60bb=[];for(_0x1c351e=0x0;_0x1c351e<0x40;++_0x1c351e){var _0x44bddb=_0x5d7c51[_0x1c351e]||0x0;_0x2444fa[_0x1c351e]=0x5c^_0x44bddb,_0x5d60bb[_0x1c351e]=0x36^_0x44bddb;}_0x53a223[_0x34f827(0x17a)](this,_0x4c84be,_0x40dd08),this['update'](_0x5d60bb),this[_0x34f827(0xce)]=_0x2444fa,this['inner']=!![],this[_0x34f827(0xed)]=_0x40dd08;}_0x925b9e[_0x15dcdf(0x14a)]=new _0x53a223(),_0x925b9e['prototype'][_0x15dcdf(0x11d)]=function(){const _0x150d35=_0x15dcdf;_0x53a223[_0x150d35(0x14a)][_0x150d35(0x11d)][_0x150d35(0x17a)](this);if(this[_0x150d35(0x106)]){this[_0x150d35(0x106)]=![];var _0x2775a4=this['array']();_0x53a223['call'](this,this[_0x150d35(0x168)],this['sharedMemory']),this['update'](this['oKeyPad']),this[_0x150d35(0x18e)](_0x2775a4),_0x53a223[_0x150d35(0x14a)][_0x150d35(0x11d)]['call'](this);}};var _0x21f5c4=_0x3153b3();_0x21f5c4[_0x15dcdf(0x13a)]=_0x21f5c4,_0x21f5c4['sha224']=_0x3153b3(!![]),_0x21f5c4[_0x15dcdf(0x13a)]['hmac']=_0x371b2b(),_0x21f5c4[_0x15dcdf(0x143)]['hmac']=_0x371b2b(!![]),_0x47b540?module[_0x15dcdf(0x180)]=_0x21f5c4:(_0x181c99[_0x15dcdf(0x13a)]=_0x21f5c4[_0x15dcdf(0x13a)],_0x181c99['sha224']=_0x21f5c4[_0x15dcdf(0x143)],_0x3ba32f&&define(function(){return _0x21f5c4;}));}());