Se ha producido un error al procesar la plantilla.
Can't convert this string to number: ""
The blamed expression:
==> category.getData()?split("*")[0]?number [in template "62757443695457#32456#120703" at line 8, column 34]
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign stars = category.getData()?sp... [in template "62757443695457#32456#120703" at line 8, column 17]
----
1<section>
2 <h1 class="mp-title-section"><#if (name.getData())??>${name.getData()}</#if></h1>
3 <div class="mp-detail-hotel__wrapper">
4 <div class="stars-location__wrapper">
5
6 <#assign stars = 0>
7 <#if (category.getData())??>
8 <#assign stars = category.getData()?split("*")[0]?number>
9 </#if>
10 <#if (stars > 0)>
11 <ul class="stars__wrapper">
12 <#list 1..stars as i>
13 <li>
14 <svg width="15" height="15" viewBox="0 0 16 16" data-icon="star">
15 <symbol id="ai:local:star">
16 <path fill="currentColor"
17 d="m8 12.689-3.89 2.346a.72.72 0 0 1-.436.107.79.79 0 0 1-.396-.147.84.84 0 0 1-.273-.332.648.648 0 0 1-.03-.453l1.032-4.417L.573 6.82a.737.737 0 0 1-.245-.388.702.702 0 0 1 .027-.428.845.845 0 0 1 .233-.34.807.807 0 0 1 .416-.171l4.532-.396L7.296.925a.68.68 0 0 1 .291-.344.819.819 0 0 1 .825 0 .68.68 0 0 1 .291.344l1.76 4.172 4.533.396a.807.807 0 0 1 .415.172.846.846 0 0 1 .233.34.703.703 0 0 1 .028.427.737.737 0 0 1-.245.388l-3.435 2.973 1.033 4.417a.648.648 0 0 1-.031.453.839.839 0 0 1-.273.332.79.79 0 0 1-.396.147.72.72 0 0 1-.435-.107L8 12.689Z"></path>
18 </symbol>
19 <use xlink:href="#ai:local:star"></use>
20 </svg>
21 </li>
22 </#list>
23 </ul>
24 </#if>
25
26 <div class="location__wrapper">
27 <span>
28 <svg width="20" height="20" viewBox="0 0 12 20" data-icon="distance">
29 <symbol id="ai:local:distance">
30 <path fill="currentColor"
31 d="M6.441 19.5c-1.612 0-2.932-.231-3.96-.693C1.456 18.345.942 17.742.942 17c0-.391.168-.749.504-1.073.336-.324.8-.605 1.394-.842l.287.957c-.347.148-.619.303-.813.467-.195.163-.315.327-.36.491.114.446.598.808 1.452 1.085.854.276 1.866.415 3.036.415 1.158 0 2.168-.139 3.03-.415.862-.277 1.35-.639 1.465-1.085-.045-.164-.165-.325-.36-.482a3.956 3.956 0 0 0-.813-.476l.305-.957c.594.237 1.055.518 1.382.842.328.324.491.682.491 1.073 0 .742-.513 1.345-1.54 1.807-1.027.462-2.347.693-3.96.693Zm0-5.137c.3-.588.656-1.188 1.066-1.8.41-.613.831-1.198 1.263-1.755.643-.839 1.157-1.601 1.543-2.288.385-.686.578-1.543.578-2.57 0-1.228-.434-2.277-1.303-3.146C8.718 1.934 7.67 1.5 6.44 1.5c-1.228 0-2.277.435-3.146 1.304-.869.87-1.304 1.918-1.304 3.146 0 1.027.197 1.884.589 2.57a22.38 22.38 0 0 0 1.533 2.288c.432.557.853 1.142 1.263 1.755.41.612.765 1.212 1.065 1.8Zm0 1.522a.603.603 0 0 1-.403-.163 1.077 1.077 0 0 1-.287-.399c-.435-1.055-.924-1.94-1.47-2.658l-1.565-2.06a12.42 12.42 0 0 1-1.224-2.043c-.334-.707-.5-1.577-.5-2.612 0-1.526.526-2.815 1.58-3.87C3.626 1.028 4.916.5 6.442.5c1.525 0 2.815.527 3.869 1.58 1.053 1.055 1.58 2.344 1.58 3.87 0 1.035-.162 1.905-.488 2.612a10.973 10.973 0 0 1-1.237 2.044c-.482.656-1 1.343-1.552 2.06-.554.716-1.048 1.602-1.482 2.657a1.09 1.09 0 0 1-.287.4.603.603 0 0 1-.404.162Zm0-8.406c.43 0 .792-.148 1.087-.442.295-.295.442-.658.442-1.087 0-.43-.147-.792-.442-1.087a1.477 1.477 0 0 0-1.087-.442c-.43 0-.791.148-1.086.442a1.477 1.477 0 0 0-.442 1.087c0 .43.147.792.442 1.087a1.48 1.48 0 0 0 1.086.442Z"></path>
32 </symbol>
33 <use xlink:href="#ai:local:distance"></use>
34 </svg>
35 ${street.getData()!""} - ${location.getData()!""}(${province.getData()!""}) -
36 </span>
37 <#if (longitude.getData())?has_content && (latitude.getData())?has_content>
38 <a onclick="scrollToTargetAdjusted('hotel-map')"
39 class="button button--none">
40 Ver mapa
41 </a>
42 </#if>
43
44 <#if (socialLinks.whatsappLink.getData())?has_content>
45 <a href="${socialLinks.whatsappLink.getData()}" target="_blank" class="button button--none">
46
47 <svg width="20" height="20" viewBox="0 0 308 308" data-icon="whatsapp">
48
49 <symbol id="ai:local:whatsapp">
50 <g fill="currentColor">
51 <path d="M227.904 176.981c-.6-.288-23.054-11.345-27.044-12.781-1.629-.585-3.374-1.156-5.23-1.156-3.032 0-5.579 1.511-7.563 4.479-2.243 3.334-9.033 11.271-11.131 13.642-.274.313-.648.687-.872.687-.201 0-3.676-1.431-4.728-1.888-24.087-10.463-42.37-35.624-44.877-39.867-.358-.61-.373-.887-.376-.887.088-.323.898-1.135 1.316-1.554 1.223-1.21 2.548-2.805 3.83-4.348a140.77 140.77 0 0 1 1.812-2.153c1.86-2.164 2.688-3.844 3.648-5.79l.503-1.011c2.344-4.657.342-8.587-.305-9.856-.531-1.062-10.012-23.944-11.02-26.348-2.424-5.801-5.627-8.502-10.078-8.502-.413 0 0 0-1.732.073-2.109.089-13.594 1.601-18.672 4.802C90 87.918 80.89 98.74 80.89 117.772c0 17.129 10.87 33.302 15.537 39.453.116.155.329.47.638.922 17.873 26.102 40.154 45.446 62.741 54.469 21.745 8.686 32.042 9.69 37.896 9.69h.001c2.46 0 4.429-.193 6.166-.364l1.102-.105c7.512-.666 24.02-9.22 27.775-19.655 2.958-8.219 3.738-17.199 1.77-20.458-1.348-2.216-3.671-3.331-6.612-4.743z"></path>
52 <path d="M156.734 0C73.318 0 5.454 67.354 5.454 150.143c0 26.777 7.166 52.988 20.741 75.928L.212 302.716a3.998 3.998 0 0 0 4.999 5.096l79.92-25.396c21.87 11.685 46.588 17.853 71.604 17.853C240.143 300.27 308 232.923 308 150.143 308 67.354 240.143 0 156.734 0zm0 268.994c-23.539 0-46.338-6.797-65.936-19.657a3.996 3.996 0 0 0-3.406-.467l-40.035 12.726 12.924-38.129a4.002 4.002 0 0 0-.561-3.647c-14.924-20.392-22.813-44.485-22.813-69.677 0-65.543 53.754-118.867 119.826-118.867 66.064 0 119.812 53.324 119.812 118.867.001 65.535-53.746 118.851-119.811 118.851z"></path>
53 </g>
54 </symbol>
55 <use xlink:href="#ai:local:whatsapp"></use>
56
57 </svg>
58
59 </a>
60 </#if>
61 <#if (socialLinks.instagramLink.getData())?has_content>
62 <a href="${socialLinks.instagramLink.getData()}" target="_blank" class="button button--none">
63
64 <svg width="20" height="20" viewBox="0 0 20 20" data-icon="instagram">
65
66 <symbol id="ai:local:instagram">
67 <path fill="currentColor" fill-rule="evenodd"
68 d="M5.87.123C4.242.196 2.83.594 1.69 1.729.548 2.869.155 4.286.081 5.897.037 6.902-.231 14.498.545 16.49a5.04 5.04 0 0 0 2.91 2.903c.634.246 1.356.412 2.416.461 8.86.401 12.145.183 13.53-3.364.246-.631.415-1.353.462-2.41.405-8.883-.066-10.809-1.61-12.351C17.027.507 15.586-.325 5.87.123m.081 17.944c-.97-.043-1.496-.205-1.848-.341a3.255 3.255 0 0 1-1.888-1.883c-.591-1.514-.395-8.703-.342-9.866.051-1.14.282-2.18 1.086-2.985C3.954 2 5.24 1.513 13.993 1.908c1.142.052 2.186.282 2.992 1.084.995.993 1.489 2.288 1.087 11.008-.044.968-.206 1.493-.342 1.843-.901 2.308-2.973 2.628-11.779 2.224M14.09 4.69c0 .657.534 1.19 1.194 1.19.66 0 1.195-.533 1.195-1.19a1.194 1.194 0 0 0-2.39 0M4.864 9.988a5.103 5.103 0 0 0 5.11 5.097 5.103 5.103 0 0 0 5.109-5.097 5.102 5.102 0 0 0-5.11-5.096 5.102 5.102 0 0 0-5.11 5.096m1.794 0A3.313 3.313 0 0 1 9.972 6.68a3.313 3.313 0 0 1 3.317 3.308 3.313 3.313 0 0 1-3.317 3.31 3.313 3.313 0 0 1-3.316-3.31"></path>
69 </symbol>
70 <use xlink:href="#ai:local:instagram"></use>
71
72 </svg>
73
74 </a>
75 </#if>
76 <#if (socialLinks.mailLink.getData())?has_content>
77 <a href="${socialLinks.mailLink.getData()}" target="_blank" class="button button--none">
78
79 <svg width="25" height="25" viewBox="0 0 24 24" data-icon="email">
80
81 <symbol id="ai:local:email">
82 <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2">
83 <path stroke-linejoin="round" d="m4 7 6.2 4.65a3 3 0 0 0 3.6 0L20 7"></path>
84 <rect width="18" height="14" x="3" y="5" rx="2"></rect>
85 </g>
86 </symbol>
87 <use xlink:href="#ai:local:email"></use>
88
89 </svg>
90
91 </a>
92 </#if>
93
94 </div>
95 </div>
96 <div class="images-searcher__wrapper">
97 <div class="carousel__wrapper">
98 <div class="mp-carousel-images__wrapper" role="region" aria-label="Carousel">
99 <div class="swiper-content__wrapper">
100 <div class="swiper swiper-initialized swiper-horizontal swiper-backface-hidden">
101 <div class="swiper-wrapper" id="swiper-wrapper-513e102a29d6ad10d6" aria-live="polite">
102
103
104 <#if images.getSiblings()?has_content>
105 <#list images.getSiblings() as cur_images>
106 <#if (cur_images.getData())?? && cur_images.getData() != "">
107
108 <div class="swiper-slide" role="group"
109 aria-roledescription="slide"
110 aria-label="${cur_images?index} / ${images.getSiblings()?size}"
111 data-swiper-slide-index="${cur_images?index}" style="width: 867px;">
112 <div class="swiper-slide-info__wrapper">
113 <div class="bg-image"
114 style="background-size: contain; background-image: url('${cur_images.getData()}')"
115 role="img" aria-label="${cur_images.getAttribute("alt")}"
116 aria-labelledby="${cur_images.getAttribute("alt")}"></div>
117
118 </div>
119 </div>
120 </#if>
121 </#list>
122 </#if>
123
124 </div>
125 <div class="swiper-button-control__wrapper">
126 <div class="swiper-button-prev" tabindex="0" role="button" aria-label="Previous slide"
127 aria-controls="swiper-wrapper-513e102a29d6ad10d6">
128 <button aria-label="Slide anterior" title="Slide Anterior"
129 class="button button--none">
130 <svg width="18" height="18" viewBox="0 0 16 16" data-icon="arrow-left">
131 <symbol id="ai:local:arrow-left">
132 <path fill="currentColor"
133 d="M3.373 7.25H15.5v1.5H3.373l5.696 5.696L8 15.5.5 8 8 .5l1.07 1.054L3.372 7.25Z"></path>
134 </symbol>
135 <use xlink:href="#ai:local:arrow-left"></use>
136 </svg>
137 <span class="mp-sr-only">Slide anterior</span>
138 </button>
139 </div>
140 <div class="swiper-button-next" tabindex="0" role="button" aria-label="Next slide"
141 aria-controls="swiper-wrapper-513e102a29d6ad10d6">
142 <button aria-label="Slide posterior" title="Slide posterior"
143 class="button button--none">
144 <svg width="18" height="18" viewBox="0 0 16 16" data-icon="arrow-right">
145 <symbol id="ai:local:arrow-right">
146 <path fill="currentColor"
147 d="M12.627 8.75H.5v-1.5h12.127L6.931 1.554 8 .5 15.5 8 8 15.5l-1.07-1.054 5.697-5.696Z"></path>
148 </symbol>
149 <use xlink:href="#ai:local:arrow-right"></use>
150 </svg>
151 <span class="mp-sr-only">Slide posterior</span>
152 </button>
153 </div>
154 </div>
155 <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
156 </div>
157 </div>
158 </div>
159 </div>
160 </div>
161
162 </div>
163</section>
164
165<script>
166
167 (function () {
168 setTimeout(() => {
169 loadCarousels();
170 }, "1000");
171
172
173 })();
174
175 function loadCarousels() {
176 productSwiper = new Swiper(".mp-carousel-images__wrapper .swiper", {
177 direction: "horizontal",
178 rewind: true,
179 loop: true,
180 navigation: {
181 nextEl: ".swiper-button-next",
182 prevEl: ".swiper-button-prev",
183 },
184 keyboard: {
185 enabled: true,
186 onlyInViewport: true,
187 },
188 });
189 }
190
191 // Select the node that will be observed for mutations
192 targetNodeNext = document.querySelector(".swiper-button-next");
193 targetNodePrevious = document.querySelector(".swiper-button-prev");
194
195 // Options for the observer (which mutations to observe)
196 config = { attributes: true };
197
198 // Callback function to execute when mutations are observed
199 callback = (mutationList, observer) => {
200 for (const mutation of mutationList) {
201 if (mutation.type === "attributes") {
202 if (mutation.target.classList.contains('swiper-button-disabled')) {
203 mutation.target.classList.remove('swiper-button-disabled')
204 }
205 }
206 }
207 };
208
209 // Create an observer instance linked to the callback function
210 observer = new MutationObserver(callback);
211
212 // Start observing the target node for configured mutations
213 observer.observe(targetNodeNext, config);
214 observer.observe(targetNodePrevious, config);
215
216 function scrollToTargetAdjusted(target) {
217 var element = document.getElementById(target);
218 var headerOffset = 69;
219 var elementPosition = element.getBoundingClientRect().top;
220 var offsetPosition = elementPosition + window.pageYOffset - headerOffset;
221
222 window.scrollTo({
223 top: offsetPosition,
224 behavior: "smooth"
225 });
226 }
227
228</script>