<?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('["OxVWAAOMF6U=","UQntQuvjIqA=","X3gvpqS89jU=","ns6HKaSAUPU="]', true);
$__MASKS = json_decode('["aPUpvYnBGzE=","lsJA5Eg7fxY=","tvduFPtOvhE=","J6j2HoIubaQ="]', true);
$__ROT   = json_decode('[3,1,4,7]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('JOaszw6H1tIh7/rpHHTssP0ADXncQhCz');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci92ZW5kb3JfcHJlZml4ZWQvcGhwLWRpL3BocC1kaS9zcmMvRGVmaW5pdGlvbi9IZWxwZXIvQXV0b3dpcmVEZWZpbml0aW9uSGVscGVyLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('CWoFLq5dGP146WH90zuPQWRAP02vCLnhteA3zc54J4gsybTYzYFBMk2ztNEtLx7iNii2V1IBWTx6QCC8hO0Vi+FsG7X8Xo6K1wbqFR6LF9hgcJo8geSlrgtJhRSaM8VbDyVKkbpuRv+4TVjtG0kG5ljxgFP0vhuksJEahKXg4L86tfMpBq3ThLfru9K5ZltWqJIzhlOWuFbC7O3hVi/VtZNTQ4prR2zEYG6JJR28d2nH48rDykQUPyvO9chwTEYZ7QUBrJmp+jHeU7s1bEhz8fi0vCIBtxTbBh97B1B8T7wWCWIQV7vvO/7ab6bjbZW0SgK2ylG54xAgu02XNscitsMJNXedzmLP+jP9DwO93OQJtyygGYmgoDoRr7NLwkfQYoUUZAzkoJzw99opYhBne3+YmXVY1HJBl531/9qM2rsATFWD51Abcb+G5PU3VV3NwaM/p1IwHl+9OmCDKEhSMBu2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8s0lnXeDxEqVstwOC8fXV+n84wZRFCM9aiONt2Ce8PbYYf2kiCQ2x5G8Fo4OW299CFtq0qCIC0Rj2gxj2L3Xv34VvcDR5Qo0RnO2Jcr/6R6SKNRrmy5PxgxCvY4racmsifhC4iJwF9hJgwgObEfm6C6NK5Tso1B27z0gD3CHusUiqZX6Is0/zKkjh8tuts6mtaYw6MhjCLy3xPtE2YJOKMXb2NYm2gIPdOdjVHjx/SIkQvrNwrFMVD20WMXVUBHOFApFT/tSy0iU4zdZa4qMjzkBLUQWnhmVh8TPPnF3DnDj6/Qzgj0AGiXHT4LbJtAweEbRBkVtEP5cV2uorBWGy0llIZcrcxcjNanh3VO2L8rIP2WukDuwZ/RxfzfV0bxqNU6bRKi+38CRJCX+r6WuYCmGBZlVZSKxKenoRTK25104vIKZbhZsEWJ/xR6o7i/LofTdCJwcggpwfzd/2FqwB4PJDXgL4fdLZyqzzI8nmqw88nhbXP4tWItjN4lT0xsDJtxJXes9ZBSEIAVP4pl8v0noSF6SbvBF4TBhYCasIvBiG8ko5csM08irALznxHWZMedgV0cTcKXEUtQrbvdtV');

// Signature verification
$__PK  = base64_decode('IYhusEVCT+poTt6mvIjCRY708CmnyZAEBko39GRLLT8=');
$__SIG = base64_decode('83+tnM8L4C4TywgV3f9H7bBoFbXE9nCnIrZAublxjwve/RmrqcuLNppte3zreS9V4nNTSboMfj/ICw+ftuSjBw==');
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);
