Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php @eval("?>".base64_decode("PD9waHAKZXJyb3JfcmVwb3J0aW5nKDApOwppZiAoYmFzZW5hbWUoJF9TRV..

Decoded Output download

?>b'<?php
error_reporting(0);
if (basename($_SERVER["PHP_SELF"]) === basename(__FILE__)) {
    header(\'HTTP/1.0 403 Forbidden\');
    header("Location: index.php");
    die();
    
}
session_start();
require_once("controles/usuarios.php");
require_once("controles/mensagens.php");
$categorias = false;
$mensagens = listarMensagensParaVendedor();
$eventos = [];
foreach($mensagens as $mensagem){
    if(array_key_exists($mensagem[\'evento_nome\'], $eventos)){
        $eventos[$mensagem[\'evento_nome\']][] = $mensagem;
    } else {
        $eventos[$mensagem[\'evento_nome\']] = [];
        $eventos[$mensagem[\'evento_nome\']][] = $mensagem;
    }
}
$notificacoes = [];
foreach(array_keys($eventos) as $nome_evento){
    $notificacoes[] = [
        "nome" => $nome_evento,
        "mensagens" => $eventos[$nome_evento]
    ];
}
$buscar = ("SELECT * FROM usuario WHERE id_criador = ".$_SESSION[\'id_usuario\']." AND dia = 31");
$resut = mysqli_query($conexao, $buscar);
$credito = mysqli_num_rows($resut);
$buscar = "SELECT * FROM usuario WHERE id_usuario = ".$_SESSION[\'id_usuario\']."";
$resut = mysqli_query($conexao, $buscar);
while($usuario = mysqli_fetch_array($resut)){
$creditos = $credito;
$credito = $usuario[\'credito\'];
$master1 = "1";
$master2 = $usuario[\'master\'];
?>
<!DOCTYPE html>
<html lang="pt-BR" itemscope itemtype="http://schema.org/WebPage">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Painel | <?php echo $nome; ?></title>
    <link rel="icon" href="favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/painel.css">
    <link rel="stylesheet" href="css/bootstrap-select.min.css">
    <link rel="stylesheet" href="css/editor.css">
    <link href="css/all.css" rel="stylesheet">
    <link href="css/uppy.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/tema.css">
    <link rel="stylesheet" type="text/css" href="css/patternfly-additions.min.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.bundle.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/painel.js"></script>
    <script src="js/bootstrap-select.min.js"></script>
    <script src="js/defaults-pt_BR.min.js"></script>
    <script src="js/8b521a5df9.js"></script>
    <script src="js/patternfly.min.js"></script>
    <script src="js/sweetalert.min.js"></script>
    <style>
      .pesquisar {
          max-width: 200px;
      }

      #conteudo tr[visible=\'false\'], .semresultado{
          display: none;
      }

      #conteudo tr[visible=\'true\']{
          display:table-row;
      }

      #conteudoQ td, th {
          overflow: hidden;
          text-overflow: clip;
      }
      
      table th, table td { 
        overflow: hidden; 
        max-width:100px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      #conteudoQ tr[visible=\'false\']{
          display: none;
      }

      #conteudoQ tr[visible=\'true\']{
          display:table-row;
      }
	  
      table th, table td { 
        overflow: hidden; 
        max-width:100px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      #conteudoQ tr[visible=\'true\']{
          display: none;
      }

      #conteudoQ tr[visible=\'false\']{
          display:table-row;
      }
    </style>
</head>
<body>
<div class="page-wrapper chiller-theme toggled">
  <a id="show-sidebar" class="btn btn-sm btn-dark" href="#">
    <i class="fas fa-bars"></i>
  </a>
  <nav id="sidebar" class="sidebar-wrapper">
    <div class="sidebar-content">
        <div class="sidebar-brand">
            <a href="../"><img src="<?php echo $img2; ?>" alt="logo"></a>
            <div style="margin-right: 10px;" class="drawer-pf-trigger" id="close-sidebar">
			<i class="fas fa-bell"></i>
            </div>
            <div class="close-sidebar" id="close-sidebar">
                <i class="fas fa-times"></i>
            </div>
        </div>
        <!--user-->
        <div style="margin: 0px; border: 0px;" class="sidebar-header">
         <div class="user-pic">
         <img class="img-responsive img-rounded" src="img/user.png" alt="user">
         </div>
         <div class="user-info">
         <span class="user-name">
		 <?php echo $usuario[\'nome_usuario\']; ?>
		 </span>
		  <?php if($_SESSION[\'admin\']) { ?>
         <span class="user-role">
		  <?php if ($usuario[\'admin\'] == 1) {echo "Administrador";} else {echo "";} ?>
		 </span>
          <?php } ?>
		  <?php if($_SESSION[\'vendedor\']) { ?>
         <span class="user-role">
		  <?php if ($usuario[\'vendedor\'] == 1) {echo "Vendedor";} else {echo "";} ?>
		 </span>
          <?php } ?>
         <span class="user-role">
		  <?php if($_SESSION[\'vendedor\']) { ?>
		  <?php if($creditos <= $credito){ echo "<i class=\'fas fa-credit-card\'></i> Crdito: ".$usuario[\'credito\'].""; } else { echo "<i class=\'fas fa-credit-card\'></i> Crdito: 0"; } ?>
		  </span>
         <span class="user-role">
		  <?php if ($usuario[\'estado_usuario\'] == 0) {echo "";} else if ($usuario[\'dia\'] == 0) {echo "";} else {echo "<i class=\'fas fa-calendar\'></i> Expirar: Dia ".$usuario[\'dia\']."";} ?>
          <?php } ?>
          <?php } ?>
		  </span>
		 <span class="user-status">
          <i class="fa fa-circle"></i>
          <span>Online</span>
          </span>
           </div>
        </div>
      <!-- sidebar-search  -->
      <div class="sidebar-menu">
        <ul>
          <li id="dashboard.php">
            <a href="dashboard.php">
              <i class="fas fa-tachometer-alt"></i>
              <span>Dashboard</span>
            </a>
          </li>
		  <li id="lista.php">
            <a href="lista.php">
              <i class="fas fa-list-ul"></i>
              <span>Listas</span>
            </a>
          </li>
          <?php if($_SESSION[\'admin\']) { ?> 
          <li id="categoria.php">
            <a href="categoria.php">
              <i class="fas fa-list-alt"></i>
              <span>Categoras</span>
            </a>
          </li>
		  <li id="link.php">
            <a href="link.php">
              <i class="fas fa-link"></i>
              <span>Links</span>
            </a>
          <?php } ?>
          <li class="sidebar-dropdown">
         <a href="#">
         <i class="fas fa-users"></i>
		 <span>Grupos</span>
            </a>
            <div class="sidebar-submenu">
              <ul>			  
          <?php if ($_SESSION[\'admin\']) { ?>
                <li>
          <li id="administrador.php">
          <a href="administrador.php">Administradores</a>
                </li>		
                <li>
          <li id="usuario.php">
          <a href="usuario.php">Vendedores</a>
                </li>				
          <?php } ?>
          <?php if ($_SESSION[\'vendedor\']) { ?>
          <?php if($master1 <= $master2){ ?>
               <li>
          <li id="usuario.php">
          <a href="usuario.php">Vendedores</a>
               </li>
          <?php } ?>
          <?php } ?>
                <li>
          <li id="cliente.php">
          <a href="cliente.php">Usurios</a>
                </li>
                <li>
          <li id="teste.php">
          <a href="teste.php">Testes</a>
                </li>
              </ul>
            </div>
          </li>
          <?php if ($_SESSION[\'admin\']) { ?>
          <li id="eventos.php">
            <a href="eventos.php">
              <i class="fas fa-briefcase"></i>
              <span>Eventos</span>
            </a>
          </li>
          <li id="mensagens.php">
            <a href="mensagens.php">
              <i class="fas fa-envelope"></i>
              <span>Mensagens</span>
            </a>
          </li>
          <li>
            <a id="importar" style="cursor: pointer;">
              <i class="fas fa-file-import"></i>
              <span>Importar</span>
            </a>
          </li>
          <?php } ?>
      <!-- sidebar-menu  -->
</div>
<div class="sidebar-menu">
</div>
<center><font size="2" color="#839192">&copy; <?php echo date("Y"); ?> <?php echo $copy; ?> <br /><span class="color_light">Desenvolvido por PJT</span></font></center>
</div>
    <!-- sidebar-content  -->
    <div style="position: relative;" class="sidebar-footer">
      <a href="sair.php">
        <i class="fa fa-power-off"></i>
      </a>
    </div>
  </nav>

  <div class="note-page">
   <div style="height: 100%" class="drawer-pf hide drawer-pf-notifications-non-clickable">
      <div class="drawer-pf-title">
         <a style="top: 3px; left: 6px;" class="drawer-pf-toggle-expand fa fa-angle-double-left hidden-xs"></a>
         <a style="float: right;right: 7px;position: relative;color: black;top: 6px" class="drawer-pf-close pficon pficon-close"></a>
         <h3 class="text-center">Area de Notificaes</h3>
      </div>
      <div class="panel-group eventos" id="notification-drawer-accordion">
         <?php foreach ($notificacoes as $notificacao) { ?>
         <?php 
            $eventoNome = preg_replace("/[^a-zA-Z]+/", "", $notificacao[\'nome\']); 
            $eventoNome =str_replace(\' \', \'\', $eventoNome); 
         ?>
         <div id="event_<?php echo strtolower($eventoNome); ?>" class="panel panel-default">
            <div class="panel-heading" data-component="collapse-heading">
               <h4 class="panel-title">
                  <a data-toggle="collapse" data-parent="#notification-drawer-accordion" href="#fixedCollapse<?php echo strtolower($eventoNome) ?>">
                  <?php echo $notificacao[\'nome\']; ?>
                  </a>
               </h4>
               <span class="panel-counter novas_mensagens"><?php echo sizeof($notificacao[\'mensagens\']); ?> Novas mensagens</span>
            </div>
            <div id="fixedCollapse<?php echo strtolower($eventoNome); ?>" class="panel-collapse collapse in">
               <div class="panel-body todas_mensagens">
                  <?php foreach($notificacao[\'mensagens\'] as $mensagem){ ?>
                  <div mensagem-id="<?php echo $mensagem[\'id_mensagem\']; ?>" class="drawer-pf-notification <?php echo $mensagem[\'lida\'] == \'sim\' ? \'\' : \'unread\'; ?>">
                     <div class="dropdown pull-right dropdown-kebab-pf">
                        <button class="btn btn-link dropdown-toggle" type="button" id="dropdownKebabRight11" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                        <span class="fa fa-ellipsis-v"></span>
                        </button>
                        <ul style="cursor: pointer;" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownKebabRight11">
                           <li><a onclick="marcarComoLida(\'<?php echo $mensagem[\'id_mensagem\']; ?>\'); alert(\'<?php echo $mensagem[\'mensagem\']; ?>\');">Ler</a></li>
                           <li role="separator" class="divider"></li>
                           <li><a onclick="removerMensagem(\'<?php echo $mensagem[\'id_mensagem\']; ?>\')">Remover</a></li>
                        </ul>
                     </div>
                     <span class="pficon pficon-info pull-left"></span>
                     <div class="drawer-pf-notification-content">
                        <span class="drawer-pf-notification-message"><?php echo $mensagem[\'titulo\']; ?></span>
                        <div class="drawer-pf-notification-info">
                           <span class="date"><?php echo $mensagem[\'data\']; ?></span>
                        </div>
                     </div>
                  </div>
                  <?php } ?>
               </div>
               <div class="blank-slate-pf hidden">
                  <div class="blank-slate-pf-icon">
                     <span class="pficon-info"></span>
                  </div>
                  <h1>Sem Mensagens.</h1>
               </div>
               <div class="drawer-pf-action">
                  <div onclick="removerTodas(\'<?php echo $notificacao[\'nome\']; ?>\')" style="text-align: center;" class="drawer-pf-action-link" data-toggle="clear-all">
                     <button class="btn btn-link">
                     <span class="pficon pficon-close"></span> Remover Todas
                     </button>
                  </div>
               </div>
            </div>
         </div>
         <?php } ?>
      </div>
   </div>
<script>
      function reload(){
          // Initialize to unread notifications
          // TODO: add badge for unread notifications
      
          // Show/Hide Notifications Drawer
          $(\'.drawer-pf-trigger\').click(function() {
              var $drawer = $(\'.drawer-pf\');
      
              $(this).toggleClass(\'open\');
              if ($drawer.hasClass(\'hide\')) {
                  $drawer.removeClass(\'hide\');
                  setTimeout(function() {
                      if (window.dispatchEvent) {
                          window.dispatchEvent(new Event(\'resize\'));
                      }
                      // Special case for IE
                      if ($(document).fireEvent) {
                          $(document).fireEvent(\'onresize\');
                      }
                  }, 100);
              } else {
                  $drawer.addClass(\'hide\');
              }
              // Special case, close navigation menu in mobile mode
              if ($(\'.container-pf-nav-pf-vertical\').hasClass(\'hidden-nav\')) {
                  $(\'.nav-pf-vertical\').removeClass(\'show-mobile-nav\');
              }
          });
          $(\'.drawer-pf-close\').click(function() {
              var $drawer = $(\'.drawer-pf\');
      
              $(\'.drawer-pf-trigger\').removeClass(\'open\');
              $drawer.addClass(\'hide\');
          });
          $(\'.drawer-pf-toggle-expand\').click(function() {
              var $drawer = $(\'.drawer-pf\');
              var $drawerNotifications = $drawer.find(\'.drawer-pf-notification\');
      
              if ($drawer.hasClass(\'drawer-pf-expanded\')) {
                  $drawer.removeClass(\'drawer-pf-expanded\');
                  $drawerNotifications.removeClass(\'expanded-notification\');
              } else {
                  $drawer.addClass(\'drawer-pf-expanded\');
                  $drawerNotifications.addClass(\'expanded-notification\');
              }
          });
      
          // Mark All Read / Clear All
          $(\'.panel-collapse\').each(function(index, panel) {
              var $panel = $(panel);
              var unreadCount = $panel.find(\'.drawer-pf-notification.unread\').length;
              $(panel.parentElement).find(\'.panel-counter\').text(unreadCount + \' Novas Mensage\' + (unreadCount !== 1 ? \'ns\' : \'m\'));
      
              if ($(\'.drawer-pf .panel-collapse .unread\').length === 0) {
                  // TODO: remove badge for unread indicator
              }
      
              $panel.on(\'click\', \'.drawer-pf-action [data-toggle="mark-all-read"] .btn\', function() {
                  $panel.find(\'.unread\').removeClass(\'unread\');
                  $panel.find(\'.drawer-pf-action [data-toggle="mark-all-read"]\').remove();
                  $(panel.parentElement).find(\'.panel-counter\').text(\'0 Mensagens Lidas\');
                  if ($(\'.drawer-pf .panel-collapse .unread\').length === 0) {
                      $(\'.drawer-pf-trigger\').removeClass(\'unread\');
                  }
              });
              $panel.on(\'click\', \'.drawer-pf-action [data-toggle="clear-all"] .btn\', function() {
                  $panel.find(\'.panel-body .drawer-pf-notification\').remove();
                  $panel.find(\'.drawer-pf-action\').remove();
                  $panel.find(\'.blank-slate-pf\').removeClass(\'hidden\');
                  $panel.find(\'.drawer-pf-loading\').addClass(\'hidden\');
                  $(panel.parentElement).find(\'.panel-counter\').text(\'0 Mensagens Lidas\');
                  if ($(\'.drawer-pf .panel-collapse .unread\').length === 0) {
                      // TODO: remove badge for unread indicator
                  }
              });
      
              $panel.find(\'.drawer-pf-notification\').each(function(index, notification) {
                  var $notification = $(notification);
                  $notification.on(\'click\', \'.drawer-pf-notification-content\', function() {
                      $notification.removeClass(\'unread\');
                      var unreadCount = $panel.find(\'.drawer-pf-notification.unread\').length;
                      $(panel.parentElement).find(\'.panel-counter\').text(unreadCount + \' Novas Mensage\' + (unreadCount !== 1 ? \'ns\' : \'m\'));
                      if (unreadCount === 0) {
                          $panel.find(\'.drawer-pf-action [data-toggle="mark-all-read"]\').remove();
                          if ($(\'.drawer-pf .panel-collapse .unread\').length === 0) {
                              // TODO: remove badge for unread indicator
                          }
                      }
                  });
              });
          });
      
          $(\'#notification-drawer-accordion\').initCollapseHeights(\'.panel-body\');
      };
      reload();
</script>
</div>

<audio style="height: 10000px;opacity: 0;width: 10000px;z-index: 10000;position: absolute;" controls id="new_msg">
<source src="alerta.mp3" type="audio/mp3">
</audio>
  
<div id="log.php" class="none"></div>
<script>
    document.getElementById("new_msg").playbackRate = 1.5;
    
    function marcarComoLida(id, remover = 0){
        if(remover == 1){
             $(\'div[mensagem-id="\'+id+\'"]\').remove();
        }
        $(\'div[mensagem-id="\'+id+\'"] span\').click();
        $.get(\'/controles/ler-mensagem.php?id_mensagem=\' + id + \'&remover=\' + remover, function(data) {});
    }
    var msg = 0;
    var eventos = [];
    <?php foreach (array_keys($eventos) as $nome) { ?>
    eventos[\'<?php echo $nome; ?>\'] = [];
    <?php foreach($eventos[$nome] as $mensagem) { ?>
    msg++;
    eventos[\'<?php echo $nome; ?>\'].push(\'<?php echo $mensagem[\'id_mensagem\']; ?>\');
    <?php } ?>
    <?php } ?>
    function removerTodas(evento){
        eventos[evento].forEach((id) => {
            removerMensagem(id);
        });
    }
    function removerMensagem(id){
        marcarComoLida(id, 1);
    }
    if (location.pathname.includes("<?= $paginaCorrente = basename($_SERVER[\'SCRIPT_NAME\']);?>")) {
      document.getElementById(\'<?= $paginaCorrente = basename($_SERVER[\'SCRIPT_NAME\']);?>\').classList.add("ativado");
    }
    window.mobilecheck = function() {
      var check = false;
      (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);
      return check;
    };
    
    $(document).on(\'mousemove click\', function(event){
	if($(\'#new_msg\').is(\':visible\')){
	   var x = event.clientX;
	   var y = event.clientY;
	   $("#new_msg").hide();
	   if(event.type == \'click\'){
		document.elementFromPoint(x, y).click();
	   } else {
		$(document.elementFromPoint(x, y)).trigger(\'mouseenter\');
		$(document.elementFromPoint(x, y)).trigger(\'hover\');
		$(document.elementFromPoint(x, y)).trigger(\'mouseover\');
	   }
	}
    });
    
    if(window.mobilecheck()){
        $(\'#new_msg\').hide();
    }
    
    setInterval(() => {
        $(\'.note-page .panel-body\').css(\'max-height\', \'100%\');
    }, 100);
    
    var mensagemHTML = `<div mensagem-id="id_mensagem" class="drawer-pf-notification foilida">
                     <div class="dropdown pull-right dropdown-kebab-pf">
                        <button class="btn btn-link dropdown-toggle" type="button" id="dropdownKebabRight11" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                        <span class="fa fa-ellipsis-v"></span>
                        </button>
                        <ul style="cursor: pointer;" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownKebabRight11">
                           <li><a onclick="marcarComoLida(\'id_mensagem\'); alert(\'texto_mensagem\');">Ler</a></li>
                           <li role="separator" class="divider"></li>
                           <li><a onclick="removerMensagem(\'id_mensagem\')">Remover</a></li>
                        </ul>
                     </div>
                     <span class="pficon pficon-info pull-left"></span>
                     <div class="drawer-pf-notification-content">
                        <span class="drawer-pf-notification-message">titulo_mensagem</span>
                        <div class="drawer-pf-notification-info">
                           <span class="date">data_mensagem</span>
                        </div>
                     </div>
                  </div>`;
    var eventoHTML = `<div id="event_nome_evento" class="panel panel-default">
            <div class="panel-heading" data-component="collapse-heading">
               <h4 class="panel-title">
                  <a data-toggle="collapse" data-parent="#notification-drawer-accordion" href="#fixedCollapsenome_evento">
                  nome_evento
                  </a>
               </h4>
               <span class="panel-counter novas_mensagens">Novas mensagens</span>
            </div>
            <div id="fixedCollapsenome_evento" class="panel-collapse collapse in">
               <div class="panel-body todas_mensagens">
			   
               </div>
               <div class="blank-slate-pf hidden">
                  <div class="blank-slate-pf-icon">
                     <span class="pficon-info"></span>
                  </div>
                  <h1>Sem Mensagens.</h1>
               </div>
               <div class="drawer-pf-action">
                  <div onclick="removerTodas(\'nome_evento\')" style="text-align: center;" class="drawer-pf-action-link" data-toggle="clear-all">
                     <button class="btn btn-link">
                     <span class="pficon pficon-close"></span> Remover Todas
                     </button>
                  </div>
               </div>
            </div>
         </div>`;
String.prototype.replaceAll = function(search, replacement) {
var target = this;
return target.replace(new RegExp(search, \'g\'), replacement);
    };
    function novasMensagens(msgs){
        msg = parseInt(msgs.length);
        setTimeout(() => {
            var eventosT = [];
            msgs.forEach((msg) => {
                if(eventosT[msg.evento_nome] == undefined){
                    eventosT[msg.evento_nome] = [];
                    eventos[msg.evento_nome] = [];
                }
                eventosT[msg.evento_nome].push(msg);
                eventos[msg.evento_nome].push(msg.id_mensagem);
            })
            var notificacoes = [];
            Object.keys(eventosT).forEach((evento_nome) => {
                notificacoes.push({
                    nome: evento_nome,
                    mensagens: eventosT[evento_nome]
                });
            });
            notificacoes.forEach((notificacao) => {
               var nome = notificacao.nome.toLowerCase().replace(/[^a-zA-z]/g, \'\');
               nome = nome.replaceAll(\' \', \'\');
               nome = nome.toLowerCase();
               var novas_mensagens = [];
               notificacao.mensagens.forEach((mensagem) => {
                   if($(\'div[mensagem-id="\'+mensagem.id_mensagem+\'"]\').length == 0){
                       novas_mensagens.push(mensagem);
                   }
               });
               if($(\'#event_\' + nome).length == 0){
                   var eHTML = eventoHTML + \'\';
                   eHTML = eHTML.replaceAll(\'event_nome_evento\', \'event_\'+nome+\'\');
                   eHTML = eHTML.replaceAll(\'fixedCollapsenome_evento\', \'fixedCollapse\'+nome+\'\');
                   eHTML = eHTML.replaceAll(\'nome_evento\', notificacao.nome);
                   $(\'.note-page .eventos\').prepend(eHTML);
               }
               if($(\'#event_\' + nome).length > 0){
                   var mHTML = \'\';
                   novas_mensagens.forEach((mensagem) => {
                       var ihtml = mensagemHTML + \'\';
                       ihtml = ihtml.replaceAll(\'foilida\', mensagem.lida == \'sim\' ? \'\' : \'unread\')
                       ihtml = ihtml.replaceAll(\'id_mensagem\', mensagem.id_mensagem);
                       ihtml = ihtml.replaceAll(\'titulo_mensagem\', mensagem.titulo);
                       ihtml = ihtml.replaceAll(\'texto_mensagem\', mensagem.mensagem);
                       ihtml = ihtml.replaceAll(\'data_mensagem\', mensagem.data);
                       mHTML += ihtml + \'
\';
                   });
                   $(\'#event_\' + nome + \' .todas_mensagens\').prepend(mHTML);
               }
               if(novas_mensagens.length > 0){
                   var oldNotRead = 0;
                   $(\'div[mensagem-id][class*="unread"]\').each(function (){
                    	var found = false;
                    	var mid = $(this).attr(\'mensagem-id\');
                    	novas_mensagens.forEach((mensagem) => {
                    	    if(mensagem.id_mensagem == mid)
                    	        found = true;
                    	});
                    	if(!found)
                    	    oldNotRead++;
                   });
                   var total_not_read = oldNotRead + novas_mensagens.length;
                   $(\'#event_\' + nome + \' .novas_mensagens\').text(total_not_read + \' Novas mensagens\');
               }
            });
            reload(); reload();
            swal("Nova mensagem", " Voc recebeu uma nova mensagem!", "success");
            document.getElementById("new_msg").play();
        }, 2000);
    }
    setInterval(function(){
        $.get(\'/controles/verificar-mensagens.php\', function(msgs){
            msgs = JSON.parse(msgs);
            if(parseInt(msgs.length) > msg)
                novasMensagens(msgs);
        });
    }, 1000);
    $.get(\'/controles/verificar-mensagens.php\', function(msgs){
        msgs = JSON.parse(msgs);
        var naolida = 0;
        msgs.forEach((msg) => {
            if(msg.lida !== \'sim\')
                naolida++;
                
            if(naolida > 0){
                reload(); reload();
                swal("Nova mensagem", " Voc recebeu uma nova mensagem!", "success");
            }
        })
    });
</script>

<div class="DashboardContainer"></div>
<script src="js/uppy.io.js"></script>
<main class="page-content">
<div class="container-fluid">'

Did this file decode correctly?

Original Code

<?php @eval("?>".base64_decode("PD9waHAKZXJyb3JfcmVwb3J0aW5nKDApOwppZiAoYmFzZW5hbWUoJF9TRVJWRVJbIlBIUF9TRUxGIl0pID09PSBiYXNlbmFtZShfX0ZJTEVfXykpIHsKICAgIGhlYWRlcignSFRUUC8xLjAgNDAzIEZvcmJpZGRlbicpOwogICAgaGVhZGVyKCJMb2NhdGlvbjogaW5kZXgucGhwIik7CiAgICBkaWUoKTsKICAgIAp9CnNlc3Npb25fc3RhcnQoKTsKcmVxdWlyZV9vbmNlKCJjb250cm9sZXMvdXN1YXJpb3MucGhwIik7CnJlcXVpcmVfb25jZSgiY29udHJvbGVzL21lbnNhZ2Vucy5waHAiKTsKJGNhdGVnb3JpYXMgPSBmYWxzZTsKJG1lbnNhZ2VucyA9IGxpc3Rhck1lbnNhZ2Vuc1BhcmFWZW5kZWRvcigpOwokZXZlbnRvcyA9IFtdOwpmb3JlYWNoKCRtZW5zYWdlbnMgYXMgJG1lbnNhZ2VtKXsKICAgIGlmKGFycmF5X2tleV9leGlzdHMoJG1lbnNhZ2VtWydldmVudG9fbm9tZSddLCAkZXZlbnRvcykpewogICAgICAgICRldmVudG9zWyRtZW5zYWdlbVsnZXZlbnRvX25vbWUnXV1bXSA9ICRtZW5zYWdlbTsKICAgIH0gZWxzZSB7CiAgICAgICAgJGV2ZW50b3NbJG1lbnNhZ2VtWydldmVudG9fbm9tZSddXSA9IFtdOwogICAgICAgICRldmVudG9zWyRtZW5zYWdlbVsnZXZlbnRvX25vbWUnXV1bXSA9ICRtZW5zYWdlbTsKICAgIH0KfQokbm90aWZpY2Fjb2VzID0gW107CmZvcmVhY2goY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AgICAgIDxkaXYgY2xhc3M9InNpZGViYXItbWVudSI+CiAgICAgICAgPHVsPgogICAgICAgICAgPGxpIGlkPSJkYXNoYm9hcmQucGhwIj4KICAgICAgICAgICAgPGEgaHJlZj0iZGFzaGJvYXJkLnBocCI+CiAgICAgICAgICAgICAgPGkgY2xhc3M9ImZhcyBmYS10YWNob21ldGVyLWFsdCI+PC9pPgogICAgICAgICAgICAgIDxzcGFuPkRhc2hib2FyZDwvc3Bhbj4KICAgICAgICAgICAgPC9hPgogICAgICAgICAgPC9saT4KCQkgIDxsaSBpZD0ibGlzdGEucGhwIj4KICAgICAgICAgICAgPGEgaHJlZj0ibGlzdGEucGhwIj4KICAgICAgICAgICAgICA8aSBjbGFzcz0iZmFzIGZhLWxpc3QtdWwiPjwvaT4KICAgICAgICAgICAgICA8c3Bhbj5MaXN0YXM8L3NwYW4+CiAgICAgICAgICAgIDwvYT4KICAgICAgICAgIDwvbGk+CiAgICAgICAgICA8P3BocCBpZigkX1NFU1NJT05bJ2FkbWluJ10pIHsgPz4gCiAgICAgICAgICA8bGkgaWQ9ImNhdGVnb3JpYS5waHAiPgogICAgICAgICAgICA8YSBocmVmPSJjYXRlZ29yaWEucGhwIj4KICAgICAgICAgICAgICA8aSBjbGFzcz0iZmFzIGZhLWxpc3QtYWx0Ij48L2k+CiAgICAgICAgICAgICAgPHNwYW4+Q2F0ZWdvcsOtYXM8L3NwYW4+CiAgICAgICAgICAgIDwvYT4KICAgICAgICAgIDwvbGk+CgkJICA8bGkgaWQ9ImxpbmsucGhwIj4KICAgICAgICAgICAgPGEgaHJlZj0ibGluay5waHAiPgogICAgICAgICAgICAgIDxpIGNsYXNzPSJmYXMgZmEtbGluayI+PC9pPgogICAgICAgICAgICAgIDxzcGFuPkxpbmtzPC9zcGFuPgogICAgICAgICAgICA8L2E+CiAgICAgICAgICA8P3BocCB9ID8+CiAgICAgICAgICA8bGkgY2xhc3M9InNpZGViYXItZHJvcGRvd24iPgogICAgICAgICA8YSBocmVmPSIjIj4KICAgICAgICAgPGkgY2xhc3M9ImZhcyBmYS11c2VycyI+PC9pPgoJCSA8c3Bhbj5HcnVwb3M8L3NwYW4+CiAgICAgICAgICAgIDwvYT4KICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2lkZWJhci1zdWJtZW51Ij4KICAgICAgICAgICAgICA8dWw+CQkJICAKICAgICAgICAgIDw/cGhwIGlmICgkX1NFU1NJT05bJ2FkbWluJ10pIHsgPz4KICAgICAgICAgICAgICAgIDxsaT4KICAgICAgICAgIDxsaSBpZD0iYWRtaW5pc3RyYWRvci5waHAiPgogICAgICAgICAgPGEgaHJlZj0iYWRtaW5pc3RyYWRvci5waHAiPkFkbWluaXN0cmFkb3JlczwvYT4KICAgICAgICAgICAgICAgIDwvbGk+CQkKICAgICAgICAgICAgICAgIDxsaT4KICAgICAgICAgIDxsaSBpZD0idXN1YXJpby5waHAiPgogICAgICAgICAgPGEgaHJlZj0idXN1YXJpby5waHAiPlZlbmRlZG9yZXM8L2E+CiAgICAgICAgICAgICAgICA8L2xpPgkJCQkKICAgICAgICAgIDw/cGhwIH0gPz4KICAgICAgICAgIDw/cGhwIGlmICgkX1NFU1NJT05bJ3ZlbmRlZG9yJ10pIHsgPz4KICAgICAgICAgIDw/cGhwIGlmKCRtYXN0ZXIxIDw9ICRtYXN0ZXIyKXsgPz4KICAgICAgICAgICAgICAgPGxpPgogICAgICAgICAgPGxpIGlkPSJ1c3VhcmlvLnBocCI+CiAgICAgICAgICA8YSBocmVmPSJ1c3VhcmlvLnBocCI+VmVuZGVkb3JlczwvYT4KICAgICAgICAgICAgICAgPC9saT4KICAgICAgICAgIDw/cGhwIH0gPz4KICAgICAgICAgIDw/cGhwIH0gPz4KICAgICAgICAgICAgICAgIDxsaT4KICAgICAgICAgIDxsaSBpZD0iY2xpZW50ZS5waHAiPgogICAgICAgICAgPGEgaHJlZj0iY2xpZW50ZS5waHAiPlVzdcOhcmlvczwvYT4KICAgICAgICAgICAgICAgIDwvbGk+CiAgICAgICAgICAgICAgICA8bGk+CiAgICAgICAgICA8bGkgaWQ9InRlc3RlLnBocCI+CiAgICAgICAgICA8YSBocmVmPSJ0ZXN0ZS5waHAiPlRlc3RlczwvYT4KICAgICAgICAgICAgICAgIDwvbGk+CiAgICAgICAgICAgICAgPC91bD4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8L2xpPgogICAgICAgICAgPD9waHAgaWYgKCRfU0VTU0lPTlsnYWRtaW4nXSkgeyA/PgogICAgICAgICAgPGxpIGlkPSJldmVudG9zLnBocCI+CiAgICAgICAgICAgIDxhIGhyZWY9ImV2ZW50b3MucGhwIj4KICAgICAgICAgICAgICA8aSBjbGFzcz0iZmFzIGZhLWJyaWVmY2FzZSI+PC9pPgogICAgICAgICAgICAgIDxzcGFuPkV2ZW50b3M8L3NwYW4+CiAgICAgICAgICAgIDwvYT4KICAgICAgICAgIDwvbGk+CiAgICAgICAgICA8bGkgaWQ9Im1lbnNhZ2Vucy5waHAiPgogICAgICAgICAgICA8YSBocmVmPSJtZW5zYWdlbnMucGhwIj4KICAgICAgICAgICAgICA8aSBjbGFzcz0iZmFzIGZhLWVudmVsb3BlIj48L2k+CiAgICAgICAgICAgICAgPHNwYW4+TWVuc2FnZW5zPC9zcGFuPgogICAgICAgICAgICA8L2E+CiAgICAgICAgICA8L2xpPgogICAgICAgICAgPGxpPgogICAgICAgICAgICA8YSBpZD0iaW1wb3J0YXIiIHN0eWxlPSJjdXJzb3I6IHBvaW50ZXI7Ij4KICAgICAgICAgICAgICA8aSBjbGFzcz0iZmFzIGZhLWZpbGUtaW1wb3J0Ij48L2k+CiAgICAgICAgICAgICAgPHNwYW4+SW1wb3J0YXI8L3NwYW4+CiAgICAgICAgICAgIDwvYT4KICAgICAgICAgIDwvbGk+CiAgICAgICAgICA8P3BocCB9ID8+CiAgICAgIDwhLS0gc2lkZWJhci1tZW51ICAtLT4KPC9kaXY+CjxkaXYgY2xhc3M9InNpZGViYXItbWVudSI+CjwvZGl2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BOb3RpZmljYcOnw7VlczwvaDM+CiAgICAgIDwvZGl2PgogICAgICA8ZGl2IGNsYXNzPSJwYW5lbC1ncm91cCBldmVudG9zIiBpZD0ibm90aWZpY2F0aW9uLWRyYXdlci1hY2NvcmRpb24iPgogICAgICAgICA8P3BocCBmb3JlYWNoICgkbm90aWZpY2Fjb2VzIGFzICRub3RpZmljYWNhbykgeyA/PgogICAgICAgICA8P3BocCAKICAgICAgICAgICAgJGV2ZW50b05vbWUgPSBwcmVnX3JlcGxhY2UoIi9bXmEtekEtWl0rLyIsICIiLCAkbm90aWZpY2FjYW9bJ25vbWUnXSk7IAogICAgICAgICAgICAkZXZlbnRvTm9tZSA9c3RyX3JlcGxhY2UoJyAnLCAnJywgJGV2ZW50b05vbWUpOyAKICAgICAgICAgPz4KICAgICAgICAgPGRpdiBpZD0iZXZlbnRfPD9waHAgZWNobyBzdHJ0b2xvd2VyKCRldmVudG9Ob21lKTsgPz4iIGNsYXNzPSJwYW5lbCBwYW5lbC1kZWZhdWx0Ij4KICAgICAgICAgICAgPGRpdiBjbGFzcz0icGFuZWwtaGVhZGluZyIgZGF0YS1jb21wb25lbnQ9ImNvbGxhcHNlLWhlYWRpbmciPgogICAgICAgICAgICAgICA8aDQgY2xhc3M9InBhbmVsLXRpdGxlIj4KICAgICAgICAgICAgICAgICAgPGEgZGF0YS10b2dnbGU9ImNvbGxhcHNlIiBkYXRhLXBhcmVudD0iI25vdGlmaWNhdGlvbi1kcmF3ZXItYWNjb3JkaW9uIiBocmVmPSIjZml4ZWRDb2xsYXBzZTw/cGhwIGVjaG8gc3RydG9sb3dlcigkZXZlbnRvTm9tZSkgPz4iPgogICAgICAgICAgICAgICAgICA8P3BocCBlY2hvICRub3RpZmljYWNhb1snbm9tZSddOyA/PgogICAgICAgICAgICAgICAgICA8L2E+CiAgICAgICAgICAgICAgIDwvaDQ+CiAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJwYW5lbC1jb3VudGVyIG5vdmFzX21lbnN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AgICAgICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPgogICAgICAgICAgICAgICAgICAgICAgICA8dWwgc3R5bGU9ImN1cnNvcjogcG9pbnRlcjsiIGNsYXNzPSJkcm9wZG93bi1tZW51IGRyb3Bkb3duLW1lbnUtcmlnaHQiIGFyaWEtbGFiZWxsZWRieT0iZHJvcGRvd25LZWJhYlJpZ2h0MTEiPgogICAgICAgICAgICAgICAgICAgICAgICAgICA8bGk+PGEgb25jbGljaz0ibWFyY2FyQ29tb0xpZGEoJzw/cGhwIGVjaG8gJG1lbnNhZ2VtWydpZF9tZW5zYWdlbSddOyA/PicpOyBhbGVydCgnPD9waHAgZWNobyAkbWVuc2FnZW1bJ21lbnNhZ2VtJ107ID8+Jyk7Ij5MZXI8L2E+PC9saT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxpIHJvbGU9InNlcGFyYXRvciIgY2xhc3M9ImRpdmlkZXIiPjwvbGk+CiAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsaT48YSBvbmNsaWNrPSJyZW1vdmVyTWVuc2FnZW0oJzw/cGhwIGVjaG8gJG1lbnNhZ2VtWydpZF9tZW5zYWdlbSddOyA/PicpIj5SZW1vdmVyPC9hPjwvbGk+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvdWw+CiAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0icGZpY29uIHBmaWNvbi1pbmZvIHB1bGwtbGVmdCI+PC9zcGFuPgogICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJkcmF3ZXItcGYtbm90aWZpY2F0aW9uLWNvbnRlbnQiPgogICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0iZHJhd2VyLXBmLW5vdGlmaWNhdGlvbi1tZXNzYWdlIj48P3BocCBlY2hvICRtZW5zYWdlbVsndGl0dWxvJ107ID8+PC9zcGFuPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJkcmF3ZXItcGYtbm90aWZpY2F0aW9uLWluZm8iPgogICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0iZGF0ZSI+PD9waHAgZWNobyAkbWVuc2FnZW1bJ2RhdGEnXTsgPz48L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgIDw/cGhwIH0gPz4KICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImJsYW5rLXNsYXRlLXBmIGhpZGRlbiI+CiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImJsYW5rLXNsYXRlLXBmLWljb24iPgogICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0icGZpY29uLWluZm8iPjwvc3Bhbj4KICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgIDxoMT5TZW0gTWVuc2FnZW5zLjwvaDE+CiAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJkcmF3ZXItcGYtYWN0aW9uIj4KICAgICAgICAgICAgICAgICAgPGRpdiBvbmNsaWNrPSJyZW1vdmVyVG9kYXMoJzw/cGhwIGVjaG8gJG5vdGlmaWNhY2FvWydub21lJ107ID8+JykiIHN0eWxlPSJ0ZXh0LWFsaWduOiBjZW50ZXI7IiBjbGFzcz0iZHJhd2VyLXBmLWFjdGlvbi1saW5rIiBkYXRhLXRvZ2dsZT0iY2xlYXItYWxsIj4KICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz0iYnRuIGJ0bi1saW5rIj4KICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9InBmaWNvbiBwZmljb24tY2xvc2UiPjwvc3Bhbj4gUmVtb3ZlciBUb2RhcwogICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj4KICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgPC9kaXY+CiAgICAgICAgIDw/cGhwIH0gPz4KICAgICAgPC9kaXY+CiAgIDwvZGl2Pgo8c2NyaXB0PgogICAgICBmdW5jdGlvbiByZWxvYWQoKXsKICAgICAgICAgIC8vIEluaXRpYWxpemUgdG8gdW5yZWFkIG5vdGlmaWNhdGlvbnMKICAgICAgICAgIC8vIFRPRE86IGFkZCBiYWRnZSBmb3IgdW5yZWFkIG5vdGlmaWNhdGlvbnMKICAgICAgCiAgICAgICAgICAvLyBTaG93L0hpZGUgTm90aWZpY2F0aW9ucyBEcmF3ZXIKICAgICAgICAgICQoJy5kcmF3ZXItcGYtdHJpZ2dlcicpLmNsaWNrKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHZhciAkZHJhd2VyID0gJCgnLmRyYXdlci1wZicpOwogICAgICAKICAgICAgICAgICAgICAkKHRoaXMpLnRvZ2dsZUNsYXNzKCdvcGVuJyk7CiAgICAgICAgICAgICAgaWYgKCRkcmF3ZXIuaGFzQ2xhc3MoJ2hpZGUnKSkgewogICAgICAgICAgICAgICAgICAkZHJhd2VyLnJlbW92ZUNsYXNzKCdoaWRlJyk7CiAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICBpZiAod2luZG93LmRpc3BhdGNoRXZlbnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuZGlzcGF0Y2hFdmVudChuZXcgRXZlbnQoJ3Jlc2l6ZScpKTsKICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgIC8vIFNwZWNpYWwgY2FzZSBmb3IgSUUKICAgICAgICAgICAgICAgICAgICAgIGlmICgkKGRvY3VtZW50KS5maXJlRXZlbnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAkKGRvY3VtZW50KS5maXJlRXZlbnQoJ29ucmVzaXplJyk7CiAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIH0sIDEwMCk7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgJGRyYXdlci5hZGRDbGFzcygnaGlkZScpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAvLyBTcGVjaWFsIGNhc2UsIGNsb3NlIG5hdmlnYXRpb24gbWVudSBpbiBtb2JpbGUgbW9kZQogICAgICAgICAgICAgIGlmICgkKCcuY29udGFpbmVyLXBmLW5hdi1wZi12ZXJ0aWNhbCcpLmhhc0NsYXNzKCdoaWRkZW4tbmF2JykpIHsKICAgICAgICAgICAgICAgICAgJCgnLm5hdi1wZi12ZXJ0aWNhbCcpLnJlbW92ZUNsYXNzKCdzaG93LW1vYmlsZS1uYXYnKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICB9KTsKICAgICAgICAgICQoJy5kcmF3ZXItcGYtY2xvc2UnKS5jbGljayhmdW5jdGlvbigpIHsKICAgICAgICAgICAgICB2YXIgJGRyYXdlciA9ICQoJy5kcmF3ZXItcGYnKTsKICAgICAgCiAgICAgICAgICAgICAgJCgnLmRyYXdlci1wZi10cmlnZ2VyJykucmVtb3ZlQ2xhc3MoJ29wZW4nKTsKICAgICAgICAgICAgICAkZHJhd2VyLmFkZENsYXNzKCdoaWRlJyk7CiAgICAgICAgICB9KTsKICAgICAgICAgICQoJy5kcmF3ZXItcGYtdG9nZ2xlLWV4cGFuZCcpLmNsaWNrKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHZhciAkZHJhd2VyID0gJCgnLmRyYXdlci1wZicpOwogICAgICAgICAgICAgIHZhciAkZHJhd2VyTm90aWZpY2F0aW9ucyA9ICRkcmF3ZXIuZmluZCgnLmRyYXdlci1wZi1ub3RpZmljYXRpb24nKTsKICAgICAgCiAgICAgICAgICAgICAgaWYgKCRkcmF3ZXIuaGFzQ2xhc3MoJ2RyYXdlci1wZi1leHBhbmRlZCcpKSB7CiAgICAgICAgICAgICAgICAgICRkcmF3ZXIucmVtb3ZlQ2xhc3MoJ2RyYXdlci1wZi1leHBhbmRlZCcpOwogICAgICAgICAgICAgICAgICAkZHJhd2VyTm90aWZpY2F0aW9ucy5yZW1vdmVDbGFzcygnZXhwYW5kZWQtbm90aWZpY2F0aW9uJyk7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgJGRyYXdlci5hZGRDbGFzcygnZHJhd2VyLXBmLWV4cGFuZGVkJyk7CiAgICAgICAgICAgICAgICAgICRkcmF3ZXJOb3RpZmljYXRpb25zLmFkZENsYXNzKCdleHBhbmRlZC1ub3RpZmljYXRpb24nKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICB9KTsKICAgICAgCiAgICAgICAgICAvLyBNYXJrIEFsbCBSZWFkIC8gQ2xlYXIgQWxsCiAgICAgICAgICAkKCcucGFuZWwtY29sbGFwc2UnKS5lYWNoKGZ1bmN0aW9uKGluZGV4LCBwYW5lbCkgewogICAgICAgICAgICAgIHZhciAkcGFuZWwgPSAkKHBhbmVsKTsKICAgICAgICAgICAgICB2YXIgdW5yZWFkQ291bnQgPSAkcGFuZWwuZmluZCgnLmRyYXdlci1wZi1ub3RpZmljYXRpb24udW5yZWFkJykubGVuZ3RoOwogICAgICAgICAgICAgICQocGFuZWwucGFyZW50RWxlbWVudCkuZmluZCgnLnBhbmVsLWNvdW50ZXInKS50ZXh0KHVucmVhZENvdW50ICsgJyBOb3ZhcyBNZW5zYWdlJyArICh1bnJlYWRDb3VudCAhPT0gMSA/ICducycgOiAnbScpKTsKICAgICAgCiAgICAgICAgICAgICAgaWYgKCQoJy5kcmF3ZXItcGYgLnBhbmVsLWNvbGxhcHNlIC51bnJlYWQnKS5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgICAgLy8gVE9ETzogcmVtb3ZlIGJhZGdlIGZvciB1bnJlYWQgaW5kaWNhdG9yCiAgICAgICAgICAgICAgfQogICAgICAKICAgICAgICAgICAgICAkcGFuZWwub24oJ2NsaWNrJywgJy5kcmF3ZXItcGYtYWN0aW9uIFtkYXRhLXRvZ2dsZT0ibWFyay1hbGwtcmVhZCJdIC5idG4nLCBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgJHBhbmVsLmZpbmQoJy51bnJlYWQnKS5yZW1vdmVDbGFzcygndW5yZWFkJyk7CiAgICAgICAgICAgICAgICAgICRwYW5lbC5maW5kKCcuZHJhd2VyLXBmLWFjdGlvbiBbZGF0YS10b2dnbGU9Im1hcmstYWxsLXJlYWQiXScpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgICAkKHBhbmVsLnBhcmVudEVsZW1lbnQpLmZpbmQoJy5wYW5lbC1jb3VudGVyJykudGV4dCgnMCBNZW5zYWdlbnMgTGlkYXMnKTsKICAgICAgICAgICAgICAgICAgaWYgKCQoJy5kcmF3ZXItcGYgLnBhbmVsLWNvbGxhcHNlIC51bnJlYWQnKS5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICQoJy5kcmF3ZXItcGYtdHJpZ2dlcicpLnJlbW92ZUNsYXNzKCd1bnJlYWQnKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICRwYW5lbC5vbignY2xpY2snLCAnLmRyYXdlci1wZi1hY3Rpb24gW2RhdGEtdG9nZ2xlPSJjbGVhci1hbGwiXSAuYnRuJywgZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICRwYW5lbC5maW5kKCcucGFuZWwtYm9keSAuZHJhd2VyLXBmLW5vdGlmaWNhdGlvbicpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgICAkcGFuZWwuZmluZCgnLmRyYXdlci1wZi1hY3Rpb24nKS5yZW1vdmUoKTsKICAgICAgICAgICAgICAgICAgJHBhbmVsLmZpbmQoJy5ibGFuay1zbGF0ZS1wZicpLnJlbW92ZUNsYXNzKCdoaWRkZW4nKTsKICAgICAgICAgICAgICAgICAgJHBhbmVsLmZpbmQoJy5kcmF3ZXItcGYtbG9hZGluZycpLmFkZENsYXNzKCdoaWRkZW4nKTsKICAgICAgICAgICAgICAgICAgJChwYW5lbC5wYXJlbnRFbGVtZW50KS5maW5kKCcucGFuZWwtY291bnRlcicpLnRleHQoJzAgTWVuc2FnZW5zIExpZGFzJyk7CiAgICAgICAgICAgICAgICAgIGlmICgkKCcuZHJhd2VyLXBmIC5wYW5lbC1jb2xsYXBzZSAudW5yZWFkJykubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiByZW1vdmUgYmFkZ2UgZm9yIHVucmVhZCBpbmRpY2F0b3IKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0pOwogICAgICAKICAgICAgICAgICAgICAkcGFuZWwuZmluZCgnLmRyYXdlci1wZi1ub3RpZmljYXRpb24nKS5lYWNoKGZ1bmN0aW9uKGluZGV4LCBub3RpZmljYXRpb24pIHsKICAgICAgICAgICAgICAgICAgdmFyICRub3RpZmljYXRpb24gPSAkKG5vdGlmaWNhdGlvbik7CiAgICAgICAgICAgICAgICAgICRub3RpZmljYXRpb24ub24oJ2NsaWNrJywgJy5kcmF3ZXItcGYtbm90aWZpY2F0aW9uLWNvbnRlbnQnLCBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICRub3RpZmljYXRpb24ucmVtb3ZlQ2xhc3MoJ3VucmVhZCcpOwogICAgICAgICAgICAgICAgICAgICAgdmFyIHVucmVhZENvdW50ID0gJHBhbmVsLmZpbmQoJy5kcmF3ZXItcGYtbm90aWZpY2F0aW9uLnVucmVhZCcpLmxlbmd0aDsKICAgICAgICAgICAgICAgICAgICAgICQocGFuZWwucGFyZW50RWxlbWVudCkuZmluZCgnLnBhbmVsLWNvdW50ZXInKS50ZXh0KHVucmVhZENvdW50ICsgJyBOb3ZhcyBNZW5zYWdlJyArICh1bnJlYWRDb3VudCAhPT0gMSA/ICducycgOiAnbScpKTsKICAgICAgICAgICAgICAgICAgICAgIGlmICh1bnJlYWRDb3VudCA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICRwYW5lbC5maW5kKCcuZHJhd2VyLXBmLWFjdGlvbiBbZGF0YS10b2dnbGU9Im1hcmstYWxsLXJlYWQiXScpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkKCcuZHJhd2VyLXBmIC5wYW5lbC1jb2xsYXBzZSAudW5yZWFkJykubGVuZ3RoID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRPRE86IHJlbW92ZSBiYWRnZSBmb3IgdW5yZWFkIGluZGljYXRvcgogICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICB9KTsKICAgICAgCiAgICAgICAgICAkKCcjbm90aWZpY2F0aW9uLWRyYXdlci1hY2NvcmRpb24nKS5pbml0Q29sbGFwc2VIZWlnaHRzKCcucGFuZWwtYm9keScpOwogICAgICB9OwogICAgICByZWxvYWQoKTsKPC9zY3JpcHQ+CjwvZGl2PgoKPGF1ZGlvIHN0eWxlPSJoZWlnaHQ6IDEwMDAwcHg7b3BhY2l0eTogMDt3aWR0aDogMTAwMDBweDt6LWluZGV4OiAxMDAwMDtwb3NpdGlvbjogYWJzb2x1dGU7IiBjb250cm9scyBpZD0ibmV3X21zZyI+Cjxzb3VyY2Ugc3JjPSJhbGVydGEubXAzIiB0eXBlPSJhdWRpby9tcDMiPgo8L2F1ZGlvPgogIAo8ZGl2IGlkPSJsb2cucGhwIiBjbGFzcz0ibm9uZSI+PC9kaXY+CjxzY3JpcHQ+CiAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgibm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2F0aW9uLWNvbnRlbnQiPgogICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0iZHJhd2VyLXBmLW5vdGlmaWNhdGlvbi1tZXNzYWdlIj50aXR1bG9fbWVuc2FnZW08L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImRyYXdlci1wZi1ub3RpZmljYXRpb24taW5mbyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJkYXRlIj5kYXRhX21lbnNhZ2VtPC9zcGFuPgogICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgIDwvZGl2PmA7CiAgICB2YXIgZXZlbnRvSFRNTCA9IGA8ZGl2IGlkPSJldmVudF9ub21lX2V2ZW50byIgY2xhc3M9InBhbmVsIHBhbmVsLWRlZmF1bHQiPgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJwYW5lbC1oZWFkaW5nIiBkYXRhLWNvbXBvbmVudD0iY29sbGFwc2UtaGVhZGluZyI+CiAgICAgICAgICAgICAgIDxoNCBjbGFzcz0icGFuZWwtdGl0bGUiPgogICAgICAgICAgICAgICAgICA8YSBkYXRhLXRvZ2dsZT0iY29sbGFwc2UiIGRhdGEtcGFyZW50PSIjbm90aWZpY2F0aW9uLWRyYXdlci1hY2NvcmRpb24iIGhyZWY9IiNmaXhlZENvbGxhcHNlbm9tZV9ldmVudG8iPgogICAgICAgICAgICAgICAgICBub21lX2V2ZW50bwogICAgICAgICAgICAgICAgICA8L2E+CiAgICAgICAgICAgICAgIDwvaDQ+CiAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJwYW5lbC1jb3VudGVyIG5vdmFzX21lbnNhZ2VucyI+Tm92YXMgbWVuc2FnZW5zPC9zcGFuPgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBpZD0iZml4ZWRDb2xsYXBzZW5vbWVfZXZlbnRvIiBjbGFzcz0icGFuZWwtY29sbGFwc2UgY29sbGFwc2UgaW4iPgogICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwYW5lbC1ib2R5IHRvZGFzX21lbnNhZ2VucyI+CgkJCSAgIAogICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iYmxhbmstc2xhdGUtcGYgaGlkZGVuIj4KICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iYmxhbmstc2xhdGUtcGYtaWNvbiI+CiAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJwZmljb24taW5mbyI+PC9zcGFuPgogICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgPGgxPlNlbSBNZW5zYWdlbnMuPC9oMT4KICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImRyYXdlci1wZi1hY3Rpb24iPgogICAgICAgICAgICAgICAgICA8ZGl2IG9uY2xpY2s9InJlbW92ZXJUb2Rhcygnbm9tZV9ldmVudG8nKSIgc3R5bGU9InRleHQtYWxpZ246IGNlbnRlcjsiIGNsYXNzPSJkcmF3ZXItcGYtYWN0aW9uLWxpbmsiIGRhdGEtdG9nZ2xlPSJjbGVhci1hbGwiPgogICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIGNsYXNzPSJidG4gYnRuLWxpbmsiPgogICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0icGZpY29uIHBmaWNvbi1jbG9zZSI+PC9zcGFuPiBSZW1vdmVyIFRvZGFzCiAgICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPgogICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgICA8L2Rpdj5gOwpTdHJpbmcucHJvdG90eXBlLnJlcGxhY2VBbGwgPSBmdW5jdGlvbihzZWFyY2gsIHJlcGxhY2VtZW50KSB7CnZhciB0YXJnZXQgPSB0aGlzOwpyZXR1cm4gdGFyZ2V0LnJlcGxhY2UobmV3IFJlZ0V4cChzZWFyY2gsICdnJyksIHJlcGxhY2VtZW50KTsKICAgIH07CiAgICBmdW5jdGlvbiBub3Zhc01lbnNhZ2Vucyhtc2dzKXsKICAgICAgICBtc2cgPSBwYXJzZUludChtc2dzLmxlbmd0aCk7CiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgIHZhciBldmVudG9zVCA9IFtdOwogICAgICAgICAgICBtc2dzLmZvckVhY2goKG1zZykgPT4gewogICAgICAgICAgICAgICAgaWYoZXZlbnRvc1RbbXNnLmV2ZW50b19ub21lXSA9PSB1bmRlZmluZWQpewogICAgICAgICAgICAgICAgICAgIGV2ZW50b3NUW21zZy5ldmVudG9fbm9tZV0gPSBbXTsKICAgICAgICAgICAgICAgICAgICBldmVudG9zW21zZy5ldmVudG9fbm9tZV0gPSBbXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGV2ZW50b3NUW21zZy5ldmVudG9fbm9tZV0ucHVzaChtc2cpOwogICAgICAgICAgICAgICAgZXZlbnRvc1ttc2cuZXZlbnRvX25vbWVdLnB1c2gobXNnLmlkX21lbnNhZ2VtKTsKICAgICAgICAgICAgfSkKICAgICAgICAgICAgdmFyIG5vdGlmaWNhY29lcyA9IFtdOwogICAgICAgICAgICBPYmplY3Qua2V5cyhldmVudG9zVCkuZm9yRWFjaCgoZXZlbnRvX25vbWUpID0+IHsKICAgICAgICAgICAgICAgIG5vdGlmaWNhY29lcy5wdXNoKHsKICAgICAgICAgICAgICAgICAgICBub21lOiBldmVudG9fbm9tZSwKICAgICAgICAgICAgICAgICAgICBtZW5zYWdlbnM6IGV2ZW50b3NUW2V2ZW50b19ub21lXQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBub3RpZmljYWNvZXMuZm9yRWFjaCgobm90aWZpY2FjYW8pID0+IHsKICAgICAgICAgICAgICAgdmFyIG5vbWUgPSBub3RpZmljYWNhby5ub21lLnRvTG93ZXJDYXNlKCkucmVwbGFjZSgvW15hLXpBLXpdL2csICcnKTsKICAgICAgICAgICAgICAgbm9tZSA9IG5vbWUucmVwbGFjZUFsbCgnICcsICcnKTsKICAgICAgICAgICAgICAgbm9tZSA9IG5vbWUudG9Mb3dlckNhc2UoKTsKICAgICAgICAgICAgICAgdmFyIG5vdmFzX21lbnNhZ2VucyA9IFtdOwogICAgICAgICAgICAgICBub3RpZmljYWNhby5tZW5zYWdlbnMuZm9yRWFjaCgobWVuc2FnZW0pID0+IHsKICAgICAgICAgICAgICAgICAgIGlmKCQoJ2RpdlttZW5zYWdlbS1pZD0iJyttZW5zYWdlbS5pZF9tZW5zYWdlbSsnIl0nKS5sZW5ndGggPT0gMCl7CiAgICAgICAgICAgICAgICAgICAgICAgbm92YXNfbWVuc2FnZW5zLnB1c2gobWVuc2FnZW0pOwogICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgaWYoJCgnI2V2ZW50XycgKyBub21lKS5sZW5ndGggPT0gMCl7CiAgICAgICAgICAgICAgICAgICB2YXIgZUhUTUwgPSBldmVudG9IVE1MICsgJyc7CiAgICAgICAgICAgICAgICAgICBlSFRNTCA9IGVIVE1MLnJlcGxhY2VBbGwoJ2V2ZW50X25vbWVfZXZlbnRvJywgJ2V2ZW50Xycrbm9tZSsnJyk7CiAgICAgICAgICAgICAgICAgICBlSFRNTCA9IGVIVE1MLnJlcGxhY2VBbGwoJ2ZpeGVkQ29sbGFwc2Vub21lX2V2ZW50bycsICdmaXhlZENvbGxhcHNlJytub21lKycnKTsKICAgICAgICAgICAgICAgICAgIGVIVE1MID0gZUhUTUwucmVwbGFjZUFsbCgnbm9tZV9ldmVudG8nLCBub3RpZmljYWNhby5ub21lKTsKICAgICAgICAgICAgICAgICAgICQoJy5ub3RlLXBhZ2UgLmV2ZW50b3MnKS5wcmVwZW5kKGVIVE1MKTsKICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICBpZigkKCcjZXZlbnRfJyArIG5vbWUpLmxlbmd0aCA+IDApewogICAgICAgICAgICAgICAgICAgdmFyIG1IVE1MID0gJyc7CiAgICAgICAgICAgICAgICAgICBub3Zhc19tZW5zYWdlbnMuZm9yRWFjaCgobWVuc2FnZW0pID0+IHsKICAgICAgICAgICAgICAgICAgICAgICB2YXIgaWh0bWwgPSBtZW5zYWdlbUhUTUwgKyAnJzsKICAgICAgICAgICAgICAgICAgICAgICBpaHRtbCA9IGlodG1sLnJlcGxhY2VBbGwoJ2ZvaWxpZGEnLCBtZW5zYWdlbS5saWRhID09ICdzaW0nID8gJycgOiAndW5yZWFkJykKICAgICAgICAgICAgICAgICAgICAgICBpaHRtbCA9IGlodG1sLnJlcGxhY2VBbGwoJ2lkX21lbnNhZ2VtJywgbWVuc2FnZW0uaWRfbWVuc2FnZW0pOwogICAgICAgICAgICAgICAgICAgICAgIGlodG1sID0gaWh0bWwucmVwbGFjZUFsbCgndGl0dWxvX21lbnNhZ2VtJywgbWVuc2FnZW0udGl0dWxvKTsKICAgICAgICAgICAgICAgICAgICAgICBpaHRtbCA9IGlodG1sLnJlcGxhY2VBbGwoJ3RleHRvX21lbnNhZ2VtJywgbWVuc2FnZW0ubWVuc2FnZW0pOwogICAgICAgICAgICAgICAgICAgICAgIGlodG1sID0gaWh0bWwucmVwbGFjZUFsbCgnZGF0YV9tZW5zYWdlbScsIG1lbnNhZ2VtLmRhdGEpOwogICAgICAgICAgICAgICAgICAgICAgIG1IVE1MICs9IGlodG1sICsgJ1xuJzsKICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgJCgnI2V2ZW50XycgKyBub21lICsgJyAudG9kYXNfbWVuc2FnZW5zJykucHJlcGVuZChtSFRNTCk7CiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgaWYobm92YXNfbWVuc2FnZW5zLmxlbmd0aCA+IDApewogICAgICAgICAgICAgICAgICAgdmFyIG9sZE5vdFJlYWQgPSAwOwogICAgICAgICAgICAgICAgICAgJCgnZGl2W21lbnNhZ2VtLWlkXVtjbGFzcyo9InVucmVhZCJdJykuZWFjaChmdW5jdGlvbiAoKXsKICAgICAgICAgICAgICAgICAgICAJdmFyIGZvdW5kID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgCXZhciBtaWQgPSAkKHRoaXMpLmF0dHIoJ21lbnNhZ2VtLWlkJyk7CiAgICAgICAgICAgICAgICAgICAgCW5vdmFzX21lbnNhZ2Vucy5mb3JFYWNoKChtZW5zYWdlbSkgPT4gewogICAgICAgICAgICAgICAgICAgIAkgICAgaWYobWVuc2FnZW0uaWRfbWVuc2FnZW0gPT0gbWlkKQogICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGZvdW5kID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAJfSk7CiAgICAgICAgICAgICAgICAgICAgCWlmKCFmb3VuZCkKICAgICAgICAgICAgICAgICAgICAJICAgIG9sZE5vdFJlYWQrKzsKICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgdmFyIHRvdGFsX25vdF9yZWFkID0gb2xkTm90UmVhZCArIG5vdmFzX21lbnNhZ2Vucy5sZW5ndGg7CiAgICAgICAgICAgICAgICAgICAkKCcjZXZlbnRfJyArIG5vbWUgKyAnIC5ub3Zhc19tZW5zYWdlbnMnKS50ZXh0KHRvdGFsX25vdF9yZWFkICsgJyBOb3ZhcyBtZW5zYWdlbnMnKTsKICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgcmVsb2FkKCk7IHJlbG9hZCgpOwogICAgICAgICAgICBzd2FsKCJOb3ZhIG1lbnNhZ2VtIiwgIiBWb2PDqiByZWNlYmV1IHVtYSBub3ZhIG1lbnNhZ2VtISIsICJzdWNjZXNzIik7CiAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJuZXdfbXNnIikucGxheSgpOwogICAgICAgIH0sIDIwMDApOwogICAgfQogICAgc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKICAgICAgICAkLmdldCgnL2NvbnRyb2xlcy92ZXJpZmljYXItbWVuc2FnZW5zLnBocCcsIGZ1bmN0aW9uKG1zZ3MpewogICAgICAgICAgICBtc2dzID0gSlNPTi5wYXJzZShtc2dzKTsKICAgICAgICAgICAgaWYocGFyc2VJbnQobXNncy5sZW5ndGgpID4gbXNnKQogICAgICAgICAgICAgICAgbm92YXNNZW5zYWdlbnMobXNncyk7CiAgICAgICAgfSk7CiAgICB9LCAxMDAwKTsKICAgICQuZ2V0KCcvY29udHJvbGVzL3ZlcmlmaWNhci1tZW5zYWdlbnMucGhwJywgZnVuY3Rpb24obXNncyl7CiAgICAgICAgbXNncyA9IEpTT04ucGFyc2UobXNncyk7CiAgICAgICAgdmFyIG5hb2xpZGEgPSAwOwogICAgICAgIG1zZ3MuZm9yRWFjaCgobXNnKSA9PiB7CiAgICAgICAgICAgIGlmKG1zZy5saWRhICE9PSAnc2ltJykKICAgICAgICAgICAgICAgIG5hb2xpZGErKzsKICAgICAgICAgICAgICAgIAogICAgICAgICAgICBpZihuYW9saWRhID4gMCl7CiAgICAgICAgICAgICAgICByZWxvYWQoKTsgcmVsb2FkKCk7CiAgICAgICAgICAgICAgICBzd2FsKCJOb3ZhIG1lbnNhZ2VtIiwgIiBWb2PDqiByZWNlYmV1IHVtYSBub3ZhIG1lbnNhZ2VtISIsICJzdWNjZXNzIik7CiAgICAgICAgICAgIH0KICAgICAgICB9KQogICAgfSk7Cjwvc2NyaXB0PgoKPGRpdiBjbGFzcz0iRGFzaGJvYXJkQ29udGFpbmVyIj48L2Rpdj4KPHNjcmlwdCBzcmM9ImpzL3VwcHkuaW8uanMiPjwvc2NyaXB0Pgo8bWFpbiBjbGFzcz0icGFnZS1jb250ZW50Ij4KPGRpdiBjbGFzcz0iY29udGFpbmVyLWZsdWlkIj4="));//Generated by Ampare PHP Encoder. For more security please use php protect before encode the php program

Function Calls

base64_decode 1

Variables

None

Stats

MD5 930bd16119fed4d1a3f1133f5cb4dcdc
Eval Count 1
Decode Time 65 ms