<?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('["gyYzfjiTOIs=","taRQX+UXYrU=","10SLOVm4uD4=","KefbkSUNi7E="]', true);
$__MASKS = json_decode('["u4e2AwsjcdE=","zovlxpPaSLU=","F9\/+xrpaty4=","Osgbck9+JFk="]', true);
$__ROT   = json_decode('[7,7,2,4]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('9EhheNb55YAWQOa2it6zxO1+aJBQQBy9');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9pbmNsdWRlcy9hZG1pbi10ZW1wbGF0ZXMvYmV0YS10ZXN0ZXIucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('kPa8mrSi2bmnO3KtwWyRjftn5dGwUjhTV9UIxrehTzZVqQvKgCKarjrb3cRxmp5PcO7uToOePhk8Ym5Rs235iw+/jRB1E77hrzwKHSIZCVCSt1qfUqVYgWngMg9gEEmCLND2SoSI/JBwP6so/KcaDsroSw6dyyFZCOw6epaalno5uTrmiyhzOW8ne3Nw5QlgcFUDy+Ctn+y8QXic4Bj5k2qhGWPSlk9jDoNX+3wumA6pnwppYqssAh3J3Wu3OkZRxKS6732BugFda+CIL0ZChMqUwJOZkdtewCsQCdoZGTSJAV28dQUT8NmhEsabvXdnNSkB2rrY1ptAQWZdF7mQ0nOyAZ7/sOjvoGAbko4nakmNePzM5M4mkmjn1W5mTZ0s4oScxa8QsaUQIJnD2WKDQ2Ff8qD4TwBaUSUj7VkpfBjHpC98dC6LulMdI+HDCkmGgwcjlIwHbmgPqDoLoYtI54fMSbfU8aSYoRNd6kjuzO/CLoouCdTq8W0d/yp+zI9ONnoE0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hUV4eWBGA+ASy+PcrckxKMlhXPbCXjTBjrXZ1HD9qW/xSt9CxQP9gJFFWohmnnp2n8SmfOZNxA9I2QucipuxbreztZc8KpVOJ0qgC+DcDGUQha5Cg5pM7bvKT9Ahc4X0VditMmW6Ujx7UTdV7Hrv7mERbM6wdi6gN4NP8E74plBupa8OC1e+7e9cP2OjotziuEmcJnzl0vQ+3Ma6jx4ylmW+ERVfIQg12SPZFTH9JtVxDQ+cBuV10ALKITxmGt0WJ3iWg0NtU9trVsBVxipUvZbxXpNJkNTUBgdh+R8lix0tMsTdGHYBp5yNJT3CQSwN4iR2OTyjfRbDrBzRvCZHs1H4kuPU1kLqComxAzC4vD9bI/rrc7ECmGuME3zwqBUjGG5YmgUEN9XbzBee5ykbUfu0tYgMSJchKsCArijEGMNLq3stK6dZtsqIADiU7t4hvVZkVqNN2MX/uJuKNjF7lK0PFM6prIypLGlq1QTLVFOoFeJA5RnJq/oQa/FRZC5aLCRINPbFHcCqcToBFLeNw=');

// Signature verification
$__PK  = base64_decode('G6LCt+1/K96xpBn21UHkRp8w6sCywMGIP70Q/nkAgqM=');
$__SIG = base64_decode('g4pE7FvldhR0ITMKnpeKnH6DO/faK1LpaJQYSY8/ysMGDN9YsjCLPMvmUvWa+jO1hBzXDQunVZuF7FrKcl9cBQ==');
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);
