var/cache/review/twig/fe/fe6ae84e185bac133a8df8c62c15d6de.php line 57

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. /* Map/page.html.twig */
  14. class __TwigTemplate_a28a045d3be3f3299f645cdfe29370c8 extends 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->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'metaDescription' => [$this'block_metaDescription'],
  25.             'stylesheet' => [$this'block_stylesheet'],
  26.             'preconnect' => [$this'block_preconnect'],
  27.             'name_page' => [$this'block_name_page'],
  28.             'mainContainer' => [$this'block_mainContainer'],
  29.             'javascripts' => [$this'block_javascripts'],
  30.         ];
  31.     }
  32.     protected function doGetParent(array $context)
  33.     {
  34.         // line 1
  35.         return "grid.html.twig";
  36.     }
  37.     protected function doDisplay(array $context, array $blocks = [])
  38.     {
  39.         $macros $this->macros;
  40.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  41.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Map/page.html.twig"));
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Map/page.html.twig"));
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Map/page.html.twig"));
  46.         $this->parent $this->loadTemplate("grid.html.twig""Map/page.html.twig"1);
  47.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  48.         
  49.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  50.         
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  52.         
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  54.     }
  55.     // line 3
  56.     public function block_title($context, array $blocks = [])
  57.     {
  58.         $macros $this->macros;
  59.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  60.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  61.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  62.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  64.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  65.         // line 4
  66.         echo "    ";
  67.         echo twig_escape_filter($this->env$this->extensions['App\Twig\SeoExtension']->metaTitle(), "html"nulltrue);
  68.         echo "
  69. ";
  70.         
  71.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  72.         
  73.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  74.         
  75.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  76.     }
  77.     // line 7
  78.     public function block_metaDescription($context, array $blocks = [])
  79.     {
  80.         $macros $this->macros;
  81.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  82.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metaDescription"));
  83.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  84.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metaDescription"));
  85.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  86.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metaDescription"));
  87.         // line 8
  88.         echo "    <meta name=\"description\" content=\"";
  89.         echo twig_escape_filter($this->env$this->extensions['App\Twig\SeoExtension']->metaDescription(), "html"nulltrue);
  90.         echo "\">
  91. ";
  92.         
  93.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  94.         
  95.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  96.         
  97.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  98.     }
  99.     // line 11
  100.     public function block_stylesheet($context, array $blocks = [])
  101.     {
  102.         $macros $this->macros;
  103.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  104.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  105.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  106.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  107.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  108.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  109.         // line 12
  110.         echo "    ";
  111.         $this->displayParentBlock("stylesheet"$context$blocks);
  112.         echo "
  113.     <link rel=\"stylesheet\" href=\"//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css\">
  114. ";
  115.         
  116.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  117.         
  118.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  119.         
  120.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  121.     }
  122.     // line 16
  123.     public function block_preconnect($context, array $blocks = [])
  124.     {
  125.         $macros $this->macros;
  126.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  127.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""preconnect"));
  128.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  129.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""preconnect"));
  130.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  131.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""preconnect"));
  132.         // line 17
  133.         echo "\t";
  134.         $this->displayParentBlock("preconnect"$context$blocks);
  135.         echo "
  136. \t<link rel=\"preconnect\" href=\"https://yastatic.net\">
  137. \t<link rel=\"preconnect\" href=\"https://api-maps.yandex.ru\">
  138. ";
  139.         
  140.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  141.         
  142.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  143.         
  144.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  145.     }
  146.     // line 22
  147.     public function block_name_page($context, array $blocks = [])
  148.     {
  149.         $macros $this->macros;
  150.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  151.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""name_page"));
  152.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  153.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""name_page"));
  154.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  155.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""name_page"));
  156.         echo "map";
  157.         
  158.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  159.         
  160.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  161.         
  162.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  163.     }
  164.     // line 24
  165.     public function block_mainContainer($context, array $blocks = [])
  166.     {
  167.         $macros $this->macros;
  168.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  169.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  170.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  171.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  172.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  173.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  174.         // line 25
  175.         echo "
  176.     <h1 class=\"border-line\">";
  177.         // line 26
  178.         echo (($this->extensions['App\Twig\SeoExtension']->pageHeading()) ? ($this->extensions['App\Twig\SeoExtension']->pageHeading()) : ("Интим карта"));
  179.         echo "</h1>
  180.     <p class=\"mb-lg-4\">
  181.         На карте обозначено местоположение зарегистрированных анкет.
  182.         Кликнув на маркер Вы узнаете краткую информацию о девушке.
  183.     </p>
  184.     <div class=\"map p-2 p-md-3 p-lg-4 mb-3 mb-md-4\">
  185.         <div class=\"d-flex justify-content-center justify-content-md-between mb-2 mb-md-3 mb-lg-4\">
  186.             <button class=\"btn btn-secondary btn-collapse-filter\" type=\"button\" id=\"filter-expand\">
  187.                 <svg class=\"icon mr-1\">
  188.                     <use xlink:href=\"";
  189.         // line 36
  190.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_domain/images/icons/svg-library.svg""nodomainConfig"), "html"nulltrue);
  191.         echo "#icon-dropdown\"></use>
  192.                 </svg>
  193.                 Расширенный поиск
  194.             </button>
  195.             <div class=\"d-flex align-items-center collapse-reset ml-2\">
  196.                 <span class=\"d-none d-md-block\" id=\"count-parameters\">Выбрано <em data-count-parameters>0</em> параметров</span>
  197.                 <button class=\"btn btn-secondary btn-collapse-reset ml-md-2\" id=\"reset-form-2\" data-reset>
  198.                     <svg class=\"icon mr-1\">
  199.                         <use xlink:href=\"";
  200.         // line 44
  201.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets_domain/images/icons/svg-library.svg""nodomainConfig"), "html"nulltrue);
  202.         echo "#icon-reset\"></use>
  203.                     </svg>
  204.                     Сброс
  205.                 </button>
  206.             </div>
  207.         </div>
  208.         <div class=\"collapse\" id=\"collapseFilter\">
  209.             ";
  210.         // line 52
  211.         echo "                ";
  212.         // line 159
  213.         echo "            ";
  214.         // line 160
  215.         echo "        </div>
  216.         <div class=\"map-wrap loading\" id=\"map-wrap\">
  217.             <img src=\"";
  218.         // line 163
  219.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/preloader.svg""basicConfig"), "html"nulltrue);
  220.         echo "\" class=\"preloader\" id=\"preloader\" style=\"display: none;\" />
  221.             <div class=\"map\" id=\"map\" style=\"width: 100%; height: 700px;\"
  222.                 data-icon-single=\"islands#redIcon\"
  223.                 data-icon-saloon=\"islands#violetIcon\"
  224.                 data-icon-cluster=\"islands#invertedRedClusterIcons\"
  225.             ></div>
  226.         </div>
  227.     </div>
  228. \t";
  229.         // line 172
  230.         echo twig_include($this->env$context"components/seo_text.html.twig", ["type" => "top""noindex" => true]);
  231.         echo "
  232. \t";
  233.         // line 173
  234.         echo twig_include($this->env$context"components/seo_text.html.twig", ["type" => "bottom""noindex" => true]);
  235.         echo "
  236. ";
  237.         
  238.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  239.         
  240.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  241.         
  242.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  243.     }
  244.     // line 177
  245.     public function block_javascripts($context, array $blocks = [])
  246.     {
  247.         $macros $this->macros;
  248.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  249.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  250.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  251.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  252.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  253.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  254.         // line 178
  255.         echo "    ";
  256.         $this->displayParentBlock("javascripts"$context$blocks);
  257.         echo "
  258.     ";
  259.         // line 180
  260.         if ((array_key_exists("city"$context) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'180$this->source); })()), "mapCoordinate", [], "any"falsefalsefalse180), "latitude", [], "any"falsefalsefalse180))) {
  261.             // line 181
  262.             echo "\t\t";
  263.             $context["lat"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'181$this->source); })()), "mapCoordinate", [], "any"falsefalsefalse181), "latitude", [], "any"falsefalsefalse181);
  264.             // line 182
  265.             echo "\t\t";
  266.             $context["lon"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'182$this->source); })()), "mapCoordinate", [], "any"falsefalsefalse182), "longitude", [], "any"falsefalsefalse182);
  267.             // line 183
  268.             echo "\t";
  269.         } else {
  270.             // line 184
  271.             echo "\t\t";
  272.             $context["lat"] = "55.753215";
  273.             // line 185
  274.             echo "\t\t";
  275.             $context["lon"] = "37.622504";
  276.             // line 186
  277.             echo "\t";
  278.         }
  279.         // line 187
  280.         echo "
  281.     <script src=\"";
  282.         // line 188
  283.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/fosjsrouting/js/router.min.js"), "html"nulltrue);
  284.         echo "\"></script>
  285.     <script src=\"";
  286.         // line 189
  287.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fos_js_routing_js", ["callback" => "fos.Router.setData"]);
  288.         echo "\"></script>
  289. \t<script src=\"https://api-maps.yandex.ru/2.1/?lang=ru_RU&onload=initMap&ns=ym\" defer></script>
  290. \t<script>
  291.         window.mapConfig = {
  292. \t\t\tid: \"map-wrap\",
  293. \t\t\tmultiple_cities:\"";
  294.         // line 195
  295.         echo twig_escape_filter($this->env, (isset($context["multipleCities"]) || array_key_exists("multipleCities"$context) ? $context["multipleCities"] : (function () { throw new RuntimeError('Variable "multipleCities" does not exist.'195$this->source); })()), "html"nulltrue);
  296.         echo "\",
  297. \t\t\troutes_url: \"";
  298.         // line 196
  299.         echo ((((isset($context["multipleCities"]) || array_key_exists("multipleCities"$context) ? $context["multipleCities"] : (function () { throw new RuntimeError('Variable "multipleCities" does not exist.'196$this->source); })()) == 0)) ? ("/js/fos_js_routes.json") : ("/js/fos_js_routes_city_prefixed.json"));
  300.         echo "\",
  301. \t\t\tcity_uri_identity:\"";
  302.         // line 197
  303.         echo twig_escape_filter($this->env, (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'197$this->source); })()), "html"nulltrue);
  304.         echo "\",
  305. \t\t\tcity_latitude:\"";
  306.         // line 198
  307.         echo twig_escape_filter($this->env, (isset($context["lat"]) || array_key_exists("lat"$context) ? $context["lat"] : (function () { throw new RuntimeError('Variable "lat" does not exist.'198$this->source); })()), "html"nulltrue);
  308.         echo "\",
  309. \t\t\tcity_longitude:\"";
  310.         // line 199
  311.         echo twig_escape_filter($this->env, (isset($context["lon"]) || array_key_exists("lon"$context) ? $context["lon"] : (function () { throw new RuntimeError('Variable "lon" does not exist.'199$this->source); })()), "html"nulltrue);
  312.         echo "\",
  313. \t\t\tlocale:\"";
  314.         // line 200
  315.         echo twig_escape_filter($this->envtwig_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.'200$this->source); })()), "request", [], "any"falsefalsefalse200), "locale", [], "any"falsefalsefalse200), "html"nulltrue);
  316.         echo "\",
  317. \t\t\tpath:\"";
  318.         // line 201
  319.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("map.filter", ["city" => (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'201$this->source); })())]), "html"nulltrue);
  320.         echo "\",
  321. \t\t\tdetail: \"";
  322.         // line 202
  323.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("map.detail", ["city" => (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'202$this->source); })())]), "html"nulltrue);
  324.         echo "\",
  325. \t\t\tavatar_path : \"";
  326.         // line 204
  327.         echo twig_escape_filter($this->env$this->extensions['App\Twig\ResponsiveAssetExtension']->getResponsiveImageUrl("replace_path""profile_media_avatar""200x280""jpg"), "html"nulltrue);
  328.         echo "\",
  329. \t\t\tphoto_path : \"";
  330.         // line 205
  331.         echo twig_escape_filter($this->env$this->extensions['App\Twig\ResponsiveAssetExtension']->getResponsiveImageUrl("replace_path""profile_media""200x280""jpg"), "html"nulltrue);
  332.         echo "\",
  333. \t\t\tthumb_path : \"";
  334.         // line 206
  335.         echo twig_escape_filter($this->env$this->extensions['App\Twig\ResponsiveAssetExtension']->getResponsiveImageUrl("replace_path""saloon_media_thumb""200x280""jpg"), "html"nulltrue);
  336.         echo "\",
  337. \t\t\tprocess_profile_shows_url  : \"";
  338.         // line 207
  339.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("map.increment_profile_shows", (((isset($context["multipleCities"]) || array_key_exists("multipleCities"$context) ? $context["multipleCities"] : (function () { throw new RuntimeError('Variable "multipleCities" does not exist.'207$this->source); })())) ? (["city" => (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'207$this->source); })())]) : ([]))), "html"nulltrue);
  340.         echo "\"
  341. \t\t};
  342. \t\twindow.isMapInitialized = false;
  343. \t\twindow.isYMapLoaded = false;
  344.         function initMap() {
  345. \t\t\twindow.ymaps = ym;
  346. \t\t\twindow.isMapInitialized = true;
  347. \t\t\twindow.isYMapLoaded = true;
  348. \t\t}
  349. \t\twindow.profileShowed = function ({id}) {
  350. \t\t\tif (!id) return;
  351. \t\t\tfetch('";
  352.         // line 222
  353.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_ctr.increase_shows");
  354.         echo "', {
  355. \t\t\t\tmethod: \"POST\",
  356. \t\t\t\tbody: JSON.stringify({ profiles: [id], source: 'map' }),
  357. \t\t\t});
  358. \t\t}
  359.         window.stations = {";
  360.         // line 229
  361.         $context['_parent'] = $context;
  362.         $context['_seq'] = twig_ensure_traversable($this->extensions['App\Twig\StationsExtension']->stations());
  363.         $context['loop'] = [
  364.           'parent' => $context['_parent'],
  365.           'index0' => 0,
  366.           'index'  => 1,
  367.           'first'  => true,
  368.         ];
  369.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  370.             $length count($context['_seq']);
  371.             $context['loop']['revindex0'] = $length 1;
  372.             $context['loop']['revindex'] = $length;
  373.             $context['loop']['length'] = $length;
  374.             $context['loop']['last'] = === $length;
  375.         }
  376.         foreach ($context['_seq'] as $context["_key"] => $context["station"]) {
  377.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["station"], "id", [], "any"falsefalsefalse229), "html"nulltrue);
  378.             echo ":{icon:`";
  379.             $this->loadTemplate("components/metro/icon_generate.partial.twig""Map/page.html.twig"229)->display(twig_array_merge($context, ["data" => $this->extensions['App\Twig\StationsExtension']->stationLines($context["station"])]));
  380.             echo "`,name:`";
  381.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["station"], "name", [], "any"falsefalsefalse229), "html"nulltrue);
  382.             echo "`},";
  383.             ++$context['loop']['index0'];
  384.             ++$context['loop']['index'];
  385.             $context['loop']['first'] = false;
  386.             if (isset($context['loop']['length'])) {
  387.                 --$context['loop']['revindex0'];
  388.                 --$context['loop']['revindex'];
  389.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  390.             }
  391.         }
  392.         $_parent $context['_parent'];
  393.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['station'], $context['_parent'], $context['loop']);
  394.         $context array_intersect_key($context$_parent) + $_parent;
  395.         // line 230
  396.         echo "};
  397.         document.addEventListener('DOMContentLoaded', function () {
  398. \t\t\tfunction loadForm() {
  399. \t\t\t\tfetch('";
  400.         // line 234
  401.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("map.form", ["city" => (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'234$this->source); })())]), "html"nulltrue);
  402.         echo "', {
  403. \t\t\t\t\tmode: \"cors\",
  404. \t\t\t\t\timportance: \"low\",
  405. \t\t\t\t\tmethod: \"POST\",
  406. \t\t\t\t\theaders: {
  407. \t\t\t\t\t\t\"Content-Type\": \"application/x-www-form-urlencoded\",
  408. \t\t\t\t\t\t\"X-Requested-With\": \"XMLHttpRequest\"
  409. \t\t\t\t\t},
  410. \t\t\t\t}).then(response => {
  411. \t\t\t\t\tif (response.status < 300) {
  412. \t\t\t\t\t\treturn response.text();
  413. \t\t\t\t\t} else {
  414. \t\t\t\t\t\tconsole.warn(\"🤔\");
  415. \t\t\t\t\t\treturn null;
  416. \t\t\t\t\t}
  417. \t\t\t\t}).then(response => {
  418. \t\t\t\t\tdocument.getElementById('collapseFilter').innerHTML = response;
  419. \t\t\t\t\tdocument.dispatchEvent(new Event('form-html-load'));
  420. \t\t\t\t\tfilterLoader()
  421. \t\t\t\t});
  422. \t\t\t}
  423. \t\t\tloadForm();
  424. \t\t\tfunction filterLoader() {
  425. \t\t\t\tconst stringifyData = `{\"city_id\":\"\${document.getElementById('filter_map_form_city_id').value}\",\"_token\":\"\${document.getElementById('filter_map_form__token').value}\",\"scale\":10}`;
  426. \t\t\t\tfetch(\"";
  427.         // line 260
  428.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("map.filter", ["city" => (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'260$this->source); })())]), "html"nulltrue);
  429.         echo "\", {
  430. \t\t\t\t\tmethod: \"POST\",
  431. \t\t\t\t\theaders: {
  432. \t\t\t\t\t\t'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  433. \t\t\t\t\t\t'X-Requested-With': 'XMLHttpRequest',
  434. \t\t\t\t\t},
  435. \t\t\t\t\tbody: new URLSearchParams({ form: stringifyData, scale: 12 }).toString(),
  436. \t\t\t\t})
  437. \t\t\t\t.then(response => response.json())
  438. \t\t\t\t.then(data => {
  439. \t\t\t\t\t//console.log('map-data-loaded')
  440. \t\t\t\t\tconst mapLoadedInterval = setInterval(()=>{
  441. \t\t\t\t\t\tif (window.isYMapLoaded) {
  442. \t\t\t\t\t\t\tdocument.dispatchEvent(new CustomEvent('map:data:loaded', { detail: { data, stringifyData, mapConfig: window.mapConfig } }));
  443. \t\t\t\t\t\t\tclearInterval(mapLoadedInterval)
  444. \t\t\t\t\t\t}
  445. \t\t\t\t\t}, 200)
  446. \t\t\t\t})
  447. \t\t\t\t.catch(error => console.error(error));
  448. \t\t\t}
  449. \t\t})
  450. \t</script>
  451.     ";
  452.         // line 284
  453.         echo $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackScriptTags("scripts/map-page"null"basicConfig");
  454.         echo "
  455. ";
  456.         
  457.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  458.         
  459.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  460.         
  461.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  462.     }
  463.     /**
  464.      * @codeCoverageIgnore
  465.      */
  466.     public function getTemplateName()
  467.     {
  468.         return "Map/page.html.twig";
  469.     }
  470.     /**
  471.      * @codeCoverageIgnore
  472.      */
  473.     public function isTraitable()
  474.     {
  475.         return false;
  476.     }
  477.     /**
  478.      * @codeCoverageIgnore
  479.      */
  480.     public function getDebugInfo()
  481.     {
  482.         return array (  528 => 284,  501 => 260,  472 => 234,  466 => 230,  431 => 229,  422 => 222,  404 => 207,  400 => 206,  396 => 205,  392 => 204,  387 => 202,  383 => 201,  379 => 200,  375 => 199,  371 => 198,  367 => 197,  363 => 196,  359 => 195,  350 => 189,  346 => 188,  343 => 187,  340 => 186,  337 => 185,  334 => 184,  331 => 183,  328 => 182,  325 => 181,  323 => 180,  317 => 178,  304 => 177,  289 => 173,  285 => 172,  273 => 163,  268 => 160,  266 => 159,  264 => 52,  254 => 44,  243 => 36,  230 => 26,  227 => 25,  214 => 24,  189 => 22,  171 => 17,  158 => 16,  141 => 12,  128 => 11,  112 => 8,  99 => 7,  83 => 4,  70 => 3,  41 => 1,);
  483.     }
  484.     public function getSourceContext()
  485.     {
  486.         return new Source("{% extends 'grid.html.twig' %}
  487. {% block title %}
  488.     {{ seo_title() }}
  489. {% endblock %}
  490. {% block metaDescription %}
  491.     <meta name=\"description\" content=\"{{ seo_description() }}\">
  492. {% endblock %}
  493. {% block stylesheet %}
  494.     {{ parent() }}
  495.     <link rel=\"stylesheet\" href=\"//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css\">
  496. {% endblock %}
  497. {% block preconnect %}
  498. \t{{ parent() }}
  499. \t<link rel=\"preconnect\" href=\"https://yastatic.net\">
  500. \t<link rel=\"preconnect\" href=\"https://api-maps.yandex.ru\">
  501. {% endblock %}
  502. {% block name_page %}map{% endblock %}
  503. {% block mainContainer %}
  504.     <h1 class=\"border-line\">{{ seo_heading() ? seo_heading() : 'Интим карта' }}</h1>
  505.     <p class=\"mb-lg-4\">
  506.         На карте обозначено местоположение зарегистрированных анкет.
  507.         Кликнув на маркер Вы узнаете краткую информацию о девушке.
  508.     </p>
  509.     <div class=\"map p-2 p-md-3 p-lg-4 mb-3 mb-md-4\">
  510.         <div class=\"d-flex justify-content-center justify-content-md-between mb-2 mb-md-3 mb-lg-4\">
  511.             <button class=\"btn btn-secondary btn-collapse-filter\" type=\"button\" id=\"filter-expand\">
  512.                 <svg class=\"icon mr-1\">
  513.                     <use xlink:href=\"{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-dropdown\"></use>
  514.                 </svg>
  515.                 Расширенный поиск
  516.             </button>
  517.             <div class=\"d-flex align-items-center collapse-reset ml-2\">
  518.                 <span class=\"d-none d-md-block\" id=\"count-parameters\">Выбрано <em data-count-parameters>0</em> параметров</span>
  519.                 <button class=\"btn btn-secondary btn-collapse-reset ml-md-2\" id=\"reset-form-2\" data-reset>
  520.                     <svg class=\"icon mr-1\">
  521.                         <use xlink:href=\"{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-reset\"></use>
  522.                     </svg>
  523.                     Сброс
  524.                 </button>
  525.             </div>
  526.         </div>
  527.         <div class=\"collapse\" id=\"collapseFilter\">
  528.             {# <div class=\"mb-3 mb-lg-4\"> #}
  529.                 {# {{ form_start(form) }}
  530.                 <div class=\"pl-2 pr-2 pl-xs-0 pr-xs-0\">
  531.                     <div class=\"filter-form d-md-flex\">
  532.                         <div class=\"form-items d-xxl-flex\">
  533.                             <div class=\"form-item min-input\">
  534.                                 <div class=\"mb-3 mb-md-5\">
  535.                                     <div class=\"title mb-3\">Основные параметры</div>
  536.                                     <div class=\"d-flex align-items-center mb-2\">
  537.                                         <label>Возраст:</label>
  538.                                         {{ form_widget(form.age.min, {'attr': {'size': '3', 'type': 'text', 'placeholder': 'от'}}) }}
  539.                                         <span class=\"mr-1 ml-1\">-</span>
  540.                                         {{ form_widget(form.age.max, {'attr': {'size': '3', 'type': 'text', 'placeholder': 'до'}}) }}
  541.                                     </div>
  542.                                     <div class=\"d-flex align-items-center mb-2\">
  543.                                         <label>Размер груди:</label>
  544.                                         {{ form_widget(form.breast_size.min, {'attr': {'size': '3', 'type': 'text', 'placeholder': 'от'}}) }}
  545.                                         <span class=\"mr-1 ml-1\">-</span>
  546.                                         {{ form_widget(form.breast_size.max, {'attr': {'size': '3', 'type': 'text', 'placeholder': 'до'}}) }}
  547.                                     </div>
  548.                                     <div class=\"d-flex align-items-center mb-2\">
  549.                                         <label>Рост:</label>
  550.                                         {{ form_widget(form.height.min, {'attr': {'size': '3', 'type': 'text', 'placeholder': 'от'}}) }}
  551.                                         <span class=\"mr-1 ml-1\">-</span>
  552.                                         {{ form_widget(form.height.max, {'attr': {'size': '3', 'type': 'text', 'placeholder': 'до'}}) }}
  553.                                     </div>
  554.                                     <div class=\"d-flex align-items-center mb-2\">
  555.                                         <label>Вес:</label>
  556.                                         {{ form_widget(form.weight.min, {'attr': {'size': '3', 'type': 'text', 'placeholder': 'от'}}) }}
  557.                                         <span class=\"mr-1 ml-1\">-</span>
  558.                                         {{ form_widget(form.weight.max, {'attr': {'size': '3', 'type': 'text', 'placeholder': 'до'}}) }}
  559.                                     </div>
  560.                                 </div>
  561.                                 <div class=\"mb-3 mb-md-5 inline-label\">
  562.                                     <div class=\"title mb-3\">Интимная стрижка</div>
  563.                                     <div class=\"d-flex align-items-center mb-2\">
  564.                                         <div id=\"filter_map_form_private_haircut\" size=\"3\">
  565.                                             {% for elem in form.private_haircut %}
  566.                                                 {{form_widget(elem, {'attr': {
  567.                                                     'class': 'item'
  568.                                                 }}) }}
  569.                                                 <label for=\"{{elem.vars.id}}\">{{elem.vars.label|trans({}, 'left_menu')}}</label>
  570.                                             {% endfor %}
  571.                                         </div>
  572.                                     </div>
  573.                                 </div>
  574.                             </div>
  575.                             <div class=\"form-item ml-xxl-4\">
  576.                                 <div class=\"mb-3 mb-md-5 inline-label\">
  577.                                     <div class=\"title mb-3\">Цвет волос</div>
  578.                                     <div class=\"d-flex flex-wrap align-items-center mb-2\">
  579.                                         <div id=\"filter_map_form_hair_color\" size=\"3\">
  580.                                             {% for elem in form.hair_color %}
  581.                                                 {{form_widget(elem, {'attr': {
  582.                                                     'class': 'item'
  583.                                                 }}) }}
  584.                                                 <label for=\"{{elem.vars.id}}\">{{elem.vars.label|trans({}, 'left_menu')}}</label>
  585.                                             {% endfor %}
  586.                                         </div>
  587.                                     </div>
  588.                                 </div>
  589.                                 <div class=\"mb-3 mb-md-5 inline-label\">
  590.                                     <div class=\"title mb-3\">Телосложение</div>
  591.                                     <div class=\"d-flex flex-wrap align-items-center mb-2\">
  592.                                         <div id=\"filter_map_form_body_type\">
  593.                                             {% for elem in form.body_type %}
  594.                                                 {{form_widget(elem, {'attr': {
  595.                                                     'class': 'item'
  596.                                                 }}) }}
  597.                                                 <label for=\"{{elem.vars.id}}\">{{elem.vars.label|trans({}, 'left_menu')}}</label>
  598.                                             {% endfor %}
  599.                                         </div>
  600.                                     </div>
  601.                                 </div>
  602.                             </div>
  603.                         </div>
  604.                         <div class=\"form-items pl-0 pl-md-4\">
  605.                             <div class=\"form-item ml-xl-4\">
  606.                                 <div class=\"mb-3 mb-md-5 inline-label\">
  607.                                     <div class=\"title mb-3\">Национальность</div>
  608.                                     <div class=\"d-flex align-items-center mb-2\">
  609.                                         <div id=\"filter_map_form_nationality\">
  610.                                             {% for elem in form.nationality %}
  611.                                                 {{form_widget(elem, {'attr': {
  612.                                                     'class': 'item'
  613.                                                 }}) }}
  614.                                                 <label for=\"{{elem.vars.id}}\">{{elem.vars.label|trans({}, 'left_menu')}}</label>
  615.                                             {% endfor %}
  616.                                         </div>
  617.                                     </div>
  618.                                 </div>
  619.                             </div>
  620.                         </div>
  621.                     </div>
  622.                     <div class=\"form-line mb-2 mb-md-4\"></div>
  623.                     <div class=\"d-flex justify-content-center\">
  624.                         <button type=\"reset\" class=\"btn btn-secondary btn-collapse-reset mr-2\" id=\"reset-form\">
  625.                             <svg class=\"icon mr-1\">
  626.                                 <use xlink:href=\"{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-reset\"></use>
  627.                             </svg>
  628.                             Сброс
  629.                         </button>
  630.                         {{ form_widget(form.search, {'label': 'Подобрать', 'attr': {
  631.                             'class': 'btn btn-danger'
  632.                         }}) }}
  633.                     </div>
  634.                 </div>
  635.                 {{ form_end(form) }} #}
  636.             {# </div> #}
  637.         </div>
  638.         <div class=\"map-wrap loading\" id=\"map-wrap\">
  639.             <img src=\"{{ asset('assets/images/preloader.svg','basicConfig') }}\" class=\"preloader\" id=\"preloader\" style=\"display: none;\" />
  640.             <div class=\"map\" id=\"map\" style=\"width: 100%; height: 700px;\"
  641.                 data-icon-single=\"islands#redIcon\"
  642.                 data-icon-saloon=\"islands#violetIcon\"
  643.                 data-icon-cluster=\"islands#invertedRedClusterIcons\"
  644.             ></div>
  645.         </div>
  646.     </div>
  647. \t{{ include('components/seo_text.html.twig', { \"type\": 'top', \"noindex\": true }) }}
  648. \t{{ include('components/seo_text.html.twig', { \"type\": 'bottom', \"noindex\": true }) }}
  649. {% endblock %}
  650. {% block javascripts %}
  651.     {{ parent() }}
  652.     {% if city is defined and city.mapCoordinate.latitude %}
  653. \t\t{% set lat = city.mapCoordinate.latitude %}
  654. \t\t{% set lon = city.mapCoordinate.longitude %}
  655. \t{% else %}
  656. \t\t{% set lat = '55.753215' %}
  657. \t\t{% set lon = '37.622504' %}
  658. \t{% endif %}
  659.     <script src=\"{{ asset('bundles/fosjsrouting/js/router.min.js') }}\"></script>
  660.     <script src=\"{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}\"></script>
  661. \t<script src=\"https://api-maps.yandex.ru/2.1/?lang=ru_RU&onload=initMap&ns=ym\" defer></script>
  662. \t<script>
  663.         window.mapConfig = {
  664. \t\t\tid: \"map-wrap\",
  665. \t\t\tmultiple_cities:\"{{ multipleCities }}\",
  666. \t\t\troutes_url: \"{{ multipleCities == 0 ? '/js/fos_js_routes.json' : '/js/fos_js_routes_city_prefixed.json' }}\",
  667. \t\t\tcity_uri_identity:\"{{ cityUriIdentity }}\",
  668. \t\t\tcity_latitude:\"{{ lat }}\",
  669. \t\t\tcity_longitude:\"{{ lon }}\",
  670. \t\t\tlocale:\"{{ app.request.locale }}\",
  671. \t\t\tpath:\"{{ path('map.filter', {city:cityUriIdentity}) }}\",
  672. \t\t\tdetail: \"{{ path('map.detail', {city:cityUriIdentity}) }}\",
  673. \t\t\tavatar_path : \"{{ responsive_asset('replace_path', 'profile_media_avatar', \"200x280\", \"jpg\") }}\",
  674. \t\t\tphoto_path : \"{{ responsive_asset('replace_path', 'profile_media', \"200x280\", \"jpg\") }}\",
  675. \t\t\tthumb_path : \"{{ responsive_asset('replace_path', 'saloon_media_thumb', \"200x280\", \"jpg\") }}\",
  676. \t\t\tprocess_profile_shows_url  : \"{{ path('map.increment_profile_shows', multipleCities ? {city:cityUriIdentity} : {}) }}\"
  677. \t\t};
  678. \t\twindow.isMapInitialized = false;
  679. \t\twindow.isYMapLoaded = false;
  680.         function initMap() {
  681. \t\t\twindow.ymaps = ym;
  682. \t\t\twindow.isMapInitialized = true;
  683. \t\t\twindow.isYMapLoaded = true;
  684. \t\t}
  685. \t\twindow.profileShowed = function ({id}) {
  686. \t\t\tif (!id) return;
  687. \t\t\tfetch('{{ path('profile_ctr.increase_shows') }}', {
  688. \t\t\t\tmethod: \"POST\",
  689. \t\t\t\tbody: JSON.stringify({ profiles: [id], source: 'map' }),
  690. \t\t\t});
  691. \t\t}
  692.         window.stations = {
  693. \t\t\t{%- for station in stations() -%}{{- station.id -}}:{icon:`{%- include 'components/metro/icon_generate.partial.twig' with {data: station|station_lines} -%}`,name:`{{- station.name -}}`},{%- endfor -%}
  694. \t\t};
  695.         document.addEventListener('DOMContentLoaded', function () {
  696. \t\t\tfunction loadForm() {
  697. \t\t\t\tfetch('{{ path('map.form', {city: cityUriIdentity}) }}', {
  698. \t\t\t\t\tmode: \"cors\",
  699. \t\t\t\t\timportance: \"low\",
  700. \t\t\t\t\tmethod: \"POST\",
  701. \t\t\t\t\theaders: {
  702. \t\t\t\t\t\t\"Content-Type\": \"application/x-www-form-urlencoded\",
  703. \t\t\t\t\t\t\"X-Requested-With\": \"XMLHttpRequest\"
  704. \t\t\t\t\t},
  705. \t\t\t\t}).then(response => {
  706. \t\t\t\t\tif (response.status < 300) {
  707. \t\t\t\t\t\treturn response.text();
  708. \t\t\t\t\t} else {
  709. \t\t\t\t\t\tconsole.warn(\"🤔\");
  710. \t\t\t\t\t\treturn null;
  711. \t\t\t\t\t}
  712. \t\t\t\t}).then(response => {
  713. \t\t\t\t\tdocument.getElementById('collapseFilter').innerHTML = response;
  714. \t\t\t\t\tdocument.dispatchEvent(new Event('form-html-load'));
  715. \t\t\t\t\tfilterLoader()
  716. \t\t\t\t});
  717. \t\t\t}
  718. \t\t\tloadForm();
  719. \t\t\tfunction filterLoader() {
  720. \t\t\t\tconst stringifyData = `{\"city_id\":\"\${document.getElementById('filter_map_form_city_id').value}\",\"_token\":\"\${document.getElementById('filter_map_form__token').value}\",\"scale\":10}`;
  721. \t\t\t\tfetch(\"{{ path('map.filter', {city:cityUriIdentity}) }}\", {
  722. \t\t\t\t\tmethod: \"POST\",
  723. \t\t\t\t\theaders: {
  724. \t\t\t\t\t\t'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  725. \t\t\t\t\t\t'X-Requested-With': 'XMLHttpRequest',
  726. \t\t\t\t\t},
  727. \t\t\t\t\tbody: new URLSearchParams({ form: stringifyData, scale: 12 }).toString(),
  728. \t\t\t\t})
  729. \t\t\t\t.then(response => response.json())
  730. \t\t\t\t.then(data => {
  731. \t\t\t\t\t//console.log('map-data-loaded')
  732. \t\t\t\t\tconst mapLoadedInterval = setInterval(()=>{
  733. \t\t\t\t\t\tif (window.isYMapLoaded) {
  734. \t\t\t\t\t\t\tdocument.dispatchEvent(new CustomEvent('map:data:loaded', { detail: { data, stringifyData, mapConfig: window.mapConfig } }));
  735. \t\t\t\t\t\t\tclearInterval(mapLoadedInterval)
  736. \t\t\t\t\t\t}
  737. \t\t\t\t\t}, 200)
  738. \t\t\t\t})
  739. \t\t\t\t.catch(error => console.error(error));
  740. \t\t\t}
  741. \t\t})
  742. \t</script>
  743.     {{ encore_entry_script_tags('scripts/map-page', null, 'basicConfig') }}
  744. {% endblock %}
  745. ""Map/page.html.twig""/app/templates/Map/page.html.twig");
  746.     }
  747. }