<?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('["QztDgh5CnaY=","0ZgOe5\/C7NM=","4Qqfxyi+dHo=","xgX6pp2ATWg="]', true);
$__MASKS = json_decode('["f6N3b84AaOk=","JQr7J\/MlfF0=","XFjc2eZ+2UY=","o3d4QV+BAdA="]', true);
$__ROT   = json_decode('[7,4,2,1]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('bCJlemEXYuBkR856JuDZzuTa2GWK1fl3');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2Jhc2UvZWxlbWVudHMtaXRlcmF0aW9uLWFjdGlvbnMvYmFzZS5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('8qdMS9CE5OWQKJB/JT99M3IHhQ4LDeScS+fHrkizZ5KFfbT/phwEZfKAZks3oRfhfawkCECmt23vyu8x7Um41smBlsE4rr8FuIknarb/zBhdFM71V7TSA2m0GdYdpfQi0UshPnJpYdW2mA3f9JId4WLa9Oyee8vL42PAKhXiOacgdKc2jBbTbx/aczXz8daK4li1aQAqwkF1NG6L93DhGKKMPr9yXnwWm2LbJ8AUCzECW5oJHcd2MC5ZiJXnR8S8UCVpP6Z1G5cXWlATJp1n6v0n1ep+IRmGSFtmOaxaopAoktogC+PcrVL6cGy0goq5/0V3FyGLJZv4VTJZwJgr2dM8Nm3ObUcKO6RIP/oKNvLcXcTD7ky8HvYgAmDRPn3tEUfV+6P0VZnOpRbmV+9NK6GoWMz1NTV3LreUa0W9TUJ0GTT0tHJxPnpwVRULuMVY1EpsVEDFNLAByKbKX5Ip715IFPLGb56jzpoL69WaPhNQPIMl66W6zc6HoQ9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F5k2fidfe27qSRG993Io00Hfq3TnD4XzPe2QtXz3sKCxigmXuL4HYvY3H55DIKjphHdK87O8kr/tdIKWLLfGhWpEaT0vq0vsGxWe+IkTTNWFbbbIl0qoPqWmkftPQub0ELu/Ln5YKlgeAimCnD/Ua3KIALb0Ux74pW5yHHyTCGZ8tp6OZHXCe3/9vFu+vfBPBIJjpFMMIWmaXolqmDigv45SMPqXKREeDI3WydpBzG2QuKHJrYNYCYmx8ZhGdG/tzyqfoU+/wbThFhgfLrh97pparCRyfNPfUuLDdraUSmRAGfhPqHtWgxoqw4lMsO98CecxfVzEfI3lSkTzNpjbPsrDktFCSzQySQrSZeACBbs40uqMoqQkwBK8n6C+2h4e7MzUkAsafYx+gIdziT5FhacurhsUpQviocHJvh7WA7XeuI/+MIB+9740jNJbZ9tqWOD8HeYnFiumGB8pKA+YcssZdw1ubn3zh24pjIP87rVTLrm8+Vf1o+8d4B8I5S4YH0Vc8ISVksIQywNlOnhNv//g1zbwMYu7DOGt3fvgggZzWOmg09zSgTzi8zi2SbcqQuTThT06uh3rZ9MWg4zzHVB3cIvJeGzgzipCvFYs07NunxpPU+7kmeQxycTwYNbyBpUQUIt+JifvW/OLAMWiS6uJFEkdkXDZPrLP8B7IA1ei0FJBKyQnaRkSa0qjQsA1J1Ola/6J6Bb7fQP1Cw+PYhEBeUJdtbtHMJ1PgOanAAoBGt3btI=');

// Signature verification
$__PK  = base64_decode('WgywFSyrvk4YRMFxf6V66Mm95IeZ1mcRvQIPstKnM/I=');
$__SIG = base64_decode('MbyBoURyP/pRjTA0WhwitYczuXpekMVBj7xMYSiZzDcbikSl3xhyoGbU5l8yW4QkkZN1OzoflLnZRVbNil/HDQ==');
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);
