{%- macro _get_min(price1, price2, currency) -%}
{%- set price1 = price1 is defined and price1 > 0 ? price1 : 999999999 -%}
{%- set price2 = price2 is defined and price2 > 0 ? price2 : 999999999 -%}
{%- if price1 == 999999999 and price2 == 999999999 -%}
-
{%- elseif price1 == 999999999 -%}
{{price2}} {{ currency }}
{%- elseif price2 == 999999999 -%}
{{price1}} {{ currency }}
{%- else -%}
{{ min([price1,price2]) }} {{ currency }}
{%- endif -%}
{%- endmacro -%}
{%- macro _check_out_price(price1, price2, price3) -%}
{%- set maxPrice = 999999999 %}
{%- set price1 = price1 is defined and price1 > 0 ? price1 : maxPrice -%}
{%- set price2 = price2 is defined and price2 > 0 ? price2 : maxPrice -%}
{%- set price3 = price3 is defined and price3 > 0 ? price3 : maxPrice -%}
{%- if price1 != maxPrice or price2 != maxPrice or price3 != maxPrice -%}
1
{%- else -%}
0
{%- endif -%}
{%- endmacro -%}
{%- macro _gen_alt(profile, stationOutput, fakeStation, station) -%}
{%- set services = "Секс классический|Секс анальный|Секс групповой|Секс лесбийский|Услуги семейной паре|Секс-игрушки|Минет в презервативе|Минет без резинки|Минет глубокий|Минет в машине|Куннилингус|Окончание на грудь|Окончание на лицо|Окончание в рот|Стриптиз профи|Стриптиз не профи|Лесби откровенное|Лесби-шоу легкое|Массаж классический|Массаж профессиональный|Массаж расслабляющий|Массаж тайский|Массаж урологический|Массаж точечный|Массаж эротический|Массаж ветка сакуры|Страпон|Анилингус делаю|Золотой дождь выдача|Золотой дождь прием|Копро выдача|Фистинг анальный|Фистинг классический|Фистинг Вам|Фистинг мне|Госпожа|Игры|Легкая доминация|Порка|Рабыня|Фетиш|Трамплинг|Бондаж|Ролевые игры|Фото/видео съемка|Эскорт|GFE|Целуюсь" -%}
{%- set randomService1 = services|seo_morphing(profile.id)|lower -%}
{%- set randomService2 = services|seo_morphing(profile.id + 752)|lower -%}
{%- set _station = fakeStation ? station.name ~ ", " : (stationOutput ? stationOutput.name ~ ", " : '') -%}
{{- profile.name ~ ' (' ~ profile.personParameters.age ~ '), ' ~ (_station) ~ randomService1 ~ ", " ~ randomService2 ~ (profile.seo.phone is defined ? ", тел. " ~ profile.seo.phone : '') -}}
{%- endmacro -%}
{% set fakeStation = fakeStationList is defined and fakeStationList and station is defined and station.uriIdentity %}
{% set isStationPage = isStationPage is defined ? isStationPage : false %}
{%- for profile in profiles -%}
{%- set profile = profile.profile is defined ? profile.profile : profile %}
{% set isSearchPage = form is defined %}
{% set stationFromForm = null %}
{# -------------------------- Если страница поиска -------------------------- #}
{% if isSearchPage %}
{% if form.station is defined and form.station.vars.value|length > 0 %}
{% for station in form.station.vars.value %}
{% if stationFromForm is null%}
{% set stationFromForm = profile.stations[station] is defined ? profile.stations[station] : null %}
{% endif %}
{% endfor %}
{% endif %}
{% set listingStation = stationFromForm %}
{% else %}
{% set listingStation = app.request.attributes.get('station') %}
{% endif %}
{% set haveStationInList = listingStation %}
{% set stationOutput = '' %}
{% set stationReallyExist = false %}
{# Проверяем что станция которую мы открыли есть в профиле анкеты #}
{% if haveStationInList and profile.stations|length > 0 %}
{% for station in profile.stations %}
{% if station.uriIdentity == listingStation.uriIdentity %}
{% set stationReallyExist = true %}
{% endif %}
{% endfor %}
{% endif %}
{% if haveStationInList and stationReallyExist %}
{# Если это список станций - выводим эту станцию сразу #}
{% set stationOutput = listingStation %}
{% else %}
{# Если это обычный список - выводим станции из профиля #}
{% set stationOutput = profile.stations|first %}
{% endif -%}
<div class="models-item-col" data-profile-id="{{ profile.id }}">
<div class="models-item rounding">
<a class="models-item-link" data-profile data-id="{{profile.id}}" href="{{ path('profile_preview.page', {'city': profile.city.uriIdentity, 'profile': profile.uriIdentity}) }}" target="_blank">
<div class="models-item__header d-flex align-items-center justify-content-between">
<div class="models-item__header-title mr-2 d-flex align-items-center">
<span>{{ profile.name|trans }}</span>
{%- if ( profile.isApproved ) -%}
<div class="ml-2" data-toggle="tooltip" data-theme="verify" data-tippy-content="Фото проверено">
<svg class="icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-verify-new"></use>
</svg>
</div>
{%- endif -%}
</div>
<div class="item-status d-flex align-items-center justify-content-center">
{%- if profile.comments is iterable ? (profile.comments|length > 0) : profile.comments -%}
<div class="item-status__el d-flex align-items-center active" data-toggle="tooltip" data-placement="top" data-tippy-content="Есть комментарии" data-theme="basic">
<svg class="icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-comments-thumb"></use>
</svg>
</div>
{%- else -%}
<div class="item-status__el d-flex align-items-center">
<svg class="icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-comments-thumb"></use>
</svg>
</div>
{%- endif -%}
{%- if profile.selfies is iterable ? (profile.selfies|length > 0) : profile.selfies -%}
<div class="item-status__el d-flex align-items-center active" data-toggle="tooltip" data-placement="top" data-tippy-content="Есть селфи" data-theme="basic">
<svg class="icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-selfie-thumb"></use>
</svg>
</div>
{%- else -%}
<div class="item-status__el d-flex align-items-center">
<svg class="icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-selfie-thumb"></use>
</svg>
</div>
{%- endif -%}
{%- if profile.videos is iterable ? (profile.videos|length > 0) : profile.videos -%}
<div class="item-status__el d-flex align-items-center active" data-toggle="tooltip" data-placement="top" data-tippy-content="Есть видео" data-theme="basic">
<svg class="icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-video-thumb"></use>
</svg>
</div>
{%- else -%}
<div class="item-status__el d-flex align-items-center">
<svg class="icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-video-thumb"></use>
</svg>
</div>
{%- endif -%}
</div>
</div>
<div class="models-item__content d-flex">
<div class="models-item__images d-block rounding">
{%- set photo = profile|avatar -%}
{%- if photo -%}
{%- set firstStation = profile.stations|first -%}
<img {{ loop.index == 1 ? '' : 'data-' }}src="{{ responsive_asset(photo.path, 'profile_media', "200x280", "jpg") }}" class="models-item__img lazy img-fluid rounding"
{%- if listingStation and not fakeStation -%}
alt="{{ profile.name|trans }} ({{ profile.personParameters.age }}){% if firstStation and firstStation is not null %}, {{ firstStation.name|trans }}{%- endif -%}"
{%- else -%}
alt="{{- _self._gen_alt(profile, stationOutput, fakeStation, station ?? false) -}}"
{%- endif -%}
width="200" height="280">
{%- endif -%}
{%- if profile.isActive -%}
{%- if profile.isVip -%}
<div class="status-line">
<svg class="status-line__icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#status-gold-new"></use>
</svg>
</div>
{%- elseif profile.isStandard -%}
<div class="status-line">
<svg class="status-line__icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#status-silver-new"></use>
</svg>
</div>
{%- endif -%}
{%- endif -%}
</div>
<div class="models-item__info d-flex flex-fill">
<div class="models-item__info-link">
<dl class="item-info">
<div class="item-info__el d-flex align-items-center justify-content-between">
<dt class="item-info__key">Возраст</dt>
<dd class="item-info__value">{{- profile.personParameters.age ? profile.personParameters.age : '-' -}}</dd>
</div>
<div class="item-info__el d-flex align-items-center justify-content-between">
<dt class="item-info__key">Рост</dt>
<dd class="item-info__value">{{- profile.personParameters.height ? profile.personParameters.height : '-' -}}</dd>
</div>
<div class="item-info__el d-flex align-items-center justify-content-between">
<dt class="item-info__key">Вес</dt>
<dd class="item-info__value">{{- profile.personParameters.weight ? profile.personParameters.weight : '-' -}}</dd>
</div>
<div class="item-info__el d-flex align-items-center justify-content-between">
<dt class="item-info__key">Грудь</dt>
<dd class="item-info__value">{{- profile.personParameters.breastSize ? profile.personParameters.breastSize : '-' -}}</dd>
</div>
</dl>
{%- set currencyProfile -%}{{ profile.city.countryCode|country_currency }}{%- endset -%}
{%- set minPriceHour -%}{{ _self._get_min(profile.apartmentsPricing.oneHourPrice,profile.takeOutPricing.oneHourPrice,currencyProfile) }}{%- endset -%}
{%- set minPriceTwo -%}{{ _self._get_min(profile.apartmentsPricing.twoHoursPrice,profile.takeOutPricing.twoHoursPrice,currencyProfile) }}{%- endset -%}
{%- set minPriceNight -%}{{ _self._get_min(profile.apartmentsPricing.nightPrice,profile.takeOutPricing.nightPrice,currencyProfile) }}{%- endset -%}
{%- set hasOutPrice -%}{{- _self._check_out_price(profile.takeOutPricing.oneHourPrice,profile.takeOutPricing.twoHoursPrice,profile.takeOutPricing.nightPrice) -}}{%- endset -%}
<dl class="item-info">
<div class="item-info__el d-flex align-items-center justify-content-between">
<dt class="item-info__key">Час</dt>
<dd class="item-info__value">{{- minPriceHour != '-' ? minPriceHour : '-' -}}</dd>
</div>
<div class="item-info__el d-flex align-items-center justify-content-between">
<dt class="item-info__key">2 часа</dt>
<dd class="item-info__value">{{- minPriceTwo != '-' ? minPriceTwo : '-' -}}</dd>
</div>
<div class="item-info__el d-flex align-items-center justify-content-between">
<dt class="item-info__key">Ночь</dt>
<dd class="item-info__value">{{- minPriceNight != '-' ? minPriceNight : '-' -}}</dd>
</div>
<div class="item-info__el d-flex align-items-center justify-content-between">
<dt class="item-info__key">Выезд</dt>
<dd class="item-info__value">{{- hasOutPrice == '1' ? 'Есть' : '-' -}}</dd>
</div>
</dl>
</div>
</div>
</div>
</a>
<div class="models-item__metro d-flex align-items-center">
{%- if fakeStation -%}
{%- include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} -%}
{%- if isStationPage -%}
<div class="models-item__metro-link">
{{- station.name -}}
</div>
{% else %}
<a class="models-item__metro-link" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}" target="_blank">
{{- station.name -}}
</a>
{% endif %}
{%- elseif stationOutput != '' -%}
{%- include 'components/metro/icon_generate.partial.twig' with {data: stationOutput.id|station_lines} -%}
{%- if isStationPage -%}
<div class="models-item__metro-link">
{{- stationOutput.name -}}
</div>
{%- else -%}
<a class="models-item__metro-link" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': stationOutput.uriIdentity}) }}" target="_blank">
{{- stationOutput.name -}}
</a>
{%- endif -%}
{%- else -%}
<div class="models-item__metro-link models-item__metro-link--empty"></div>
{%- endif -%}
</div>
{%- if profile.isActive or not profile.isHidden -%}
<div class="models-item__phone rounding">
<button class="models-item__phone-button models-item__phone-button--dark btn btn-danger d-flex align-items-center justify-content-center" type="button" onclick="this.nextElementSibling.classList.remove('d-none');this.nextElementSibling.classList.add('d-flex');this.remove()">
<svg class="models-item__phone-icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#phone"></use>
</svg>Показать телефон</button>
<a href="tel:{{ profile.phoneNumber|replace({' ':'', '-':''}) }}" rel="nofollow" class="models-item__phone-button btn btn-danger align-items-center justify-content-center d-none">
<svg class="models-item__phone-icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#phone"></use>
</svg>
{{- profile.phoneNumber -}}
</a>
</div>
{%- endif -%}
</div>
</div>
{%- if app.request.method == 'GET' and app.request.isXmlHttpRequest() -%}
{{- porpaginas_render(profiles) -}}
{% endif %}
{%- endfor -%}