<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Map/page.html.twig */
class __TwigTemplate_a28a045d3be3f3299f645cdfe29370c8 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'preconnect' => [$this, 'block_preconnect'],
'wrapper_class' => [$this, 'block_wrapper_class'],
'mainContainer' => [$this, 'block_mainContainer'],
'javascripts' => [$this, 'block_javascripts'],
'modal' => [$this, 'block_modal'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "__design/v2023/grid-map.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Map/page.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Map/page.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Map/page.html.twig"));
$this->parent = $this->loadTemplate("__design/v2023/grid-map.html.twig", "Map/page.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_preconnect($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "preconnect"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "preconnect"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "preconnect"));
// line 4
echo "\t";
$this->displayParentBlock("preconnect", $context, $blocks);
echo "
\t<link rel=\"preconnect\" href=\"https://yastatic.net\">
\t<link rel=\"preconnect\" href=\"https://api-maps.yandex.ru\">
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
// line 11
public function block_wrapper_class($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "wrapper_class"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "wrapper_class"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "wrapper_class"));
echo " wrapper--map";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
// line 13
public function block_mainContainer($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
// line 14
echo "
\t";
// line 16
echo "
\t<h1 class=\"d-none\">";
// line 17
echo (($this->extensions['App\Twig\SeoExtension']->pageHeading()) ? ($this->extensions['App\Twig\SeoExtension']->pageHeading()) : ("Интим карта"));
echo "</h1>
\t<div class=\"map-page content\">
\t\t<div class=\"map-heading container\">
\t\t\t<button class=\"map-back btn btn-transparent\" type=\"button\" onclick=\"history.back()\">
\t\t\t\t<svg class=\"btn-icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"#2C2C2C\" d=\"m17.83 20.13-1.77 1.77-9.9-9.9 9.9-9.9 1.77 1.77L9.7 12l8.13 8.13Z\"/></svg>
\t\t\t\t<span class=\"btn-text\">Назад</span>
\t\t\t</button>
\t\t\t<button class=\"map-btn btn btn-grey\" type=\"button\" data-a11y-dialog-show=\"filter-dialog\">
\t\t\t\t<svg class=\"btn-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><path d=\"M7.5 4.165a.833.833 0 1 0 0 1.666.833.833 0 0 0 0-1.666Zm-2.358 0a2.5 2.5 0 0 1 4.717 0h5.975a.833.833 0 1 1 0 1.666H9.859a2.5 2.5 0 0 1-4.717 0h-.975a.833.833 0 1 1 0-1.666h.975Zm7.359 5a.833.833 0 1 0 0 1.666.833.833 0 0 0 0-1.666Zm-2.359 0a2.501 2.501 0 0 1 4.717 0h.975a.833.833 0 1 1 0 1.667h-.975a2.502 2.502 0 0 1-4.717 0H4.167a.833.833 0 1 1 0-1.667h5.975Zm-2.641 5a.833.833 0 1 0 0 1.666.833.833 0 0 0 0-1.666Zm-2.359 0a2.5 2.5 0 0 1 4.717 0h5.975a.833.833 0 1 1 0 1.667H9.859a2.501 2.501 0 0 1-4.717 0h-.975a.833.833 0 1 1 0-1.667h.975Z\"/></svg>
\t\t\t\t<span class=\"btn-text\">Фильтры</span>
\t\t\t</button>
\t\t</div>
\t\t<div class=\"map-wrap skeleton skeleton--map loading\" id=\"map-wrap\"></div>
\t</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
// line 35
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 36
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
\t";
// line 39
if ((array_key_exists("city", $context) && twig_get_attribute($this->env, $this->source, twig_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.', 39, $this->source); })()), "mapCoordinate", [], "any", false, false, false, 39), "latitude", [], "any", false, false, false, 39))) {
// line 40
echo "\t\t";
$context["lat"] = twig_get_attribute($this->env, $this->source, twig_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.', 40, $this->source); })()), "mapCoordinate", [], "any", false, false, false, 40), "latitude", [], "any", false, false, false, 40);
// line 41
echo "\t\t";
$context["lon"] = twig_get_attribute($this->env, $this->source, twig_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.', 41, $this->source); })()), "mapCoordinate", [], "any", false, false, false, 41), "longitude", [], "any", false, false, false, 41);
// line 42
echo "\t";
} else {
// line 43
echo "\t\t";
$context["lat"] = "55.753215";
// line 44
echo "\t\t";
$context["lon"] = "37.622504";
// line 45
echo "\t";
}
// line 46
echo "
\t<script src=\"";
// line 47
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/fosjsrouting/js/router.min.js"), "html", null, true);
echo "\" defer></script>
\t<script src=\"";
// line 48
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fos_js_routing_js", ["callback" => "fos.Router.setData"]);
echo "\" defer></script>
\t<script src=\"https://api-maps.yandex.ru/2.1/?lang=ru_RU&onload=initMap&ns=ym\" defer></script>
\t<script>
\t\tconst mapConfig = {
\t\t\tid:\"map-wrap\",
\t\t\tmultiple_cities:\"";
// line 54
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.', 54, $this->source); })()), "html", null, true);
echo "\",
\t\t\troutes_url: \"";
// line 55
echo ((((isset($context["multipleCities"]) || array_key_exists("multipleCities", $context) ? $context["multipleCities"] : (function () { throw new RuntimeError('Variable "multipleCities" does not exist.', 55, $this->source); })()) == 0)) ? ("/js/fos_js_routes.json") : ("/js/fos_js_routes_city_prefixed.json"));
echo "\",
\t\t\tcity_uri_identity:\"";
// line 56
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.', 56, $this->source); })()), "html", null, true);
echo "\",
\t\t\tcity_latitude:\"";
// line 57
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.', 57, $this->source); })()), "html", null, true);
echo "\",
\t\t\tcity_longitude:\"";
// line 58
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.', 58, $this->source); })()), "html", null, true);
echo "\",
\t\t\tlocale:\"";
// line 59
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_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.', 59, $this->source); })()), "request", [], "any", false, false, false, 59), "locale", [], "any", false, false, false, 59), "html", null, true);
echo "\",
\t\t\tpath:\"";
// line 60
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.', 60, $this->source); })())]), "html", null, true);
echo "\",
\t\t\ticon_profile:\"";
// line 62
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/profile.svg"), "html", null, true);
echo "\",
\t\t\ticon_profile_active:\"";
// line 63
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/profile-active.svg"), "html", null, true);
echo "\",
\t\t\ticon_profile_hover:\"";
// line 64
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/profile-hover.svg"), "html", null, true);
echo "\",
\t\t\ticon_saloon:\"";
// line 66
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/saloon.svg"), "html", null, true);
echo "\",
\t\t\ticon_saloon_active:\"";
// line 67
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/saloon-active.svg"), "html", null, true);
echo "\",
\t\t\ticon_saloon_hover:\"";
// line 68
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/saloon-hover.svg"), "html", null, true);
echo "\",
\t\t\ticon_masseur:\"";
// line 70
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/masseur.svg"), "html", null, true);
echo "\",
\t\t\ticon_masseur_active:\"";
// line 71
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/masseur-active.svg"), "html", null, true);
echo "\",
\t\t\ticon_masseur_hover:\"";
// line 72
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/masseur-hover.svg"), "html", null, true);
echo "\",
\t\t\ticon_cluster_small:\"";
// line 74
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/cluster-small.svg"), "html", null, true);
echo "\",
\t\t\ticon_cluster_medium:\"";
// line 75
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/cluster-medium.svg"), "html", null, true);
echo "\",
\t\t\ticon_cluster_big:\"";
// line 76
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/cluster-big.svg"), "html", null, true);
echo "\",
\t\t\tavatar_path : \"";
// line 78
echo twig_escape_filter($this->env, $this->extensions['App\Twig\ResponsiveAssetExtension']->getResponsiveImageUrl("replace_path", "profile_media_avatar", "200x280", "jpg"), "html", null, true);
echo "\",
\t\t\tphoto_path : \"";
// line 79
echo twig_escape_filter($this->env, $this->extensions['App\Twig\ResponsiveAssetExtension']->getResponsiveImageUrl("replace_path", "profile_media", "200x280", "jpg"), "html", null, true);
echo "\",
\t\t\tthumb_path : \"";
// line 80
echo twig_escape_filter($this->env, $this->extensions['App\Twig\ResponsiveAssetExtension']->getResponsiveImageUrl("replace_path", "saloon_media_thumb", "200x280", "jpg"), "html", null, true);
echo "\",
\t\t\tprocess_profile_shows_url : \"";
// line 81
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.', 81, $this->source); })())) ? (["city" => (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity", $context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.', 81, $this->source); })())]) : ([]))), "html", null, true);
echo "\"
\t\t};
\t\tvar isMapInitialized = false;
\t\tvar yaMapLoaded = false;
\t\tfunction initMap() {
\t\t\t//console.log('initMap');
\t\t\twindow.ymap = new ym.Map(document.getElementById('map-wrap'), {
\t\t\t\tcenter: [\"";
// line 89
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.', 89, $this->source); })()), "html", null, true);
echo "\", \"";
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.', 89, $this->source); })()), "html", null, true);
echo "\"],
\t\t\t\tzoom: 8,
\t\t\t\tcontrols: ['zoomControl', 'typeSelector', 'fullscreenControl']
\t\t\t});
\t\t\tyaMapLoaded = true;
\t\t\t//if (!isMapInitialized) {
\t\t\t//\tconsole.log('new mapPage initMap');
\t\t\t//\tisMapInitialized = true;
\t\t\t//\tnew MapPage(mapConfig);
\t\t\t//}
\t\t}
\t\twindow.profileShowed = function ({id}) {
\t\t\tif (!id) return;
\t\t\tfetch('";
// line 104
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_ctr.increase_shows");
echo "', {
\t\t\t\tmethod: \"POST\",
\t\t\t\tbody: JSON.stringify({ profiles: [id], source: 'map' }),
\t\t\t});
\t\t}
\t\twindow.stations = {";
// line 111
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->extensions['App\Twig\StationsExtension']->stations());
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["station"]) {
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["station"], "id", [], "any", false, false, false, 111), "html", null, true);
echo ":{icon:`";
$this->loadTemplate("components/metro/icon_generate.partial.twig", "Map/page.html.twig", 111)->display(twig_array_merge($context, ["data" => $this->extensions['App\Twig\StationsExtension']->stationLines($context["station"])]));
echo "`,name:`";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["station"], "name", [], "any", false, false, false, 111), "html", null, true);
echo "`},";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['station'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 112
echo "};
\t\tdocument.addEventListener('DOMContentLoaded', function () {
\t\t\tfunction loadForm() {
\t\t\t\tfetch('";
// line 115
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.', 115, $this->source); })())]), "html", null, true);
echo "', {
\t\t\t\t\tmode: \"cors\",
\t\t\t\t\timportance: \"low\",
\t\t\t\t\tmethod: \"POST\",
\t\t\t\t\theaders: {
\t\t\t\t\t\t\"Content-Type\": \"application/x-www-form-urlencoded\",
\t\t\t\t\t\t\"X-Requested-With\": \"XMLHttpRequest\"
\t\t\t\t\t},
\t\t\t\t}).then(response => {
\t\t\t\t\tif (response.status < 300) {
\t\t\t\t\t\treturn response.text();
\t\t\t\t\t} else {
\t\t\t\t\t\tconsole.warn(\"🤔\");
\t\t\t\t\t\treturn null;
\t\t\t\t\t}
\t\t\t\t}).then(response => {
\t\t\t\t\tdocument.getElementById('dialog-form').innerHTML = response;
\t\t\t\t\tfilterLoader()
\t\t\t\t});
\t\t\t}
\t\t\tloadForm();
\t\t\tfunction filterLoader() {
\t\t\t\tconst stringifyData = `{\"city_id\":\"\${document.getElementById('filter_map_form_city_id').value}\",\"_token\":\"\${document.getElementById('filter_map_form__token').value}\"}`;
\t\t\t\tfetch(\"";
// line 140
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.', 140, $this->source); })())]), "html", null, true);
echo "\", {
\t\t\t\t\tmethod: \"POST\",
\t\t\t\t\theaders: {
\t\t\t\t\t\t'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
\t\t\t\t\t\t'X-Requested-With': 'XMLHttpRequest',
\t\t\t\t\t},
\t\t\t\t\tbody: new URLSearchParams({ form: stringifyData }).toString(),
\t\t\t\t})
\t\t\t\t\t.then(response => response.json())
\t\t\t\t\t.then(data => {
\t\t\t\t\t\t//console.log('map-data-loaded')
\t\t\t\t\t\tconst mapLoadedInterval = setInterval(()=>{
\t\t\t\t\t\t\tif (yaMapLoaded) {
\t\t\t\t\t\t\t\tnew MapPage(mapConfig);
\t\t\t\t\t\t\t\tdocument.dispatchEvent(new CustomEvent('map:data:loaded', { detail: { data, stringifyData } }));
\t\t\t\t\t\t\t\tclearInterval(mapLoadedInterval)
\t\t\t\t\t\t\t}
\t\t\t\t\t\t}, 200)
\t\t\t\t\t})
\t\t\t\t\t.catch(error => console.error(error));
\t\t\t\t//if (!isMapInitialized) {
\t\t\t\t//\tconsole.log('new mapPage filterLoader');
\t\t\t\t//\tisMapInitialized = true;
\t\t\t\t//\tnew MapPage(mapConfig);
\t\t\t\t//}
\t\t\t}
\t\t})
\t</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
// line 173
public function block_modal($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "modal"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "modal"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "modal"));
// line 174
$this->displayParentBlock("modal", $context, $blocks);
// line 175
echo twig_include($this->env, $context, "__design/v2023/components/modal/filter.html.twig");
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Map/page.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 489 => 175, 487 => 174, 474 => 173, 429 => 140, 401 => 115, 396 => 112, 361 => 111, 352 => 104, 332 => 89, 321 => 81, 317 => 80, 313 => 79, 309 => 78, 304 => 76, 300 => 75, 296 => 74, 291 => 72, 287 => 71, 283 => 70, 278 => 68, 274 => 67, 270 => 66, 265 => 64, 261 => 63, 257 => 62, 252 => 60, 248 => 59, 244 => 58, 240 => 57, 236 => 56, 232 => 55, 228 => 54, 219 => 48, 215 => 47, 212 => 46, 209 => 45, 206 => 44, 203 => 43, 200 => 42, 197 => 41, 194 => 40, 192 => 39, 186 => 36, 173 => 35, 143 => 17, 140 => 16, 137 => 14, 124 => 13, 99 => 11, 81 => 4, 68 => 3, 39 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends '__design/v2023/grid-map.html.twig' %}
{% block preconnect %}
\t{{ parent() }}
\t<link rel=\"preconnect\" href=\"https://yastatic.net\">
\t<link rel=\"preconnect\" href=\"https://api-maps.yandex.ru\">
{% endblock %}
{# {% block stylesheet_postload %}{{ encore_entry_link_tags(\"styles/public-map-page\") }}{{ parent() }} #}
\t{# <link rel=\"stylesheet\" href=\"//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css\">{% endblock %} #}
{% block wrapper_class %} wrapper--map{% endblock %}
{% block mainContainer %}
\t{# {{- knp_menu_render('breadcrumbs', {'template': '__design/v2023/_menu/breadcrumbs.html.twig' }) -}} #}
\t<h1 class=\"d-none\">{{ seo_heading() ? seo_heading() : 'Интим карта' }}</h1>
\t<div class=\"map-page content\">
\t\t<div class=\"map-heading container\">
\t\t\t<button class=\"map-back btn btn-transparent\" type=\"button\" onclick=\"history.back()\">
\t\t\t\t<svg class=\"btn-icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"#2C2C2C\" d=\"m17.83 20.13-1.77 1.77-9.9-9.9 9.9-9.9 1.77 1.77L9.7 12l8.13 8.13Z\"/></svg>
\t\t\t\t<span class=\"btn-text\">Назад</span>
\t\t\t</button>
\t\t\t<button class=\"map-btn btn btn-grey\" type=\"button\" data-a11y-dialog-show=\"filter-dialog\">
\t\t\t\t<svg class=\"btn-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><path d=\"M7.5 4.165a.833.833 0 1 0 0 1.666.833.833 0 0 0 0-1.666Zm-2.358 0a2.5 2.5 0 0 1 4.717 0h5.975a.833.833 0 1 1 0 1.666H9.859a2.5 2.5 0 0 1-4.717 0h-.975a.833.833 0 1 1 0-1.666h.975Zm7.359 5a.833.833 0 1 0 0 1.666.833.833 0 0 0 0-1.666Zm-2.359 0a2.501 2.501 0 0 1 4.717 0h.975a.833.833 0 1 1 0 1.667h-.975a2.502 2.502 0 0 1-4.717 0H4.167a.833.833 0 1 1 0-1.667h5.975Zm-2.641 5a.833.833 0 1 0 0 1.666.833.833 0 0 0 0-1.666Zm-2.359 0a2.5 2.5 0 0 1 4.717 0h5.975a.833.833 0 1 1 0 1.667H9.859a2.501 2.501 0 0 1-4.717 0h-.975a.833.833 0 1 1 0-1.667h.975Z\"/></svg>
\t\t\t\t<span class=\"btn-text\">Фильтры</span>
\t\t\t</button>
\t\t</div>
\t\t<div class=\"map-wrap skeleton skeleton--map loading\" id=\"map-wrap\"></div>
\t</div>
{% endblock %}
{%- block javascripts -%}
\t{{ parent() }}
\t{% if city is defined and city.mapCoordinate.latitude %}
\t\t{% set lat = city.mapCoordinate.latitude %}
\t\t{% set lon = city.mapCoordinate.longitude %}
\t{% else %}
\t\t{% set lat = '55.753215' %}
\t\t{% set lon = '37.622504' %}
\t{% endif %}
\t<script src=\"{{ asset('bundles/fosjsrouting/js/router.min.js') }}\" defer></script>
\t<script src=\"{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}\" defer></script>
\t<script src=\"https://api-maps.yandex.ru/2.1/?lang=ru_RU&onload=initMap&ns=ym\" defer></script>
\t<script>
\t\tconst mapConfig = {
\t\t\tid:\"map-wrap\",
\t\t\tmultiple_cities:\"{{ multipleCities }}\",
\t\t\troutes_url: \"{{ multipleCities == 0 ? '/js/fos_js_routes.json' : '/js/fos_js_routes_city_prefixed.json' }}\",
\t\t\tcity_uri_identity:\"{{ cityUriIdentity }}\",
\t\t\tcity_latitude:\"{{ lat }}\",
\t\t\tcity_longitude:\"{{ lon }}\",
\t\t\tlocale:\"{{ app.request.locale }}\",
\t\t\tpath:\"{{ path('map.filter', {city:cityUriIdentity}) }}\",
\t\t\ticon_profile:\"{{ asset('assets/images/map/profile.svg') }}\",
\t\t\ticon_profile_active:\"{{ asset('assets/images/map/profile-active.svg') }}\",
\t\t\ticon_profile_hover:\"{{ asset('assets/images/map/profile-hover.svg') }}\",
\t\t\ticon_saloon:\"{{ asset('assets/images/map/saloon.svg') }}\",
\t\t\ticon_saloon_active:\"{{ asset('assets/images/map/saloon-active.svg') }}\",
\t\t\ticon_saloon_hover:\"{{ asset('assets/images/map/saloon-hover.svg') }}\",
\t\t\ticon_masseur:\"{{ asset('assets/images/map/masseur.svg') }}\",
\t\t\ticon_masseur_active:\"{{ asset('assets/images/map/masseur-active.svg') }}\",
\t\t\ticon_masseur_hover:\"{{ asset('assets/images/map/masseur-hover.svg') }}\",
\t\t\ticon_cluster_small:\"{{ asset('assets/images/map/cluster-small.svg') }}\",
\t\t\ticon_cluster_medium:\"{{ asset('assets/images/map/cluster-medium.svg') }}\",
\t\t\ticon_cluster_big:\"{{ asset('assets/images/map/cluster-big.svg') }}\",
\t\t\tavatar_path : \"{{ responsive_asset('replace_path', 'profile_media_avatar', \"200x280\", \"jpg\") }}\",
\t\t\tphoto_path : \"{{ responsive_asset('replace_path', 'profile_media', \"200x280\", \"jpg\") }}\",
\t\t\tthumb_path : \"{{ responsive_asset('replace_path', 'saloon_media_thumb', \"200x280\", \"jpg\") }}\",
\t\t\tprocess_profile_shows_url : \"{{ path('map.increment_profile_shows', multipleCities ? {city:cityUriIdentity} : {}) }}\"
\t\t};
\t\tvar isMapInitialized = false;
\t\tvar yaMapLoaded = false;
\t\tfunction initMap() {
\t\t\t//console.log('initMap');
\t\t\twindow.ymap = new ym.Map(document.getElementById('map-wrap'), {
\t\t\t\tcenter: [\"{{ lat }}\", \"{{ lon }}\"],
\t\t\t\tzoom: 8,
\t\t\t\tcontrols: ['zoomControl', 'typeSelector', 'fullscreenControl']
\t\t\t});
\t\t\tyaMapLoaded = true;
\t\t\t//if (!isMapInitialized) {
\t\t\t//\tconsole.log('new mapPage initMap');
\t\t\t//\tisMapInitialized = true;
\t\t\t//\tnew MapPage(mapConfig);
\t\t\t//}
\t\t}
\t\twindow.profileShowed = function ({id}) {
\t\t\tif (!id) return;
\t\t\tfetch('{{ path('profile_ctr.increase_shows') }}', {
\t\t\t\tmethod: \"POST\",
\t\t\t\tbody: JSON.stringify({ profiles: [id], source: 'map' }),
\t\t\t});
\t\t}
\t\twindow.stations = {
\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 -%}
\t\t};
\t\tdocument.addEventListener('DOMContentLoaded', function () {
\t\t\tfunction loadForm() {
\t\t\t\tfetch('{{ path('map.form', {city: cityUriIdentity}) }}', {
\t\t\t\t\tmode: \"cors\",
\t\t\t\t\timportance: \"low\",
\t\t\t\t\tmethod: \"POST\",
\t\t\t\t\theaders: {
\t\t\t\t\t\t\"Content-Type\": \"application/x-www-form-urlencoded\",
\t\t\t\t\t\t\"X-Requested-With\": \"XMLHttpRequest\"
\t\t\t\t\t},
\t\t\t\t}).then(response => {
\t\t\t\t\tif (response.status < 300) {
\t\t\t\t\t\treturn response.text();
\t\t\t\t\t} else {
\t\t\t\t\t\tconsole.warn(\"🤔\");
\t\t\t\t\t\treturn null;
\t\t\t\t\t}
\t\t\t\t}).then(response => {
\t\t\t\t\tdocument.getElementById('dialog-form').innerHTML = response;
\t\t\t\t\tfilterLoader()
\t\t\t\t});
\t\t\t}
\t\t\tloadForm();
\t\t\tfunction filterLoader() {
\t\t\t\tconst stringifyData = `{\"city_id\":\"\${document.getElementById('filter_map_form_city_id').value}\",\"_token\":\"\${document.getElementById('filter_map_form__token').value}\"}`;
\t\t\t\tfetch(\"{{ path('map.filter', {city:cityUriIdentity}) }}\", {
\t\t\t\t\tmethod: \"POST\",
\t\t\t\t\theaders: {
\t\t\t\t\t\t'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
\t\t\t\t\t\t'X-Requested-With': 'XMLHttpRequest',
\t\t\t\t\t},
\t\t\t\t\tbody: new URLSearchParams({ form: stringifyData }).toString(),
\t\t\t\t})
\t\t\t\t\t.then(response => response.json())
\t\t\t\t\t.then(data => {
\t\t\t\t\t\t//console.log('map-data-loaded')
\t\t\t\t\t\tconst mapLoadedInterval = setInterval(()=>{
\t\t\t\t\t\t\tif (yaMapLoaded) {
\t\t\t\t\t\t\t\tnew MapPage(mapConfig);
\t\t\t\t\t\t\t\tdocument.dispatchEvent(new CustomEvent('map:data:loaded', { detail: { data, stringifyData } }));
\t\t\t\t\t\t\t\tclearInterval(mapLoadedInterval)
\t\t\t\t\t\t\t}
\t\t\t\t\t\t}, 200)
\t\t\t\t\t})
\t\t\t\t\t.catch(error => console.error(error));
\t\t\t\t//if (!isMapInitialized) {
\t\t\t\t//\tconsole.log('new mapPage filterLoader');
\t\t\t\t//\tisMapInitialized = true;
\t\t\t\t//\tnew MapPage(mapConfig);
\t\t\t\t//}
\t\t\t}
\t\t})
\t</script>
{% endblock %}
{% block modal %}
\t{{- parent() -}}
\t{{- include('__design/v2023/components/modal/filter.html.twig') -}}
{% endblock %}", "Map/page.html.twig", "/app/templates/Map/page.html.twig");
}
}