var/cache/dev/twig/1b/1bc413c1efe7025ec2592728e13015c4.php line 33

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* blocks/B51_search_results/B51_search_results.default.html.twig */
  14. class __TwigTemplate_6dc0b81aee789b5361fa3c832e88b64d extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""blocks/B51_search_results/B51_search_results.default.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""blocks/B51_search_results/B51_search_results.default.html.twig"));
  33.         // line 1
  34.         if ((isset($context["hasGeneralSearch"]) || array_key_exists("hasGeneralSearch"$context) ? $context["hasGeneralSearch"] : (function () { throw new RuntimeError('Variable "hasGeneralSearch" does not exist.'1$this->source); })())) {
  35.             // line 2
  36.             echo "    ";
  37.             $macros["macros"] = $this->macros["macros"] = $this->loadTemplate("blocks\\macros.html.twig""blocks/B51_search_results/B51_search_results.default.html.twig"2)->unwrap();
  38.             // line 3
  39.             echo "    <section class=\"block-search-results\" ";
  40.             echo twig_call_macro($macros["macros"], "macro_getBlockDataAttributes", [$context], 3$context$this->getSourceContext());
  41.             echo ">
  42.         <div class=\"container\">
  43.             ";
  44.             // line 5
  45.             if ((twig_length_filter($this->env, (isset($context["values"]) || array_key_exists("values"$context) ? $context["values"] : (function () { throw new RuntimeError('Variable "values" does not exist.'5$this->source); })())) == 0)) {
  46.                 // line 6
  47.                 echo "                ";
  48.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("zerorecords", [], "studio"), "html"nulltrue);
  49.                 echo "
  50.             ";
  51.             } else {
  52.                 // line 8
  53.                 echo "                ";
  54.                 // line 9
  55.                 echo "                ";
  56.                 // line 10
  57.                 echo "                ";
  58.                 // line 11
  59.                 echo "                ";
  60.                 $context["resultsMeta"] = ((array_key_exists("results"$context)) ? ((isset($context["results"]) || array_key_exists("results"$context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.'11$this->source); })())) : (["items" => ((twig_get_attribute($this->env$this->source,                 // line 12
  61. ($context["values"] ?? null), "items", [], "any"truetruefalse12)) ? (twig_get_attribute($this->env$this->source, (isset($context["values"]) || array_key_exists("values"$context) ? $context["values"] : (function () { throw new RuntimeError('Variable "values" does not exist.'12$this->source); })()), "items", [], "any"falsefalsefalse12)) : ((isset($context["values"]) || array_key_exists("values"$context) ? $context["values"] : (function () { throw new RuntimeError('Variable "values" does not exist.'12$this->source); })()))), "counts" => ["news" => 0"news_reports" => 0"programs" => 0"event" => 0"all" => 0], "currentType" => ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,                 // line 14
  62. ($context["app"] ?? null), "request", [], "any"falsetruefalse14), "query", [], "any"falsetruefalse14), "get", [=> "type"], "method"truetruefalse14)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse14), "query", [], "any"falsetruefalse14), "get", [=> "type"], "method"falsefalsefalse14), "all")) : ("all")), "order" => ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,                 // line 15
  63. ($context["app"] ?? null), "request", [], "any"falsetruefalse15), "query", [], "any"falsetruefalse15), "get", [=> "order"], "method"truetruefalse15)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse15), "query", [], "any"falsetruefalse15), "get", [=> "order"], "method"falsefalsefalse15), "relevance")) : ("relevance")), "page" => (((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,                 // line 16
  64. ($context["app"] ?? null), "request", [], "any"falsetruefalse16), "query", [], "any"falsetruefalse16), "get", [=> "page"], "method"truetruefalse16)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse16), "query", [], "any"falsetruefalse16), "get", [=> "page"], "method"falsefalsefalse16), 1)) : (1)) + 0), "pageSize" => 15"pageCount" => 1"nextPage" => 0"total" => ((twig_get_attribute($this->env$this->source,                 // line 20
  65. ($context["values"] ?? null), "items", [], "any"truetruefalse20)) ? (twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["values"]) || array_key_exists("values"$context) ? $context["values"] : (function () { throw new RuntimeError('Variable "values" does not exist.'20$this->source); })()), "items", [], "any"falsefalsefalse20))) : (twig_length_filter($this->env, (isset($context["values"]) || array_key_exists("values"$context) ? $context["values"] : (function () { throw new RuntimeError('Variable "values" does not exist.'20$this->source); })())))), "totalAll" => ((twig_get_attribute($this->env$this->source,                 // line 21
  66. ($context["values"] ?? null), "items", [], "any"truetruefalse21)) ? (twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["values"]) || array_key_exists("values"$context) ? $context["values"] : (function () { throw new RuntimeError('Variable "values" does not exist.'21$this->source); })()), "items", [], "any"falsefalsefalse21))) : (twig_length_filter($this->env, (isset($context["values"]) || array_key_exists("values"$context) ? $context["values"] : (function () { throw new RuntimeError('Variable "values" does not exist.'21$this->source); })()))))]));
  67.                 // line 23
  68.                 echo "                ";
  69.                 $context["items"] = twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'23$this->source); })()), "items", [], "any"falsefalsefalse23);
  70.                 // line 24
  71.                 echo "                ";
  72.                 $context["counts"] = twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'24$this->source); })()), "counts", [], "any"falsefalsefalse24);
  73.                 // line 25
  74.                 echo "                ";
  75.                 $context["currentType"] = twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'25$this->source); })()), "currentType", [], "any"falsefalsefalse25);
  76.                 // line 26
  77.                 echo "                ";
  78.                 $context["order"] = twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'26$this->source); })()), "order", [], "any"falsefalsefalse26);
  79.                 // line 27
  80.                 echo "                ";
  81.                 $context["route"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'27$this->source); })()), "request", [], "any"falsefalsefalse27), "attributes", [], "any"falsefalsefalse27), "get", [=> "_route"], "method"falsefalsefalse27);
  82.                 // line 28
  83.                 echo "                ";
  84.                 $context["routeParams"] = ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse28), "attributes", [], "any"falsetruefalse28), "get", [=> "_route_params"], "method"truetruefalse28)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse28), "attributes", [], "any"falsetruefalse28), "get", [=> "_route_params"], "method"falsefalsefalse28), [])) : ([]));
  85.                 // line 29
  86.                 echo "                ";
  87.                 $context["currentPage"] = twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'29$this->source); })()), "page", [], "any"falsefalsefalse29);
  88.                 // line 30
  89.                 echo "                ";
  90.                 $context["pageSize"] = twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'30$this->source); })()), "pageSize", [], "any"falsefalsefalse30);
  91.                 // line 31
  92.                 echo "                ";
  93.                 $context["pageCount"] = twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'31$this->source); })()), "pageCount", [], "any"falsefalsefalse31);
  94.                 // line 32
  95.                 echo "                ";
  96.                 $context["nextPage"] = twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'32$this->source); })()), "nextPage", [], "any"falsefalsefalse32);
  97.                 // line 33
  98.                 echo "                ";
  99.                 $context["totalItems"] = twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'33$this->source); })()), "total", [], "any"falsefalsefalse33);
  100.                 // line 34
  101.                 echo "                ";
  102.                 $context["pageItems"] = (isset($context["items"]) || array_key_exists("items"$context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.'34$this->source); })());
  103.                 // line 35
  104.                 echo "
  105.                 ";
  106.                 // line 37
  107.                 echo "                ";
  108.                 // line 38
  109.                 echo "
  110.                 ";
  111.                 // line 40
  112.                 echo "                ";
  113.                 // line 41
  114.                 echo "                ";
  115.                 // line 42
  116.                 echo "
  117.                 ";
  118.                 // line 43
  119.                 if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'43$this->source); })()), "request", [], "any"falsefalsefalse43), "query", [], "any"falsefalsefalse43), "get", [=> "p"], "method"falsefalsefalse43)) {
  120.                     // line 44
  121.                     echo "                    ";
  122.                     $context["resultString"] = (("<h1 class=\"results-title\">Conta lá <span>" twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'44$this->source); })()), "request", [], "any"falsefalsefalse44), "query", [], "any"falsefalsefalse44), "get", [=> "p"], "method"falsefalsefalse44)) . "</span></h1>");
  123.                     // line 45
  124.                     echo "                ";
  125.                 } elseif (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'45$this->source); })()), "request", [], "any"falsefalsefalse45), "query", [], "any"falsefalsefalse45), "get", [=> "themes"], "method"falsefalsefalse45)) {
  126.                     // line 46
  127.                     echo "                    ";
  128.                     $context["themes"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'46$this->source); })()), "request", [], "any"falsefalsefalse46), "query", [], "any"falsefalsefalse46), "get", [=> "themes"], "method"falsefalsefalse46);
  129.                     // line 47
  130.                     echo "                    ";
  131.                     $context["resultString"] = (("<h1 class=\"results-title\">Conta lá <span>" . (((twig_length_filter($this->env, (isset($context["themes"]) || array_key_exists("themes"$context) ? $context["themes"] : (function () { throw new RuntimeError('Variable "themes" does not exist.'47$this->source); })())) == 1)) ? (twig_get_attribute($this->env$this->source, (isset($context["themes"]) || array_key_exists("themes"$context) ? $context["themes"] : (function () { throw new RuntimeError('Variable "themes" does not exist.'47$this->source); })()), 0, [], "array"falsefalsefalse47)) : (twig_join_filter((isset($context["themes"]) || array_key_exists("themes"$context) ? $context["themes"] : (function () { throw new RuntimeError('Variable "themes" does not exist.'47$this->source); })()), ", ")))) . "</span></h1>");
  132.                     // line 48
  133.                     echo "                ";
  134.                 }
  135.                 // line 49
  136.                 echo "
  137.                 ";
  138.                 // line 50
  139.                 echo ((array_key_exists("resultString"$context)) ? (_twig_default_filter((isset($context["resultString"]) || array_key_exists("resultString"$context) ? $context["resultString"] : (function () { throw new RuntimeError('Variable "resultString" does not exist.'50$this->source); })()))) : (""));
  140.                 echo "
  141.                 <div class=\"results-bar mb-4\" data-current-page=\"";
  142.                 // line 52
  143.                 echo twig_escape_filter($this->env, (isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'52$this->source); })()), "html"nulltrue);
  144.                 echo "\" data-page-count=\"";
  145.                 echo twig_escape_filter($this->env, (isset($context["pageCount"]) || array_key_exists("pageCount"$context) ? $context["pageCount"] : (function () { throw new RuntimeError('Variable "pageCount" does not exist.'52$this->source); })()), "html"nulltrue);
  146.                 echo "\"
  147.                      data-page-size=\"";
  148.                 // line 53
  149.                 echo twig_escape_filter($this->env, (isset($context["pageSize"]) || array_key_exists("pageSize"$context) ? $context["pageSize"] : (function () { throw new RuntimeError('Variable "pageSize" does not exist.'53$this->source); })()), "html"nulltrue);
  150.                 echo "\"
  151.                      data-total-all=\"";
  152.                 // line 54
  153.                 echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["resultsMeta"] ?? null), "totalAll", [], "any"truetruefalse54)) ? (twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'54$this->source); })()), "totalAll", [], "any"falsefalsefalse54)) : (((array_key_exists("total"$context)) ? ((isset($context["total"]) || array_key_exists("total"$context) ? $context["total"] : (function () { throw new RuntimeError('Variable "total" does not exist.'54$this->source); })())) : ((isset($context["totalItems"]) || array_key_exists("totalItems"$context) ? $context["totalItems"] : (function () { throw new RuntimeError('Variable "totalItems" does not exist.'54$this->source); })()))))), "html"nulltrue);
  154.                 echo "\">
  155.                     <div class=\"results-bar-top d-flex flex-column flex-md-row justify-content-between align-items-md-center gap-3\">
  156.                         <div class=\"results-stats\">
  157.                             <span class=\"results-found-prefix\">Encontrados</span>
  158.                             <span class=\"results-total\">";
  159.                 // line 58
  160.                 echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["resultsMeta"] ?? null), "totalAll", [], "any"truetruefalse58)) ? (twig_get_attribute($this->env$this->source, (isset($context["resultsMeta"]) || array_key_exists("resultsMeta"$context) ? $context["resultsMeta"] : (function () { throw new RuntimeError('Variable "resultsMeta" does not exist.'58$this->source); })()), "totalAll", [], "any"falsefalsefalse58)) : (((array_key_exists("total"$context)) ? ((isset($context["total"]) || array_key_exists("total"$context) ? $context["total"] : (function () { throw new RuntimeError('Variable "total" does not exist.'58$this->source); })())) : ((isset($context["totalItems"]) || array_key_exists("totalItems"$context) ? $context["totalItems"] : (function () { throw new RuntimeError('Variable "totalItems" does not exist.'58$this->source); })()))))), "html"nulltrue);
  161.                 echo "</span>
  162.                             <span class=\"results-found-suffix\">";
  163.                 // line 59
  164.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("results", [], "geral"), "html"nulltrue);
  165.                 echo "</span>
  166.                         </div>
  167.                     </div>
  168.                     ";
  169.                 // line 64
  170.                 echo "                    <nav class=\"results-tabs mt-3\">
  171.                         <ul class=\"results-tab-list list-unstyled d-flex mb-0 p-0 gap-1\">
  172.                             ";
  173.                 // line 66
  174.                 $context["tabMap"] = ["all" => "Todos""news" => "Notícias""news_reports" => "Reportagens""programs" => "Programas""event" => "Eventos"];
  175.                 // line 73
  176.                 echo "                            ";
  177.                 // line 74
  178.                 echo "                            ";
  179.                 $context["tabOrder"] = [=> "all"=> "news"=> "news_reports"=> "programs"=> "event"];
  180.                 // line 75
  181.                 echo "
  182.                             ";
  183.                 // line 77
  184.                 echo "                            ";
  185.                 $context["ctParam"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'77$this->source); })()), "request", [], "any"falsefalsefalse77), "query", [], "any"falsefalsefalse77), "get", [=> "content_type"], "method"falsefalsefalse77);
  186.                 // line 78
  187.                 echo "                            ";
  188.                 $context["selectedTypes"] = ((twig_test_iterable((isset($context["ctParam"]) || array_key_exists("ctParam"$context) ? $context["ctParam"] : (function () { throw new RuntimeError('Variable "ctParam" does not exist.'78$this->source); })()))) ? ((isset($context["ctParam"]) || array_key_exists("ctParam"$context) ? $context["ctParam"] : (function () { throw new RuntimeError('Variable "ctParam" does not exist.'78$this->source); })())) : ((((isset($context["ctParam"]) || array_key_exists("ctParam"$context) ? $context["ctParam"] : (function () { throw new RuntimeError('Variable "ctParam" does not exist.'78$this->source); })())) ? ([=> (isset($context["ctParam"]) || array_key_exists("ctParam"$context) ? $context["ctParam"] : (function () { throw new RuntimeError('Variable "ctParam" does not exist.'78$this->source); })())]) : ([]))));
  189.                 // line 79
  190.                 echo "                            ";
  191.                 $context["selected"] = [];
  192.                 // line 80
  193.                 echo "                            ";
  194.                 $context['_parent'] = $context;
  195.                 $context['_seq'] = twig_ensure_traversable((isset($context["selectedTypes"]) || array_key_exists("selectedTypes"$context) ? $context["selectedTypes"] : (function () { throw new RuntimeError('Variable "selectedTypes" does not exist.'80$this->source); })()));
  196.                 foreach ($context['_seq'] as $context["_key"] => $context["ct"]) {
  197.                     // line 81
  198.                     echo "                                ";
  199.                     $context["selected"] = twig_array_merge((isset($context["selected"]) || array_key_exists("selected"$context) ? $context["selected"] : (function () { throw new RuntimeError('Variable "selected" does not exist.'81$this->source); })()), [=> twig_lower_filter($this->env$context["ct"])]);
  200.                     // line 82
  201.                     echo "                            ";
  202.                 }
  203.                 $_parent $context['_parent'];
  204.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ct'], $context['_parent'], $context['loop']);
  205.                 $context array_intersect_key($context$_parent) + $_parent;
  206.                 // line 83
  207.                 echo "
  208.                             ";
  209.                 // line 85
  210.                 echo "                            ";
  211.                 $context["tabs"] = [];
  212.                 // line 86
  213.                 echo "                            ";
  214.                 $context['_parent'] = $context;
  215.                 $context['_seq'] = twig_ensure_traversable((isset($context["tabOrder"]) || array_key_exists("tabOrder"$context) ? $context["tabOrder"] : (function () { throw new RuntimeError('Variable "tabOrder" does not exist.'86$this->source); })()));
  216.                 foreach ($context['_seq'] as $context["_key"] => $context["tKey"]) {
  217.                     // line 87
  218.                     echo "                                ";
  219.                     if (twig_get_attribute($this->env$this->source, ($context["tabMap"] ?? null), $context["tKey"], [], "array"truetruefalse87)) {
  220.                         // line 88
  221.                         echo "                                    ";
  222.                         $context["tLabel"] = twig_get_attribute($this->env$this->source, (isset($context["tabMap"]) || array_key_exists("tabMap"$context) ? $context["tabMap"] : (function () { throw new RuntimeError('Variable "tabMap" does not exist.'88$this->source); })()), $context["tKey"], [], "array"falsefalsefalse88);
  223.                         // line 89
  224.                         echo "                                    ";
  225.                         $context["cnt"] = ((twig_get_attribute($this->env$this->source, ($context["counts"] ?? null), $context["tKey"], [], "array"truetruefalse89)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["counts"] ?? null), $context["tKey"], [], "array"falsefalsefalse89), 0)) : (0));
  226.                         // line 90
  227.                         echo "                                    ";
  228.                         // line 91
  229.                         echo "                                    ";
  230.                         $context["tabs"] = twig_array_merge((isset($context["tabs"]) || array_key_exists("tabs"$context) ? $context["tabs"] : (function () { throw new RuntimeError('Variable "tabs" does not exist.'91$this->source); })()), [=> ["key" => $context["tKey"], "label" => (isset($context["tLabel"]) || array_key_exists("tLabel"$context) ? $context["tLabel"] : (function () { throw new RuntimeError('Variable "tLabel" does not exist.'91$this->source); })()), "count" => (isset($context["cnt"]) || array_key_exists("cnt"$context) ? $context["cnt"] : (function () { throw new RuntimeError('Variable "cnt" does not exist.'91$this->source); })())]]);
  231.                         // line 92
  232.                         echo "                                ";
  233.                     }
  234.                     // line 93
  235.                     echo "                            ";
  236.                 }
  237.                 $_parent $context['_parent'];
  238.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tKey'], $context['_parent'], $context['loop']);
  239.                 $context array_intersect_key($context$_parent) + $_parent;
  240.                 // line 94
  241.                 echo "
  242.                             ";
  243.                 // line 96
  244.                 echo "                            ";
  245.                 $context["firstTabWithResults"] = "all";
  246.                 // line 97
  247.                 echo "                            ";
  248.                 $context['_parent'] = $context;
  249.                 $context['_seq'] = twig_ensure_traversable((isset($context["tabs"]) || array_key_exists("tabs"$context) ? $context["tabs"] : (function () { throw new RuntimeError('Variable "tabs" does not exist.'97$this->source); })()));
  250.                 foreach ($context['_seq'] as $context["_key"] => $context["tab"]) {
  251.                     // line 98
  252.                     echo "                                ";
  253.                     if ((((twig_get_attribute($this->env$this->source$context["tab"], "count", [], "any"falsefalsefalse98) > 0) && ((isset($context["firstTabWithResults"]) || array_key_exists("firstTabWithResults"$context) ? $context["firstTabWithResults"] : (function () { throw new RuntimeError('Variable "firstTabWithResults" does not exist.'98$this->source); })()) == "all")) && (twig_get_attribute($this->env$this->source$context["tab"], "key", [], "any"falsefalsefalse98) != "all"))) {
  254.                         // line 99
  255.                         echo "                                    ";
  256.                         $context["firstTabWithResults"] = twig_get_attribute($this->env$this->source$context["tab"], "key", [], "any"falsefalsefalse99);
  257.                         // line 100
  258.                         echo "                                ";
  259.                     }
  260.                     // line 101
  261.                     echo "                            ";
  262.                 }
  263.                 $_parent $context['_parent'];
  264.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tab'], $context['_parent'], $context['loop']);
  265.                 $context array_intersect_key($context$_parent) + $_parent;
  266.                 // line 102
  267.                 echo "
  268.                             ";
  269.                 // line 104
  270.                 echo "                            ";
  271.                 $context["currentTypeCount"] = ((twig_get_attribute($this->env$this->source, ($context["counts"] ?? null), (isset($context["currentType"]) || array_key_exists("currentType"$context) ? $context["currentType"] : (function () { throw new RuntimeError('Variable "currentType" does not exist.'104$this->source); })()), [], "array"truetruefalse104)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["counts"] ?? null), (isset($context["currentType"]) || array_key_exists("currentType"$context) ? $context["currentType"] : (function () { throw new RuntimeError('Variable "currentType" does not exist.'104$this->source); })()), [], "array"falsefalsefalse104), 0)) : (0));
  272.                 // line 105
  273.                 echo "                            ";
  274.                 // line 106
  275.                 echo "                            ";
  276.                 if (((((isset($context["currentTypeCount"]) || array_key_exists("currentTypeCount"$context) ? $context["currentTypeCount"] : (function () { throw new RuntimeError('Variable "currentTypeCount" does not exist.'106$this->source); })()) == 0) && ((isset($context["currentType"]) || array_key_exists("currentType"$context) ? $context["currentType"] : (function () { throw new RuntimeError('Variable "currentType" does not exist.'106$this->source); })()) != "all")) && (((twig_get_attribute($this->env$this->source, ($context["counts"] ?? null), "all", [], "array"truetruefalse106)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["counts"] ?? null), "all", [], "array"falsefalsefalse106), 0)) : (0)) > 0))) {
  277.                     // line 107
  278.                     echo "                                ";
  279.                     $context["currentType"] = "all";
  280.                     // line 108
  281.                     echo "                            ";
  282.                 } elseif ((((isset($context["currentTypeCount"]) || array_key_exists("currentTypeCount"$context) ? $context["currentTypeCount"] : (function () { throw new RuntimeError('Variable "currentTypeCount" does not exist.'108$this->source); })()) == 0) && (((twig_get_attribute($this->env$this->source, ($context["counts"] ?? null), "all", [], "array"truetruefalse108)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["counts"] ?? null), "all", [], "array"falsefalsefalse108), 0)) : (0)) == 0))) {
  283.                     // line 109
  284.                     echo "                                ";
  285.                     $context["currentType"] = (isset($context["firstTabWithResults"]) || array_key_exists("firstTabWithResults"$context) ? $context["firstTabWithResults"] : (function () { throw new RuntimeError('Variable "firstTabWithResults" does not exist.'109$this->source); })());
  286.                     // line 110
  287.                     echo "                            ";
  288.                 }
  289.                 // line 111
  290.                 echo "
  291.                             ";
  292.                 // line 112
  293.                 $context['_parent'] = $context;
  294.                 $context['_seq'] = twig_ensure_traversable((isset($context["tabs"]) || array_key_exists("tabs"$context) ? $context["tabs"] : (function () { throw new RuntimeError('Variable "tabs" does not exist.'112$this->source); })()));
  295.                 foreach ($context['_seq'] as $context["_key"] => $context["tab"]) {
  296.                     // line 113
  297.                     echo "                                ";
  298.                     $context["tKey"] = twig_get_attribute($this->env$this->source$context["tab"], "key", [], "any"falsefalsefalse113);
  299.                     // line 114
  300.                     echo "                                ";
  301.                     $context["tLabel"] = twig_get_attribute($this->env$this->source$context["tab"], "label", [], "any"falsefalsefalse114);
  302.                     // line 115
  303.                     echo "                                ";
  304.                     $context["linkParams"] = twig_array_merge(twig_array_merge((isset($context["routeParams"]) || array_key_exists("routeParams"$context) ? $context["routeParams"] : (function () { throw new RuntimeError('Variable "routeParams" does not exist.'115$this->source); })()), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'115$this->source); })()), "request", [], "any"falsefalsefalse115), "query", [], "any"falsefalsefalse115), "all", [], "any"falsefalsefalse115)), ["type" => (isset($context["tKey"]) || array_key_exists("tKey"$context) ? $context["tKey"] : (function () { throw new RuntimeError('Variable "tKey" does not exist.'115$this->source); })()), "page" => 1]);
  305.                     // line 116
  306.                     echo "                                ";
  307.                     $context["isDisabled"] = (twig_get_attribute($this->env$this->source$context["tab"], "count", [], "any"falsefalsefalse116) == 0);
  308.                     // line 117
  309.                     echo "                                <li class=\"results-tab-item";
  310.                     if (((isset($context["currentType"]) || array_key_exists("currentType"$context) ? $context["currentType"] : (function () { throw new RuntimeError('Variable "currentType" does not exist.'117$this->source); })()) == (isset($context["tKey"]) || array_key_exists("tKey"$context) ? $context["tKey"] : (function () { throw new RuntimeError('Variable "tKey" does not exist.'117$this->source); })()))) {
  311.                         echo " active";
  312.                     }
  313.                     if ((isset($context["isDisabled"]) || array_key_exists("isDisabled"$context) ? $context["isDisabled"] : (function () { throw new RuntimeError('Variable "isDisabled" does not exist.'117$this->source); })())) {
  314.                         echo " disabled";
  315.                     }
  316.                     echo "\">
  317.                                     ";
  318.                     // line 118
  319.                     if (((isset($context["route"]) || array_key_exists("route"$context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.'118$this->source); })()) &&  !(isset($context["isDisabled"]) || array_key_exists("isDisabled"$context) ? $context["isDisabled"] : (function () { throw new RuntimeError('Variable "isDisabled" does not exist.'118$this->source); })()))) {
  320.                         // line 119
  321.                         echo "                                        <a class=\"results-tab-link d-inline-block p-3";
  322.                         if (((isset($context["currentType"]) || array_key_exists("currentType"$context) ? $context["currentType"] : (function () { throw new RuntimeError('Variable "currentType" does not exist.'119$this->source); })()) == (isset($context["tKey"]) || array_key_exists("tKey"$context) ? $context["tKey"] : (function () { throw new RuntimeError('Variable "tKey" does not exist.'119$this->source); })()))) {
  323.                             echo " active";
  324.                         }
  325.                         echo "\"
  326.                                            href=\"";
  327.                         // line 120
  328.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["route"]) || array_key_exists("route"$context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.'120$this->source); })()), (isset($context["linkParams"]) || array_key_exists("linkParams"$context) ? $context["linkParams"] : (function () { throw new RuntimeError('Variable "linkParams" does not exist.'120$this->source); })())), "html"nulltrue);
  329.                         echo "\">
  330.                                             <span class=\"results-tab-text\">";
  331.                         // line 121
  332.                         echo twig_escape_filter($this->env, (isset($context["tLabel"]) || array_key_exists("tLabel"$context) ? $context["tLabel"] : (function () { throw new RuntimeError('Variable "tLabel" does not exist.'121$this->source); })()), "html"nulltrue);
  333.                         echo "</span>
  334.                                             <span class=\"results-tab-count\">(";
  335.                         // line 122
  336.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["tab"], "count", [], "any"falsefalsefalse122), "html"nulltrue);
  337.                         echo ")</span>
  338.                                         </a>
  339.                                     ";
  340.                     } else {
  341.                         // line 125
  342.                         echo "                                        <span class=\"results-tab-link d-inline-block p-3";
  343.                         if (((isset($context["currentType"]) || array_key_exists("currentType"$context) ? $context["currentType"] : (function () { throw new RuntimeError('Variable "currentType" does not exist.'125$this->source); })()) == (isset($context["tKey"]) || array_key_exists("tKey"$context) ? $context["tKey"] : (function () { throw new RuntimeError('Variable "tKey" does not exist.'125$this->source); })()))) {
  344.                             echo " active";
  345.                         }
  346.                         echo "\">
  347.                                             <span class=\"results-tab-text\">";
  348.                         // line 126
  349.                         echo twig_escape_filter($this->env, (isset($context["tLabel"]) || array_key_exists("tLabel"$context) ? $context["tLabel"] : (function () { throw new RuntimeError('Variable "tLabel" does not exist.'126$this->source); })()), "html"nulltrue);
  350.                         echo "</span>
  351.                                             <span class=\"results-tab-count\">(";
  352.                         // line 127
  353.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["tab"], "count", [], "any"falsefalsefalse127), "html"nulltrue);
  354.                         echo ")</span>
  355.                                         </span>
  356.                                     ";
  357.                     }
  358.                     // line 130
  359.                     echo "                                </li>
  360.                             ";
  361.                 }
  362.                 $_parent $context['_parent'];
  363.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tab'], $context['_parent'], $context['loop']);
  364.                 $context array_intersect_key($context$_parent) + $_parent;
  365.                 // line 132
  366.                 echo "                        </ul>
  367.                     </nav>
  368.                     ";
  369.                 // line 136
  370.                 echo "                    <form class=\"results-order-form d-flex align-items-center mt-4\" method=\"get\">
  371.                         ";
  372.                 // line 138
  373.                 echo "                        ";
  374.                 $context['_parent'] = $context;
  375.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'138$this->source); })()), "request", [], "any"falsefalsefalse138), "query", [], "any"falsefalsefalse138), "all", [], "any"falsefalsefalse138));
  376.                 foreach ($context['_seq'] as $context["key"] => $context["value"]) {
  377.                     // line 139
  378.                     echo "                            ";
  379.                     if (!twig_in_filter($context["key"], [=> "order"])) {
  380.                         // line 140
  381.                         echo "                                ";
  382.                         if (twig_test_iterable($context["value"])) {
  383.                             // line 141
  384.                             echo "                                    ";
  385.                             $context['_parent'] = $context;
  386.                             $context['_seq'] = twig_ensure_traversable($context["value"]);
  387.                             foreach ($context['_seq'] as $context["_key"] => $context["v"]) {
  388.                                 echo "<input type=\"hidden\" name=\"";
  389.                                 echo twig_escape_filter($this->env$context["key"], "html"nulltrue);
  390.                                 echo "[]\" value=\"";
  391.                                 echo twig_escape_filter($this->env$context["v"], "html"nulltrue);
  392.                                 echo "\">";
  393.                             }
  394.                             $_parent $context['_parent'];
  395.                             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['v'], $context['_parent'], $context['loop']);
  396.                             $context array_intersect_key($context$_parent) + $_parent;
  397.                             // line 142
  398.                             echo "                                ";
  399.                         } else {
  400.                             // line 143
  401.                             echo "                                    <input type=\"hidden\" name=\"";
  402.                             echo twig_escape_filter($this->env$context["key"], "html"nulltrue);
  403.                             echo "\" value=\"";
  404.                             echo twig_escape_filter($this->env$context["value"], "html"nulltrue);
  405.                             echo "\">
  406.                                 ";
  407.                         }
  408.                         // line 145
  409.                         echo "                            ";
  410.                     }
  411.                     // line 146
  412.                     echo "                        ";
  413.                 }
  414.                 $_parent $context['_parent'];
  415.                 unset($context['_seq'], $context['_iterated'], $context['key'], $context['value'], $context['_parent'], $context['loop']);
  416.                 $context array_intersect_key($context$_parent) + $_parent;
  417.                 // line 147
  418.                 echo "                        <label for=\"order_select\" class=\"mb-0 small\">Ordenar por</label>
  419.                         <div class=\"select-wrapper\">
  420.                             <select id=\"order_select\" name=\"order\" class=\"form-select form-select-sm\" onchange=\"this.form.submit()\">
  421.                                 <option value=\"relevance\" ";
  422.                 // line 150
  423.                 echo ((((isset($context["order"]) || array_key_exists("order"$context) ? $context["order"] : (function () { throw new RuntimeError('Variable "order" does not exist.'150$this->source); })()) == "relevance")) ? ("selected") : (""));
  424.                 echo ">Relevância</option>
  425.                                 <option value=\"newest\" ";
  426.                 // line 151
  427.                 echo ((((isset($context["order"]) || array_key_exists("order"$context) ? $context["order"] : (function () { throw new RuntimeError('Variable "order" does not exist.'151$this->source); })()) == "newest")) ? ("selected") : (""));
  428.                 echo ">Mais recentes</option>
  429.                                 <option value=\"popular\" ";
  430.                 // line 152
  431.                 echo ((((isset($context["order"]) || array_key_exists("order"$context) ? $context["order"] : (function () { throw new RuntimeError('Variable "order" does not exist.'152$this->source); })()) == "popular")) ? ("selected") : (""));
  432.                 echo ">Populares</option>
  433.                             </select>
  434.                             <i class=\"fa-solid fa-chevron-down\"></i>
  435.                         </div>
  436.                     </form>
  437.                 </div>
  438.                 ";
  439.                 // line 160
  440.                 echo "                ";
  441.                 // line 161
  442.                 echo "                ";
  443.                 // line 162
  444.                 echo "                ";
  445.                 // line 163
  446.                 echo "                <ul id=\"js-search-results-list\" class=\"search-results list-search-result\">
  447.                     ";
  448.                 // line 164
  449.                 $context["delay"] = 0;
  450.                 // line 165
  451.                 echo "                    ";
  452.                 $context['_parent'] = $context;
  453.                 $context['_seq'] = twig_ensure_traversable((isset($context["pageItems"]) || array_key_exists("pageItems"$context) ? $context["pageItems"] : (function () { throw new RuntimeError('Variable "pageItems" does not exist.'165$this->source); })()));
  454.                 foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  455.                     // line 166
  456.                     echo "                        ";
  457.                     $context["pageInfotitle"] = ((twig_get_attribute($this->env$this->source$context["item"], "title", [], "any"truetruefalse166)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["item"], "title", [], "any"falsefalsefalse166))) : (""));
  458.                     // line 167
  459.                     echo "                        ";
  460.                     $context["pageInfourl"] = ((twig_get_attribute($this->env$this->source$context["item"], "url", [], "any"truetruefalse167)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["item"], "url", [], "any"falsefalsefalse167))) : (""));
  461.                     // line 168
  462.                     echo "                        ";
  463.                     $context["pageInfovideo"] = ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse168), "video", [], "any"truetruefalse168)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse168), "video", [], "any"falsefalsefalse168))) : (""));
  464.                     // line 169
  465.                     echo "                        ";
  466.                     $context["pageInfovideo_mobile"] = ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse169), "video_mobile", [], "any"truetruefalse169)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse169), "video_mobile", [], "any"falsefalsefalse169))) : (""));
  467.                     // line 170
  468.                     echo "                        ";
  469.                     $context["pageInfotext"] = ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse170), "short_text", [], "any"truetruefalse170)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse170), "short_text", [], "any"falsefalsefalse170))) : (""));
  470.                     // line 171
  471.                     echo "                        ";
  472.                     $context["pageInfoimage"] = ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse171), "default_image", [], "any"truetruefalse171)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse171), "default_image", [], "any"falsefalsefalse171))) : (""));
  473.                     // line 172
  474.                     echo "                        ";
  475.                     $context["pageInfoimagemobile"] = ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse172), "default_image_mobile", [], "any"truetruefalse172)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse172), "default_image_mobile", [], "any"falsefalsefalse172))) : (""));
  476.                     // line 173
  477.                     echo "                        ";
  478.                     $context["pageInfocategories"] = ((twig_get_attribute($this->env$this->source$context["item"], "categories", [], "any"truetruefalse173)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["item"], "categories", [], "any"falsefalsefalse173))) : (""));
  479.                     // line 174
  480.                     echo "                        ";
  481.                     $context["territory"] = ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse174), "territory", [], "any"truetruefalse174)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse174), "territory", [], "any"falsefalsefalse174))) : (""));
  482.                     // line 175
  483.                     echo "                        ";
  484.                     $context["date"] = ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse175), "date", [], "any"truetruefalse175)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse175), "date", [], "any"falsefalsefalse175))) : (""));
  485.                     // line 176
  486.                     echo "                        ";
  487.                     $context["start_date"] = ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse176), "start_date", [], "any"truetruefalse176)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "content", [], "any"falsetruefalse176), "start_date", [], "any"falsefalsefalse176))) : (""));
  488.                     // line 177
  489.                     echo "
  490.                         ";
  491.                     // line 179
  492.                     echo "                        ";
  493.                     $context["tagMachines"] = [];
  494.                     // line 180
  495.                     echo "                        ";
  496.                     if ((twig_get_attribute($this->env$this->source$context["item"], "tags", [], "any"truetruefalse180) &&  !twig_test_empty(twig_get_attribute($this->env$this->source$context["item"], "tags", [], "any"falsefalsefalse180)))) {
  497.                         // line 181
  498.                         echo "                            ";
  499.                         $context['_parent'] = $context;
  500.                         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["item"], "tags", [], "any"falsefalsefalse181));
  501.                         foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
  502.                             // line 182
  503.                             echo "                                ";
  504.                             $context["machine"] = ((twig_get_attribute($this->env$this->source$context["tag"], "machineName", [], "any"truetruefalse182)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["tag"], "machineName", [], "any"falsefalsefalse182), ((twig_get_attribute($this->env$this->source$context["tag"], "machine", [], "any"truetruefalse182)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["tag"], "machine", [], "any"falsefalsefalse182), ((twig_get_attribute($this->env$this->source$context["tag"], "slug", [], "any"truetruefalse182)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["tag"], "slug", [], "any"falsefalsefalse182), $context["tag"])) : ($context["tag"])))) : (((twig_get_attribute($this->env$this->source$context["tag"], "slug", [], "any"truetruefalse182)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["tag"], "slug", [], "any"falsefalsefalse182), $context["tag"])) : ($context["tag"])))))) : (((twig_get_attribute($this->env$this->source$context["tag"], "machine", [], "any"truetruefalse182)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["tag"], "machine", [], "any"falsefalsefalse182), ((twig_get_attribute($this->env$this->source$context["tag"], "slug", [], "any"truetruefalse182)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["tag"], "slug", [], "any"falsefalsefalse182), $context["tag"])) : ($context["tag"])))) : (((twig_get_attribute($this->env$this->source$context["tag"], "slug", [], "any"truetruefalse182)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["tag"], "slug", [], "any"falsefalsefalse182), $context["tag"])) : ($context["tag"]))))));
  505.                             // line 183
  506.                             echo "                                ";
  507.                             $context["tagMachines"] = twig_array_merge((isset($context["tagMachines"]) || array_key_exists("tagMachines"$context) ? $context["tagMachines"] : (function () { throw new RuntimeError('Variable "tagMachines" does not exist.'183$this->source); })()), [=> (isset($context["machine"]) || array_key_exists("machine"$context) ? $context["machine"] : (function () { throw new RuntimeError('Variable "machine" does not exist.'183$this->source); })())]);
  508.                             // line 184
  509.                             echo "                            ";
  510.                         }
  511.                         $_parent $context['_parent'];
  512.                         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
  513.                         $context array_intersect_key($context$_parent) + $_parent;
  514.                         // line 185
  515.                         echo "                        ";
  516.                     }
  517.                     // line 186
  518.                     echo "
  519.                         ";
  520.                     // line 188
  521.                     echo "                        ";
  522.                     $context["pageId"] = (((twig_get_attribute($this->env$this->source$context["item"], "pageId", [], "any"truetruefalse188) && twig_get_attribute($this->env$this->source$context["item"], "pageId", [], "any"falsefalsefalse188))) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "pageId", [], "any"falsefalsefalse188), "id", [], "any"falsefalsefalse188)) : (null));
  523.                     // line 189
  524.                     echo "                        ";
  525.                     $context["pageInfo"] = (((isset($context["pageId"]) || array_key_exists("pageId"$context) ? $context["pageId"] : (function () { throw new RuntimeError('Variable "pageId" does not exist.'189$this->source); })())) ? (_twig_default_filter($this->extensions['App\Twig\AppExtension']->getPageInfo(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'189$this->source); })()), "request", [], "any"falsefalsefalse189), "locale", [], "any"falsefalsefalse189), (isset($context["pageId"]) || array_key_exists("pageId"$context) ? $context["pageId"] : (function () { throw new RuntimeError('Variable "pageId" does not exist.'189$this->source); })()), true"Temas"), null)) : (null));
  526.                     // line 190
  527.                     echo "                        ";
  528.                     $context["categories"] = ((( !(null === (isset($context["pageInfo"]) || array_key_exists("pageInfo"$context) ? $context["pageInfo"] : (function () { throw new RuntimeError('Variable "pageInfo" does not exist.'190$this->source); })())) && twig_get_attribute($this->env$this->source, ($context["pageInfo"] ?? null), "categories", [], "any"truetruefalse190))) ? (twig_get_attribute($this->env$this->source, (isset($context["pageInfo"]) || array_key_exists("pageInfo"$context) ? $context["pageInfo"] : (function () { throw new RuntimeError('Variable "pageInfo" does not exist.'190$this->source); })()), "categories", [], "any"falsefalsefalse190)) : ([]));
  529.                     // line 191
  530.                     echo "                        ";
  531.                     $context["exclusiveTag"] = ((((isset($context["pageInfo"]) || array_key_exists("pageInfo"$context) ? $context["pageInfo"] : (function () { throw new RuntimeError('Variable "pageInfo" does not exist.'191$this->source); })()) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["pageInfo"] ?? null), "page", [], "any"falsetruefalse191), "tags", [], "any"truetruefalse191))) ? (_twig_default_filter(twig_first($this->envtwig_array_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["pageInfo"]) || array_key_exists("pageInfo"$context) ? $context["pageInfo"] : (function () { throw new RuntimeError('Variable "pageInfo" does not exist.'191$this->source); })()), "page", [], "any"falsefalsefalse191), "tags", [], "any"falsefalsefalse191), function ($__t__) use ($context$macros) { $context["t"] = $__t__; return (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["t"]) || array_key_exists("t"$context) ? $context["t"] : (function () { throw new RuntimeError('Variable "t" does not exist.'191$this->source); })()), "domainValue", [], "any"falsefalsefalse191), "type", [], "any"falsefalsefalse191), "name", [], "any"falsefalsefalse191) == "Exclusive"); })), null)) : (null));
  532.                     // line 192
  533.                     echo "                        ";
  534.                     $context["maxVisible"] = 1;
  535.                     // line 193
  536.                     echo "
  537.                         <li ";
  538.                     // line 194
  539.                     if (((twig_get_attribute($this->env$this->source, ($context["settings"] ?? null), "is_animated", [], "any"truetruefalse194)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["settings"] ?? null), "is_animated", [], "any"falsefalsefalse194))) : (""))) {
  540.                         echo "data-aos=\"";
  541.                         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["settings"] ?? null), "animation_type", [], "any"truetruefalse194)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["settings"] ?? null), "animation_type", [], "any"falsefalsefalse194), "fade")) : ("fade")), "html"nulltrue);
  542.                         echo "\"
  543.                             data-aos-delay=\"";
  544.                         // line 195
  545.                         echo twig_escape_filter($this->env, (isset($context["delay"]) || array_key_exists("delay"$context) ? $context["delay"] : (function () { throw new RuntimeError('Variable "delay" does not exist.'195$this->source); })()), "html"nulltrue);
  546.                         echo "\"";
  547.                     }
  548.                     echo " class=\"item\"
  549.                             data-type=\"";
  550.                     // line 196
  551.                     echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source$context["item"], "getNormalizedContentTypeKey", [], "any"truetruefalse196)) ? (twig_get_attribute($this->env$this->source$context["item"], "getNormalizedContentTypeKey", [], "method"falsefalsefalse196)) : ((((twig_get_attribute($this->env$this->source$context["item"], "getNormalizedContentTypeKey", [], "method"truetruefalse196) &&  !(null === twig_get_attribute($this->env$this->source$context["item"], "getNormalizedContentTypeKey", [], "method"falsefalsefalse196)))) ? (twig_get_attribute($this->env$this->source$context["item"], "getNormalizedContentTypeKey", [], "method"falsefalsefalse196)) : ("")))), "html"nulltrue);
  552.                     echo "\"
  553.                             data-tags=\"";
  554.                     // line 197
  555.                     echo twig_escape_filter($this->envtwig_join_filter((isset($context["tagMachines"]) || array_key_exists("tagMachines"$context) ? $context["tagMachines"] : (function () { throw new RuntimeError('Variable "tagMachines" does not exist.'197$this->source); })()), ","), "html"nulltrue);
  556.                     echo "\">
  557.                             <a href=\"";
  558.                     // line 198
  559.                     echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source$context["item"], "canonicalUrl", [], "any"truetruefalse198)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["item"], "canonicalUrl", [], "any"falsefalsefalse198), "#")) : ("#")), "html"nulltrue);
  560.                     echo "\">
  561.                                 <div class=\"image-container event-card-carousel\">
  562.                                     <picture>
  563.                                         ";
  564.                     // line 201
  565.                     $context["image"] = ((array_key_exists("pageInfoimage"$context)) ? (_twig_default_filter((isset($context["pageInfoimage"]) || array_key_exists("pageInfoimage"$context) ? $context["pageInfoimage"] : (function () { throw new RuntimeError('Variable "pageInfoimage" does not exist.'201$this->source); })()), null)) : (null));
  566.                     // line 202
  567.                     echo "                                        ";
  568.                     if (twig_test_empty((isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'202$this->source); })()))) {
  569.                         // line 203
  570.                         echo "                                            ";
  571.                         $context["image"] = "/uploads/system/placeholder-vertical.png";
  572.                         // line 204
  573.                         echo "                                        ";
  574.                     }
  575.                     // line 205
  576.                     echo "                                            <img src=\"";
  577.                     echo twig_escape_filter($this->envurldecode($this->extensions['App\Bundles\Liip\ImagineBundle\Templating\AppFilterExtension']->filter((isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'205$this->source); })()), "poster")), "html"nulltrue);
  578.                     echo "\"
  579.                                                 loading=\"lazy\"
  580.                                                 alt=\"";
  581.                     // line 207
  582.                     echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source$context["item"], "title", [], "any"truetruefalse207)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["item"], "title", [], "any"falsefalsefalse207), "")) : ("")), "html"nulltrue);
  583.                     echo "\"
  584.                                                 title=\"";
  585.                     // line 208
  586.                     echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source$context["item"], "image_title", [], "any"truetruefalse208)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["item"], "image_title", [], "any"falsefalsefalse208), ((twig_get_attribute($this->env$this->source$context["item"], "title", [], "any"truetruefalse208)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["item"], "title", [], "any"falsefalsefalse208), "")) : ("")))) : (((twig_get_attribute($this->env$this->source$context["item"], "title", [], "any"truetruefalse208)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["item"], "title", [], "any"falsefalsefalse208), "")) : ("")))), "html"nulltrue);
  587.                     echo "\">
  588.                                     </picture>
  589.                                     ";
  590.                     // line 216
  591.                     echo "
  592.                                     ";
  593.                     // line 217
  594.                     if ((isset($context["pageInfovideo"]) || array_key_exists("pageInfovideo"$context) ? $context["pageInfovideo"] : (function () { throw new RuntimeError('Variable "pageInfovideo" does not exist.'217$this->source); })())) {
  595.                         // line 218
  596.                         echo "                                        <div class=\"card card-blur icon\">
  597.                                             ";
  598.                         // line 219
  599.                         echo $this->extensions['App\Twig\AppExtension']->fileGetContents($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("custom/player-icon.svg""global"));
  600.                         echo "
  601.                                         </div>
  602.                                     ";
  603.                     }
  604.                     // line 222
  605.                     echo "
  606.                                 </div>
  607.                                 <div class=\"caption\">
  608.                                     <h3 class=\"card-title\">
  609.                                         ";
  610.                     // line 227
  611.                     echo twig_escape_filter($this->env, (((twig_get_attribute($this->env$this->source$context["item"], "title", [], "any"truetruefalse227) &&  !twig_test_empty(twig_get_attribute($this->env$this->source$context["item"], "title", [], "any"falsefalsefalse227)))) ? ((((twig_length_filter($this->envtwig_get_attribute($this->env$this->source,                     // line 228
  612. $context["item"], "title", [], "any"falsefalsefalse228)) <= 80)) ? (twig_get_attribute($this->env$this->source,                     // line 229
  613. $context["item"], "title", [], "any"falsefalsefalse229)) : ((twig_slice($this->envtwig_get_attribute($this->env$this->source,                     // line 230
  614. $context["item"], "title", [], "any"falsefalsefalse230), 080) . "...")))) : (("Event Title " .                     // line 231
  615. (isset($context["i"]) || array_key_exists("i"$context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.'231$this->source); })())))), "html"nulltrue);
  616.                     echo "
  617.                                     </h3>
  618.                                     ";
  619.                     // line 234
  620.                     if ((isset($context["pageInfovideo"]) || array_key_exists("pageInfovideo"$context) ? $context["pageInfovideo"] : (function () { throw new RuntimeError('Variable "pageInfovideo" does not exist.'234$this->source); })())) {
  621.                         // line 235
  622.                         echo "                                        <div class=\"category\">
  623.                                             ";
  624.                         // line 236
  625.                         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source$context["item"], "category", [], "any"truetruefalse236)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$context["item"], "category", [], "any"falsefalsefalse236), "")) : ("")), "html"nulltrue);
  626.                         echo "
  627.                                         </div>
  628.                                     ";
  629.                     }
  630.                     // line 239
  631.                     echo "
  632.                                     ";
  633.                     // line 241
  634.                     echo "                                    ";
  635.                     echo twig_call_macro($macros["macros"], "macro_renderCategoryPopover", [(isset($context["categories"]) || array_key_exists("categories"$context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.'241$this->source); })()), (isset($context["maxVisible"]) || array_key_exists("maxVisible"$context) ? $context["maxVisible"] : (function () { throw new RuntimeError('Variable "maxVisible" does not exist.'241$this->source); })()), false, (isset($context["exclusiveTag"]) || array_key_exists("exclusiveTag"$context) ? $context["exclusiveTag"] : (function () { throw new RuntimeError('Variable "exclusiveTag" does not exist.'241$this->source); })()), (isset($context["languagecode"]) || array_key_exists("languagecode"$context) ? $context["languagecode"] : (function () { throw new RuntimeError('Variable "languagecode" does not exist.'241$this->source); })()), "categories-list"], 241$context$this->getSourceContext());
  636.                     echo "
  637.                                     
  638.                                     ";
  639.                     // line 244
  640.                     echo "                                    <div class=\"date\" title=\"";
  641.                     echo twig_escape_filter($this->env, (((isset($context["start_date"]) || array_key_exists("start_date"$context) ? $context["start_date"] : (function () { throw new RuntimeError('Variable "start_date" does not exist.'244$this->source); })())) ? (twig_date_format_filter($this->env, (isset($context["start_date"]) || array_key_exists("start_date"$context) ? $context["start_date"] : (function () { throw new RuntimeError('Variable "start_date" does not exist.'244$this->source); })()), "d/m/Y")) : (twig_date_format_filter($this->env, (isset($context["date"]) || array_key_exists("date"$context) ? $context["date"] : (function () { throw new RuntimeError('Variable "date" does not exist.'244$this->source); })()), "d/m/Y"))), "html"nulltrue);
  642.                     echo "\">
  643.                                         ";
  644.                     // line 245
  645.                     $context["tz"] = "Europe/Lisbon";
  646.                     // line 246
  647.                     echo "                                        ";
  648.                     $context["dateValue"] = (((isset($context["start_date"]) || array_key_exists("start_date"$context) ? $context["start_date"] : (function () { throw new RuntimeError('Variable "start_date" does not exist.'246$this->source); })())) ? ((isset($context["start_date"]) || array_key_exists("start_date"$context) ? $context["start_date"] : (function () { throw new RuntimeError('Variable "start_date" does not exist.'246$this->source); })())) : ((isset($context["date"]) || array_key_exists("date"$context) ? $context["date"] : (function () { throw new RuntimeError('Variable "date" does not exist.'246$this->source); })())));
  649.                     // line 247
  650.                     echo "                                        ";
  651.                     $context["fmt"] = (((is_string($__internal_compile_0 twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'247$this->source); })()), "request", [], "any"falsefalsefalse247), "locale", [], "any"falsefalsefalse247)) && is_string($__internal_compile_1 "en") && ('' === $__internal_compile_1 || === strpos($__internal_compile_0$__internal_compile_1)))) ? ("MMM d yyyy") : ("d MMM Y"));
  652.                     // line 248
  653.                     echo "                                        ";
  654.                     echo $this->extensions['App\Twig\AppExtension']->fileGetContents($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("custom/time-icon.svg""global"));
  655.                     echo "
  656.                                         ";
  657.                     // line 249
  658.                     echo twig_escape_filter($this->envtwig_localized_date_filter($this->env, (isset($context["dateValue"]) || array_key_exists("dateValue"$context) ? $context["dateValue"] : (function () { throw new RuntimeError('Variable "dateValue" does not exist.'249$this->source); })()), "none""none"twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'249$this->source); })()), "request", [], "any"falsefalsefalse249), "locale", [], "any"falsefalsefalse249), (isset($context["tz"]) || array_key_exists("tz"$context) ? $context["tz"] : (function () { throw new RuntimeError('Variable "tz" does not exist.'249$this->source); })()), (isset($context["fmt"]) || array_key_exists("fmt"$context) ? $context["fmt"] : (function () { throw new RuntimeError('Variable "fmt" does not exist.'249$this->source); })())), "html"nulltrue);
  659.                     echo "
  660.                                     </div>
  661.                                     
  662.                                 </div>
  663.                             </a>
  664.                         </li>
  665.                         ";
  666.                     // line 256
  667.                     $context["delay"] = ((isset($context["delay"]) || array_key_exists("delay"$context) ? $context["delay"] : (function () { throw new RuntimeError('Variable "delay" does not exist.'256$this->source); })()) + 150);
  668.                     // line 257
  669.                     echo "                    ";
  670.                 }
  671.                 $_parent $context['_parent'];
  672.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  673.                 $context array_intersect_key($context$_parent) + $_parent;
  674.                 // line 258
  675.                 echo "                </ul>
  676.                 ";
  677.                 // line 259
  678.                 if (((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'259$this->source); })()), "request", [], "any"falsefalsefalse259), "query", [], "any"falsefalsefalse259), "get", [=> "isajax"], "method"falsefalsefalse259) != "1") && ((isset($context["nextPage"]) || array_key_exists("nextPage"$context) ? $context["nextPage"] : (function () { throw new RuntimeError('Variable "nextPage" does not exist.'259$this->source); })()) > 0))) {
  679.                     // line 260
  680.                     echo "                    <div class=\"load-more-wrapper text-center mt-4\">
  681.                         <button id=\"js-load-more-results\"
  682.                                 class=\"btn-primary btn-style-1 btn-load-more\"
  683.                                 data-current-page=\"";
  684.                     // line 263
  685.                     echo twig_escape_filter($this->env, (isset($context["currentPage"]) || array_key_exists("currentPage"$context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.'263$this->source); })()), "html"nulltrue);
  686.                     echo "\"
  687.                                 data-total-pages=\"";
  688.                     // line 264
  689.                     echo twig_escape_filter($this->env, (isset($context["pageCount"]) || array_key_exists("pageCount"$context) ? $context["pageCount"] : (function () { throw new RuntimeError('Variable "pageCount" does not exist.'264$this->source); })()), "html"nulltrue);
  690.                     echo "\"
  691.                                 data-next-page=\"";
  692.                     // line 265
  693.                     echo twig_escape_filter($this->env, (isset($context["nextPage"]) || array_key_exists("nextPage"$context) ? $context["nextPage"] : (function () { throw new RuntimeError('Variable "nextPage" does not exist.'265$this->source); })()), "html"nulltrue);
  694.                     echo "\"
  695.                                 type=\"button\">
  696.                             <span class=\"label\">";
  697.                     // line 267
  698.                     echo twig_escape_filter($this->env_twig_default_filter($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("see_more", [], "custom"), "Ver mais"), "html"nulltrue);
  699.                     echo "</span>
  700.                             <span class=\"spinner d-none\" aria-hidden=\"true\"></span>
  701.                         </button>
  702.                     </div>
  703.                     <script>
  704.                         (function () {
  705.                             const btn = document.getElementById('js-load-more-results');
  706.                             const list = document.getElementById('js-search-results-list');
  707.                             if (!btn || !list) return;
  708.                             let loading = false;
  709.                             function buildUrl(p) {
  710.                                 const url = new URL(window.location.href);
  711.                                 url.searchParams.set('page', p);
  712.                                 url.searchParams.set('isajax', '1');
  713.                                 return url.toString();
  714.                             }
  715.                             function show() {
  716.                                 btn.disabled = true;
  717.                                 btn.classList.add('is-loading');
  718.                                 const sp = btn.querySelector('.spinner');
  719.                                 sp && sp.classList.remove('d-none');
  720.                             }
  721.                             function hide() {
  722.                                 btn.disabled = false;
  723.                                 btn.classList.remove('is-loading');
  724.                                 const sp = btn.querySelector('.spinner');
  725.                                 sp && sp.classList.add('d-none');
  726.                             }
  727.                             async function load() {
  728.                                 if (loading) return;
  729.                                 loading = true;
  730.                                 show();
  731.                                 const next = parseInt(btn.getAttribute('data-next-page'), 10);
  732.                                 const total = parseInt(btn.getAttribute('data-total-pages'), 10);
  733.                                 try {
  734.                                     const r = await fetch(buildUrl(next), {headers: {'X-Requested-With': 'XMLHttpRequest'}});
  735.                                     if (!r.ok) throw new Error(r.status);
  736.                                     const html = await r.text();
  737.                                     const tmp = document.createElement('div');
  738.                                     tmp.innerHTML = html;
  739.                                     const fragUl = tmp.querySelector('#js-search-results-list');
  740.                                     const items = fragUl ? fragUl.querySelectorAll('li') : tmp.querySelectorAll('li.item');
  741.                                     items.forEach(li => {
  742.                                         const id = li.getAttribute('data-id');
  743.                                         if (!list.querySelector(`[data-id=\"\${id}\"]`)) {
  744.                                             li.classList.add('appended');
  745.                                             list.appendChild(li);
  746.                                         }
  747.                                     });
  748.                                     if (next >= total) {
  749.                                         btn.remove();
  750.                                     } else {
  751.                                         btn.setAttribute('data-current-page', String(next));
  752.                                         btn.setAttribute('data-next-page', String(next + 1));
  753.                                     }
  754.                                 } catch (e) {
  755.                                     console.error('Load more failed', e);
  756.                                     btn.classList.add('error');
  757.                                 } finally {
  758.                                     hide();
  759.                                     loading = false;
  760.                                 }
  761.                             }
  762.                             btn.addEventListener('click', function (e) {
  763.                                 e.preventDefault();
  764.                                 load();
  765.                             });
  766.                         })();
  767.                     </script>
  768.                 ";
  769.                 }
  770.                 // line 342
  771.                 echo "
  772.             ";
  773.             }
  774.             // line 345
  775.             echo "        </div>
  776.     </section>
  777. ";
  778.         }
  779.         
  780.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  781.         
  782.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  783.     }
  784.     public function getTemplateName()
  785.     {
  786.         return "blocks/B51_search_results/B51_search_results.default.html.twig";
  787.     }
  788.     public function isTraitable()
  789.     {
  790.         return false;
  791.     }
  792.     public function getDebugInfo()
  793.     {
  794.         return array (  797 => 345,  792 => 342,  714 => 267,  709 => 265,  705 => 264,  701 => 263,  696 => 260,  694 => 259,  691 => 258,  685 => 257,  683 => 256,  673 => 249,  668 => 248,  665 => 247,  662 => 246,  660 => 245,  655 => 244,  649 => 241,  646 => 239,  640 => 236,  637 => 235,  635 => 234,  629 => 231,  628 => 230,  627 => 229,  626 => 228,  625 => 227,  618 => 222,  612 => 219,  609 => 218,  607 => 217,  604 => 216,  599 => 208,  595 => 207,  589 => 205,  586 => 204,  583 => 203,  580 => 202,  578 => 201,  572 => 198,  568 => 197,  564 => 196,  558 => 195,  552 => 194,  549 => 193,  546 => 192,  543 => 191,  540 => 190,  537 => 189,  534 => 188,  531 => 186,  528 => 185,  522 => 184,  519 => 183,  516 => 182,  511 => 181,  508 => 180,  505 => 179,  502 => 177,  499 => 176,  496 => 175,  493 => 174,  490 => 173,  487 => 172,  484 => 171,  481 => 170,  478 => 169,  475 => 168,  472 => 167,  469 => 166,  464 => 165,  462 => 164,  459 => 163,  457 => 162,  455 => 161,  453 => 160,  443 => 152,  439 => 151,  435 => 150,  430 => 147,  424 => 146,  421 => 145,  413 => 143,  410 => 142,  396 => 141,  393 => 140,  390 => 139,  385 => 138,  382 => 136,  377 => 132,  370 => 130,  364 => 127,  360 => 126,  353 => 125,  347 => 122,  343 => 121,  339 => 120,  332 => 119,  330 => 118,  320 => 117,  317 => 116,  314 => 115,  311 => 114,  308 => 113,  304 => 112,  301 => 111,  298 => 110,  295 => 109,  292 => 108,  289 => 107,  286 => 106,  284 => 105,  281 => 104,  278 => 102,  272 => 101,  269 => 100,  266 => 99,  263 => 98,  258 => 97,  255 => 96,  252 => 94,  246 => 93,  243 => 92,  240 => 91,  238 => 90,  235 => 89,  232 => 88,  229 => 87,  224 => 86,  221 => 85,  218 => 83,  212 => 82,  209 => 81,  204 => 80,  201 => 79,  198 => 78,  195 => 77,  192 => 75,  189 => 74,  187 => 73,  185 => 66,  181 => 64,  174 => 59,  170 => 58,  163 => 54,  159 => 53,  153 => 52,  148 => 50,  145 => 49,  142 => 48,  139 => 47,  136 => 46,  133 => 45,  130 => 44,  128 => 43,  125 => 42,  123 => 41,  121 => 40,  118 => 38,  116 => 37,  113 => 35,  110 => 34,  107 => 33,  104 => 32,  101 => 31,  98 => 30,  95 => 29,  92 => 28,  89 => 27,  86 => 26,  83 => 25,  80 => 24,  77 => 23,  75 => 21,  74 => 20,  73 => 16,  72 => 15,  71 => 14,  70 => 12,  68 => 11,  66 => 10,  64 => 9,  62 => 8,  56 => 6,  54 => 5,  48 => 3,  45 => 2,  43 => 1,);
  795.     }
  796.     public function getSourceContext()
  797.     {
  798.         return new Source("{% if hasGeneralSearch %}
  799.     {% import 'blocks\\\\macros.html.twig' as macros %}
  800.     <section class=\"block-search-results\" {{ macros.getBlockDataAttributes(_context) }}>
  801.         <div class=\"container\">
  802.             {% if values|length == 0 %}
  803.                 {{ 'zerorecords'|trans([],'studio') }}
  804.             {% else %}
  805.                 {# ---------------------------------------------- #}
  806.                 {# Prepare data: items collection & type counts   #}
  807.                 {# ---------------------------------------------- #}
  808.                 {% set resultsMeta = results is defined ? results : {
  809.                     'items': values.items is defined ? values.items : values,
  810.                     'counts': {'news':0,'news_reports':0,'programs':0,'event':0,'all':0},
  811.                     'currentType': app.request.query.get('type')|default('all'),
  812.                     'order': app.request.query.get('order')|default('relevance'),
  813.                     'page': (app.request.query.get('page')|default(1)) + 0,
  814.                     'pageSize': 15,
  815.                     'pageCount': 1,
  816.                     'nextPage': 0,
  817.                     'total': (values.items is defined ? values.items|length : values|length),
  818.                     'totalAll': (values.items is defined ? values.items|length : values|length)
  819.                 } %}
  820.                 {% set items = resultsMeta.items %}
  821.                 {% set counts = resultsMeta.counts %}
  822.                 {% set currentType = resultsMeta.currentType %}
  823.                 {% set order = resultsMeta.order %}
  824.                 {% set route = app.request.attributes.get('_route') %}
  825.                 {% set routeParams = app.request.attributes.get('_route_params')|default({}) %}
  826.                 {% set currentPage = resultsMeta.page %}
  827.                 {% set pageSize = resultsMeta.pageSize %}
  828.                 {% set pageCount = resultsMeta.pageCount %}
  829.                 {% set nextPage = resultsMeta.nextPage %}
  830.                 {% set totalItems = resultsMeta.total %}
  831.                 {% set pageItems = items %}
  832.                 {# --- Server-side filtering (tags[]=machine, themes[]=label) --- #}
  833.                 {# Backend now applies tags[] and themes[] filtering; template no longer re-filters #}
  834.                 {# ---------------------------------------------- #}
  835.                 {# Results header (counts + ordering)             #}
  836.                 {# ---------------------------------------------- #}
  837.                 {% if app.request.query.get('p') %}
  838.                     {% set resultString = '<h1 class=\"results-title\">Conta lá <span>' ~ app.request.query.get('p') ~ '</span></h1>' %}
  839.                 {% elseif app.request.query.get('themes') %}
  840.                     {% set themes = app.request.query.get('themes') %}
  841.                     {% set resultString = '<h1 class=\"results-title\">Conta lá <span>' ~ (themes|length == 1 ? themes[0] : themes|join(', ')) ~ '</span></h1>' %}
  842.                 {% endif %}
  843.                 {{ resultString|default|raw }}
  844.                 <div class=\"results-bar mb-4\" data-current-page=\"{{ currentPage }}\" data-page-count=\"{{ pageCount }}\"
  845.                      data-page-size=\"{{ pageSize }}\"
  846.                      data-total-all=\"{{ resultsMeta.totalAll is defined ? resultsMeta.totalAll : (total is defined ? total : totalItems) }}\">
  847.                     <div class=\"results-bar-top d-flex flex-column flex-md-row justify-content-between align-items-md-center gap-3\">
  848.                         <div class=\"results-stats\">
  849.                             <span class=\"results-found-prefix\">Encontrados</span>
  850.                             <span class=\"results-total\">{{ resultsMeta.totalAll is defined ? resultsMeta.totalAll : (total is defined ? total : totalItems) }}</span>
  851.                             <span class=\"results-found-suffix\">{{ 'results'|trans ({},'geral') }}</span>
  852.                         </div>
  853.                     </div>
  854.                     {# Tabs #}
  855.                     <nav class=\"results-tabs mt-3\">
  856.                         <ul class=\"results-tab-list list-unstyled d-flex mb-0 p-0 gap-1\">
  857.                             {% set tabMap = {
  858.                                 'all': 'Todos',
  859.                                 'news': 'Notícias',
  860.                                 'news_reports': 'Reportagens',
  861.                                 'programs': 'Programas',
  862.                                 'event': 'Eventos'
  863.                             } %}
  864.                             {# Define the order we want to display tabs #}
  865.                             {% set tabOrder = ['all', 'news', 'news_reports', 'programs', 'event'] %}
  866.                             {# restrict by content_type[] when provided #}
  867.                             {% set ctParam = app.request.query.get('content_type') %}
  868.                             {% set selectedTypes = ctParam is iterable ? ctParam : (ctParam ? [ctParam] : []) %}
  869.                             {% set selected = [] %}
  870.                             {% for ct in selectedTypes %}
  871.                                 {% set selected = selected|merge([ct|lower]) %}
  872.                             {% endfor %}
  873.                             {# build tab objects in the specified order, showing all tabs #}
  874.                             {% set tabs = [] %}
  875.                             {% for tKey in tabOrder %}
  876.                                 {% if tabMap[tKey] is defined %}
  877.                                     {% set tLabel = tabMap[tKey] %}
  878.                                     {% set cnt = counts[tKey]|default(0) %}
  879.                                     {# Always add the tab, regardless of count or selection #}
  880.                                     {% set tabs = tabs|merge([{'key': tKey, 'label': tLabel, 'count': cnt}]) %}
  881.                                 {% endif %}
  882.                             {% endfor %}
  883.                             {# Find the first tab with count > 0 to auto-select if current type has no results #}
  884.                             {% set firstTabWithResults = 'all' %}
  885.                             {% for tab in tabs %}
  886.                                 {% if tab.count > 0 and firstTabWithResults == 'all' and tab.key != 'all' %}
  887.                                     {% set firstTabWithResults = tab.key %}
  888.                                 {% endif %}
  889.                             {% endfor %}
  890.                             {# Auto-select \"Todos\" tab by default, or first tab with results if \"Todos\" has no results #}
  891.                             {% set currentTypeCount = counts[currentType]|default(0) %}
  892.                             {# Don't override currentType if it's already set correctly by the backend #}
  893.                             {% if currentTypeCount == 0 and currentType != 'all' and counts['all']|default(0) > 0 %}
  894.                                 {% set currentType = 'all' %}
  895.                             {% elseif currentTypeCount == 0 and counts['all']|default(0) == 0 %}
  896.                                 {% set currentType = firstTabWithResults %}
  897.                             {% endif %}
  898.                             {% for tab in tabs %}
  899.                                 {% set tKey = tab.key %}
  900.                                 {% set tLabel = tab.label %}
  901.                                 {% set linkParams = routeParams|merge(app.request.query.all)|merge({'type': tKey, 'page': 1}) %}
  902.                                 {% set isDisabled = tab.count == 0 %}
  903.                                 <li class=\"results-tab-item{% if currentType == tKey %} active{% endif %}{% if isDisabled %} disabled{% endif %}\">
  904.                                     {% if route and not isDisabled %}
  905.                                         <a class=\"results-tab-link d-inline-block p-3{% if currentType == tKey %} active{% endif %}\"
  906.                                            href=\"{{ path(route, linkParams) }}\">
  907.                                             <span class=\"results-tab-text\">{{ tLabel }}</span>
  908.                                             <span class=\"results-tab-count\">({{ tab.count }})</span>
  909.                                         </a>
  910.                                     {% else %}
  911.                                         <span class=\"results-tab-link d-inline-block p-3{% if currentType == tKey %} active{% endif %}\">
  912.                                             <span class=\"results-tab-text\">{{ tLabel }}</span>
  913.                                             <span class=\"results-tab-count\">({{ tab.count }})</span>
  914.                                         </span>
  915.                                     {% endif %}
  916.                                 </li>
  917.                             {% endfor %}
  918.                         </ul>
  919.                     </nav>
  920.                     {# Ordering form #}
  921.                     <form class=\"results-order-form d-flex align-items-center mt-4\" method=\"get\">
  922.                         {# preserve all current query params except order #}
  923.                         {% for key,value in app.request.query.all %}
  924.                             {% if key not in ['order'] %}
  925.                                 {% if value is iterable %}
  926.                                     {% for v in value %}<input type=\"hidden\" name=\"{{ key }}[]\" value=\"{{ v }}\">{% endfor %}
  927.                                 {% else %}
  928.                                     <input type=\"hidden\" name=\"{{ key }}\" value=\"{{ value }}\">
  929.                                 {% endif %}
  930.                             {% endif %}
  931.                         {% endfor %}
  932.                         <label for=\"order_select\" class=\"mb-0 small\">Ordenar por</label>
  933.                         <div class=\"select-wrapper\">
  934.                             <select id=\"order_select\" name=\"order\" class=\"form-select form-select-sm\" onchange=\"this.form.submit()\">
  935.                                 <option value=\"relevance\" {{ order == 'relevance' ? 'selected' }}>Relevância</option>
  936.                                 <option value=\"newest\" {{ order == 'newest' ? 'selected' }}>Mais recentes</option>
  937.                                 <option value=\"popular\" {{ order == 'popular' ? 'selected' }}>Populares</option>
  938.                             </select>
  939.                             <i class=\"fa-solid fa-chevron-down\"></i>
  940.                         </div>
  941.                     </form>
  942.                 </div>
  943.                 {# ---------------------------------------------- #}
  944.                 {# Results grid list                                #}
  945.                 {# ---------------------------------------------- #}
  946.                 {# Results list wrapper (AJAX will append <li> items) #}
  947.                 <ul id=\"js-search-results-list\" class=\"search-results list-search-result\">
  948.                     {% set delay = 0 %}
  949.                     {% for item in pageItems %}
  950.                         {% set pageInfotitle = item.title|default %}
  951.                         {% set pageInfourl = item.url|default %}
  952.                         {% set pageInfovideo = item.content.video|default %}
  953.                         {% set pageInfovideo_mobile = item.content.video_mobile|default %}
  954.                         {% set pageInfotext = item.content.short_text|default %}
  955.                         {% set pageInfoimage = item.content.default_image|default %}
  956.                         {% set pageInfoimagemobile = item.content.default_image_mobile|default %}
  957.                         {% set pageInfocategories = item.categories|default %}
  958.                         {% set territory = item.content.territory|default %}
  959.                         {% set date = item.content.date|default %}
  960.                         {% set start_date = item.content.start_date|default %}
  961.                         {# Collect tag machines (fallback to id) for filtering #}
  962.                         {% set tagMachines = [] %}
  963.                         {% if item.tags is defined and item.tags is not empty %}
  964.                             {% for tag in item.tags %}
  965.                                 {% set machine = tag.machineName|default(tag.machine|default(tag.slug|default(tag))) %}
  966.                                 {% set tagMachines = tagMachines|merge([ machine ]) %}
  967.                             {% endfor %}
  968.                         {% endif %}
  969.                         {# Get categories (Temas) for this item #}
  970.                         {% set pageId = item.pageId is defined and item.pageId ? item.pageId.id : null %}
  971.                         {% set pageInfo = pageId ? get_page_info(app.request.locale, pageId, true, \"Temas\")|default(null) : null %}
  972.                         {% set categories = (pageInfo is not null and pageInfo.categories is defined) ? pageInfo.categories : [] %}
  973.                         {% set exclusiveTag = pageInfo and pageInfo.page.tags is defined ? pageInfo.page.tags|filter(t => t.domainValue.type.name == 'Exclusive')|first|default(null) : null %}
  974.                         {% set maxVisible = 1 %}
  975.                         <li {% if settings.is_animated|default %}data-aos=\"{{ settings.animation_type|default(\"fade\") }}\"
  976.                             data-aos-delay=\"{{ delay }}\"{% endif %} class=\"item\"
  977.                             data-type=\"{{ item.getNormalizedContentTypeKey is defined ? item.getNormalizedContentTypeKey() : (item.getNormalizedContentTypeKey() ?? '') }}\"
  978.                             data-tags=\"{{ tagMachines|join(',') }}\">
  979.                             <a href=\"{{ item.canonicalUrl|default('#') }}\">
  980.                                 <div class=\"image-container event-card-carousel\">
  981.                                     <picture>
  982.                                         {% set image = pageInfoimage|default(null) %}
  983.                                         {% if image is empty %}
  984.                                             {% set image = '/uploads/system/placeholder-vertical.png' %}
  985.                                         {% endif %}
  986.                                             <img src=\"{{ (image)|imagine_filter('poster')|urldecode }}\"
  987.                                                 loading=\"lazy\"
  988.                                                 alt=\"{{ item.title|default('') }}\"
  989.                                                 title=\"{{ item.image_title|default(item.title|default('')) }}\">
  990.                                     </picture>
  991.                                     {# <form>
  992.                                         <input type=\"hidden\" name=\"highlight_id\">
  993.                                         <button type=\"submit\" class=\"favorites-button js-favorites-button\">
  994.                                             {{ file_get_contents(asset('custom/favorites-icon.svg', 'global'))|raw }}
  995.                                         </button>
  996.                                     </form> #}
  997.                                     {% if pageInfovideo %}
  998.                                         <div class=\"card card-blur icon\">
  999.                                             {{ file_get_contents(asset('custom/player-icon.svg', 'global'))|raw }}
  1000.                                         </div>
  1001.                                     {% endif %}
  1002.                                 </div>
  1003.                                 <div class=\"caption\">
  1004.                                     <h3 class=\"card-title\">
  1005.                                         {{ item.title is defined and item.title is not empty
  1006.                                         ? (item.title|length <= 80
  1007.                                         ? item.title
  1008.                                         : item.title|slice(0, 80) ~ '...')
  1009.                                         : 'Event Title ' ~ i }}
  1010.                                     </h3>
  1011.                                     {% if pageInfovideo %}
  1012.                                         <div class=\"category\">
  1013.                                             {{ item.category|default('') }}
  1014.                                         </div>
  1015.                                     {% endif %}
  1016.                                     {# temas #}
  1017.                                     {{ macros.renderCategoryPopover(categories, maxVisible, false, exclusiveTag, languagecode, 'categories-list') }}
  1018.                                     
  1019.                                     {# date #}
  1020.                                     <div class=\"date\" title=\"{{ start_date ? start_date|date('d/m/Y') : date|date('d/m/Y') }}\">
  1021.                                         {% set tz = 'Europe/Lisbon' %}
  1022.                                         {% set dateValue = start_date ? start_date : date %}
  1023.                                         {% set fmt = app.request.locale starts with('en') ? 'MMM d yyyy' : 'd MMM Y' %}
  1024.                                         {{ file_get_contents(asset('custom/time-icon.svg', 'global'))|raw }}
  1025.                                         {{ dateValue|localizeddate('none', 'none', app.request.locale, tz, fmt) }}
  1026.                                     </div>
  1027.                                     
  1028.                                 </div>
  1029.                             </a>
  1030.                         </li>
  1031.                         {% set delay = delay + 150 %}
  1032.                     {% endfor %}
  1033.                 </ul>
  1034.                 {% if app.request.query.get('isajax') != '1' and nextPage > 0 %}
  1035.                     <div class=\"load-more-wrapper text-center mt-4\">
  1036.                         <button id=\"js-load-more-results\"
  1037.                                 class=\"btn-primary btn-style-1 btn-load-more\"
  1038.                                 data-current-page=\"{{ currentPage }}\"
  1039.                                 data-total-pages=\"{{ pageCount }}\"
  1040.                                 data-next-page=\"{{ nextPage }}\"
  1041.                                 type=\"button\">
  1042.                             <span class=\"label\">{{ 'see_more'|trans({}, 'custom')|default('Ver mais') }}</span>
  1043.                             <span class=\"spinner d-none\" aria-hidden=\"true\"></span>
  1044.                         </button>
  1045.                     </div>
  1046.                     <script>
  1047.                         (function () {
  1048.                             const btn = document.getElementById('js-load-more-results');
  1049.                             const list = document.getElementById('js-search-results-list');
  1050.                             if (!btn || !list) return;
  1051.                             let loading = false;
  1052.                             function buildUrl(p) {
  1053.                                 const url = new URL(window.location.href);
  1054.                                 url.searchParams.set('page', p);
  1055.                                 url.searchParams.set('isajax', '1');
  1056.                                 return url.toString();
  1057.                             }
  1058.                             function show() {
  1059.                                 btn.disabled = true;
  1060.                                 btn.classList.add('is-loading');
  1061.                                 const sp = btn.querySelector('.spinner');
  1062.                                 sp && sp.classList.remove('d-none');
  1063.                             }
  1064.                             function hide() {
  1065.                                 btn.disabled = false;
  1066.                                 btn.classList.remove('is-loading');
  1067.                                 const sp = btn.querySelector('.spinner');
  1068.                                 sp && sp.classList.add('d-none');
  1069.                             }
  1070.                             async function load() {
  1071.                                 if (loading) return;
  1072.                                 loading = true;
  1073.                                 show();
  1074.                                 const next = parseInt(btn.getAttribute('data-next-page'), 10);
  1075.                                 const total = parseInt(btn.getAttribute('data-total-pages'), 10);
  1076.                                 try {
  1077.                                     const r = await fetch(buildUrl(next), {headers: {'X-Requested-With': 'XMLHttpRequest'}});
  1078.                                     if (!r.ok) throw new Error(r.status);
  1079.                                     const html = await r.text();
  1080.                                     const tmp = document.createElement('div');
  1081.                                     tmp.innerHTML = html;
  1082.                                     const fragUl = tmp.querySelector('#js-search-results-list');
  1083.                                     const items = fragUl ? fragUl.querySelectorAll('li') : tmp.querySelectorAll('li.item');
  1084.                                     items.forEach(li => {
  1085.                                         const id = li.getAttribute('data-id');
  1086.                                         if (!list.querySelector(`[data-id=\"\${id}\"]`)) {
  1087.                                             li.classList.add('appended');
  1088.                                             list.appendChild(li);
  1089.                                         }
  1090.                                     });
  1091.                                     if (next >= total) {
  1092.                                         btn.remove();
  1093.                                     } else {
  1094.                                         btn.setAttribute('data-current-page', String(next));
  1095.                                         btn.setAttribute('data-next-page', String(next + 1));
  1096.                                     }
  1097.                                 } catch (e) {
  1098.                                     console.error('Load more failed', e);
  1099.                                     btn.classList.add('error');
  1100.                                 } finally {
  1101.                                     hide();
  1102.                                     loading = false;
  1103.                                 }
  1104.                             }
  1105.                             btn.addEventListener('click', function (e) {
  1106.                                 e.preventDefault();
  1107.                                 load();
  1108.                             });
  1109.                         })();
  1110.                     </script>
  1111.                 {% endif %}
  1112.             {% endif %}
  1113.         </div>
  1114.     </section>
  1115. {% endif %}
  1116. ""blocks/B51_search_results/B51_search_results.default.html.twig""/var/www/html/theme/templates/blocks/B51_search_results/B51_search_results.default.html.twig");
  1117.     }
  1118. }