Ogi-apurra

Eduki publikatzailea

Errorea gertatu da txantiloia prozesatzerakoan.
The following has evaluated to null or missing:
==> BuscadorAgendaService.getEvento(calendarBookingId?number, themeDisplay.getLocale(), themeDisplay.getPortalURL())  [in template "20907#20945#32670169" at line 22, column 23]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign evento = BuscadorAgendaServic...  [in template "20907#20945#32670169" at line 22, column 5]
----
1<#assign HttpUtil = staticUtil["com.liferay.portal.kernel.util.HttpUtil"] /> 
2<#assign url = themeDisplay.getURLPortal()+themeDisplay.getURLCurrent()> 
3<#assign calendarBookingId = HttpUtil.getParameter(url,"entryId")> 
4<#assign BuscadorAgendaService = serviceLocator.findService("net.izfe.gipuzkoa.agenda.buscador.api.BuscadorAgendaService") /> 
5<#assign currentCompleteURL = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() /> 
6 
7<#if themeDisplay.getLocale() == "es_ES" > 
8    <#assign abrir_mapa ="Abrir mapa en otra ventana"> 
9    <#assign mas_informacion_es ="Más información sobre el evento "> 
10    <#assign mas_informacion_eus =""> 
11    <#assign add_calendario ="Añadir a calendario"> 
12    <#assign add_calendar ="Añadir a Google Calendar"> 
13<#else> 
14    <#assign abrir_mapa ="Ireki mapa beste leiho batean"> 
15    <#assign mas_informacion_eus =" ekitaldiari buruz"> 
16    <#assign mas_informacion_es ="Informazio gehiago"> 
17    <#assign add_calendario ="Egutegira gehitu"> 
18    <#assign add_calendar ="Google Calendar-era gehitu"> 
19</#if> 
20 
21<#if calendarBookingId?has_content > 
22    <#assign evento = BuscadorAgendaService.getEvento(calendarBookingId?number, themeDisplay.getLocale(), themeDisplay.getPortalURL()) /> 
23    <#assign images_folder = themeDisplay.getPathThemeImages() /> 
24	<#assign direccion="" /> 
25    <#if evento.direccion?has_content >  
26        <#assign direccion=direccion+evento.direccion /> 
27    </#if> 
28    <#if evento.direccion?has_content && evento.localizacion?has_content> 
29        <#assign direccion=direccion+"/" /> 
30    </#if> 
31    <#if evento.localizacion?has_content > 
32        <#assign direccion=direccion+evento.localizacion /> 
33    </#if>                             
34 
35    <@liferay_util["html-top"]> 
36        <#if evento.title?has_content > 
37            <title>${evento.title}</title> 
38            <meta property="og:title" content='${evento.title}'> 
39        </#if> 
40        <#if evento.imagenPath?has_content > 
41            <meta property="og:image" content='${evento.imagenPath}'> 
42        </#if> 
43        <#if evento.direccion?has_content > 
44            <meta property="og:description" content='${evento.direccion}'> 
45        </#if> 
46        <meta property="og:url" content='${currentCompleteURL}'> 
47    </@> 
48 
49    <div class="container mt-4 mb-4">   
50        <div class="row"> 
51            <div class="col-12 col-md-8"> 
52                <h2 class="izfe-semibold mb-4"> 
53                    ${evento.title} 
54                </h2> 
55 
56                <!-- SEPARAR FECHAS Y HORAS--> 
57 
58                <#attempt> 
59                    <#assign fechaInicio = evento.getStartDate() /> 
60                    <#assign fechaInicio = BuscadorAgendaService.formatearFechaPorIdioma(fechaInicio, themeDisplay.getLanguageId()) /> 
61                <#recover> 
62                    <#assign fechaInicio = "" /> 
63                </#attempt> 
64 
65                <#attempt> 
66                    <#assign horaInicio = evento.getStartOnlyTime() /> 
67                <#recover> 
68                    <#assign horaInicio = "" /> 
69                </#attempt> 
70 
71                <#attempt> 
72                    <#assign fechaFin = evento.getEndDate() /> 
73                    <#assign fechaFin = BuscadorAgendaService.formatearFechaPorIdioma(fechaFin, themeDisplay.getLanguageId()) /> 
74                <#recover> 
75                    <#assign fechaFin = "" /> 
76                </#attempt> 
77 
78                <#attempt> 
79                    <#assign horaFin = evento.getEndOnlyTime() /> 
80                <#recover> 
81                    <#assign horaFin = "" /> 
82                </#attempt> 
83 
84                <div class="izfe-bg-blue-dark p-2"> 
85                    <#if fechaInicio == fechaFin > 
86                        <div class="d-flex align-items-center ml-3"> 
87                            <div class="izfe-icon-calendar-time-white"></div> 
88                            <p class="text-white izfe-semibold mb-0 ml-2 izfe-h4"> 
89 
90                                <#if fechaInicio != "" > 
91                                    <span class="mr-1"> 
92                                        ${fechaInicio} 
93                                    </span> 
94                                </#if> 
95 
96                                <#if fechaFin != "" && fechaFin != fechaInicio > 
97
98                                    <span class="ml-1"> 
99                                        ${fechaFin} 
100                                    </span> 
101                                <#else> 
102                                    <span class="ml-3 mr-1"> 
103                                        ${horaInicio} 
104                                    </span> 
105
106                                    <span class="ml-1"> 
107                                        ${horaFin} 
108                                    </span> 
109                                </#if>                    
110                            </p> 
111                        </div> 
112                    <#else> 
113                        <div class="d-flex align-items-center ml-3"> 
114                            <div class="izfe-icon-calendar-time-white"></div> 
115                            <p class="text-white izfe-semibold mb-0 ml-2 izfe-h4"> 
116                                ${fechaInicio} 
117                            </p> 
118                            <span class="text-white izfe-semibold ml-2 mr-2">-</span> 
119                            <p class="text-white izfe-semibold mb-0 izfe-h4"> 
120                                ${fechaFin} 
121                            </p> 
122                        </div> 
123                    </#if> 
124                </div> 
125                 
126                <#if evento.localizacion?has_content || evento.direccion?has_content> 
127                    <div class="izfe-evento-localizacion-direccion d-flex align-items-center pl-3 pr-3 pt-2 pb-2">              
128                        <div class="d-flex flex-column flex-lg-row align-items-lg-center">                            
129                            <#if evento.urlDireccion != ""> 
130                                <a class="ml-2 d-flex align-items-center" aria-label="${abrir_mapa}" href="${evento.urlDireccion}" target="_blank"> 
131                                    <div class="izfe-icon-ubicacion-blue"></div> 
132                                    <p class="izfe-semibold mb-0 ml-2 izfe-h5"> 
133                                        <#if evento.direccion?has_content >                                 
134                                            ${evento.direccion} 
135                                        </#if> 
136                                        <#if evento.direccion?has_content && evento.localizacion?has_content> 
137                                            <span class="ml-1 mr-1">/</span> 
138                                        </#if> 
139                                        <#if evento.localizacion?has_content > 
140                                            ${evento.localizacion}  
141                                        </#if>                             
142                                    </p> 
143                                </a> 
144                            <#else> 
145                                <div class="ml-2 d-flex align-items-center"> 
146                                    <div class="izfe-icon-ubicacion"></div> 
147                                    <p class="izfe-semibold mb-0 ml-2 izfe-h5"> 
148                                        <#if evento.direccion?has_content >                               
149                                            ${evento.direccion}</p> 
150                                        </#if> 
151                                        <#if evento.direccion?has_content && evento.localizacion?has_content> 
152                                            <span class="ml-1 mr-1">/</span> 
153                                        </#if> 
154                                        <#if evento.localizacion?has_content > 
155                                            ${evento.localizacion}  
156                                        </#if> 
157                                    </p> 
158                                </div> 
159                            </#if> 
160                        </div>  
161                    </div> 
162                </#if> 
163 
164                <div class="row mt-4"> 
165                    <div class="col-12" id="izfe-evento-descripcion"> 
166                        <#if evento.descripcion != ""> 
167                            ${evento.descripcion} 
168                            <#--  ${HtmlUtil.render(evento.descripcion)}  --> 
169                        </#if> 
170                    </div>     
171                </div> 
172        		<#assign startDateArr=evento.getStartDate()?split("/") /> 
173        		<#assign endDateArr=evento.getEndDate()?split("/") /> 
174        		<#assign startTime=evento.getStartOnlyTime()?replace(":","")+"00" /> 
175        		<#assign endTime=evento.getEndOnlyTime()?replace(":","")+"00" /> 
176        		 
177        		<#assign startTimeStamp=startDateArr[2]+startDateArr[1]+startDateArr[0]+"T"+startTime+"" /> 
178        		<#assign endTimeStamp=endDateArr[2]+endDateArr[1]+endDateArr[0]+"T"+endTime+"" /> 
179  
180                <div class="calendar-btns"> 
181                    <button id="add-calendar">${add_calendario}</button> 
182                    <a href="https://calendar.google.com/calendar/render?action=TEMPLATE&text=${evento.title?replace("\n", "")?replace("\t", "")?replace('<[^>]+>','','r')?trim?replace('\"',"'")}&dates=${startTimeStamp}/${endTimeStamp}&details=${evento.descripcion?replace("\n", "")?replace("\t", "")?replace('<[^>]+>','','r')?trim}&recur=&location=${direccion}&trp=false">${add_calendar}</a> 
183                </div> 
184            </div> 
185 
186            <div class="col-12 col-md-4"> 
187                <#attempt> 
188                    <#if evento.imagenPath != "" > 
189                        <img  
190                            alt=""  
191                            class="w-100 mb-3"  
192                            src="${evento.imagenPath}" 
193                        /> 
194                    <#else> 
195                        <img  
196                            alt=""  
197                            title="img-not-found"  
198                            class="w-100" 
199                            src="${images_folder}/izfe/img-not-found.png"  
200                        />  
201                    </#if> 
202                <#recover> 
203 
204                </#attempt> 
205                 
206 
207                <#assign listaCategorias = evento.listaCategorias /> 
208 
209                <#if listaCategorias?has_content > 
210                    <div class="d-flex flex-wrap"> 
211                        <#list listaCategorias as categoria > 
212                            <p class="text-blue-second text-uppercase mb-0 mr-2"> 
213                                ${categoria.getName()} 
214                            </p> 
215                        </#list> 
216                    </div> 
217 
218                    <hr/> 
219                </#if> 
220 
221                <#if evento.webEvento != "" > 
222                    <a class="izfe-btn-blue d-block text-center" href="${evento.webEvento}" aria-label="${mas_informacion_es}${evento.title}${mas_informacion_eus}" target="_blank"> 
223                        <@liferay.language key="DGN.mas-informacion-evento" /> 
224                    </a> 
225                </#if> 
226            </div>  
227        </div> 
228                 
229     
230 
231        <div class="row mt-4 mb-4" id="izfe-evento-relacionados"> 
232            <#assign categoriasEventoActual = evento.listaCategorias /> 
233            <#assign categoriasIds = [] /> 
234 
235            <#if categoriasEventoActual?has_content > 
236                <#list categoriasEventoActual as categoriaEventoActual > 
237                    <#assign categoriasIds = categoriasIds + [categoriaEventoActual.categoryId] /> 
238                </#list> 
239            </#if> 
240 
241 
242            <#assign eventosRelacionados = BuscadorAgendaService.listaProximosEventos(themeDisplay.getCompanyId(), themeDisplay.getLocale(), themeDisplay.getPortalURL(), categoriasIds,  
243                3, [themeDisplay.getLayout().getGroupId()]) /> 
244             
245            <#if eventosRelacionados?has_content> 
246                <#assign mostrarTituloRelacionados = true> 
247                <#assign contadorRelacionados = 0 > 
248                 
249                <#list eventosRelacionados as eventoRelacionado> 
250                    <#if eventoRelacionado.calendarBookingId != evento.calendarBookingId > 
251 
252                        <#attempt> 
253                            <#assign fechaInicioRelacionado = eventoRelacionado.getStartDate() /> 
254                            <#assign fechaInicioRelacionado = BuscadorAgendaService.formatearFechaPorIdioma(fechaInicioRelacionado, themeDisplay.getLanguageId()) /> 
255                        <#recover> 
256                            <#assign fechaInicioRelacionado = "" /> 
257                        </#attempt> 
258 
259                        <#attempt> 
260                            <#assign horaInicioRelacionado = eventoRelacionado.getStartOnlyTime() /> 
261                        <#recover> 
262                            <#assign horaInicioRelacionado = "" /> 
263                        </#attempt> 
264 
265                        <#attempt> 
266                            <#assign fechaFinRelacionado = eventoRelacionado.getEndDate() /> 
267                            <#assign fechaFinRelacionado = BuscadorAgendaService.formatearFechaPorIdioma(fechaFinRelacionado, themeDisplay.getLanguageId()) /> 
268                        <#recover> 
269                            <#assign fechaFinRelacionado = "" /> 
270                        </#attempt> 
271 
272                        <#attempt> 
273                            <#assign horaFinRelacionado = eventoRelacionado.getEndOnlyTime() /> 
274                        <#recover> 
275                            <#assign horaFinRelacionado = "" /> 
276                        </#attempt> 
277 
278 
279                        <#if mostrarTituloRelacionados > 
280                            <div class="col-12"> 
281                                <h3 class="izfe-semibold mb-3"> 
282                                    <@liferay.language key="DGN.otros-eventos"/> 
283                                </h3> 
284                            </div> 
285                        </#if> 
286 
287                        <#if contadorRelacionados < 3 > 
288                            <div class="izfe-agenda-relacionado col-12 col-lg-4 mb-3 mb-lg-0"> 
289                                <a href="/actualidad/agenda/evento?entryId=${eventoRelacionado.calendarBookingId}" aria-label="${mas_informacion_es}${eventoRelacionado.title}${mas_informacion_eus}"> 
290                                    <div class="izfe-bg-blue-dark-second eventoRelacionado p-2 "> 
291                                        <div class="text-white d-flex align-items-center"> 
292                                            <span class="d-none"> 
293                                                ${fechaInicioRelacionado} - ${fechaFinRelacionado} 
294                                                 
295                                            </span> 
296                                            <#if fechaInicioRelacionado != "" > 
297                                                <p class="small text-white mr-1"> 
298                                                    ${fechaInicioRelacionado} 
299                                                </p> 
300                                            </#if> 
301                                            <#if fechaFinRelacionado != "" && fechaFinRelacionado != fechaInicioRelacionado > 
302                                                <p>-</p> 
303                                                <p class="small text-white ml-1"> 
304                                                    ${fechaFinRelacionado} 
305                                                </p> 
306                                            <#else> 
307                                                <p class="small text-white ml-2 mr-1"> 
308                                                    ${horaInicioRelacionado} 
309                                                </p> 
310                                                <p>-</p> 
311                                                <p class="small text-white ml-1"> 
312                                                    ${horaFinRelacionado} 
313                                                </p> 
314                                            </#if> 
315                                        </div> 
316                                        <h3 class="text-white izfe-h4">${eventoRelacionado.title}</h3> 
317                                        <p class="small text-white">${eventoRelacionado.localizacion}</p> 
318                                    </div> 
319                                </a> 
320                            </div> 
321                        </#if> 
322                        <#assign contadorRelacionados++ /> 
323                        <#assign mostrarTituloRelacionados = false /> 
324                    </#if> 
325                </#list> 
326            </#if> 
327        </div> 
328    </div> 
329 
330 
331    <style> 
332        #izfe-evento-descripcion *{ 
333            font-family: 'Poppins', Helvetica, Arial, sans-serif !important; 
334            font-size: 15px !important; 
335            line-height: 20px; 
336
337        #izfe-evento-relacionados a{ 
338            text-decoration: none !important; 
339
340        #izfe-evento-relacionados a:hover *{ 
341            opacity: .7; 
342        }    
343 
344        #izfe-evento-relacionados .eventoRelacionado { 
345            min-height: 175px; 
346
347        .izfe-evento-localizacion-direccion{ 
348            border: 1.5px solid #004996; 
349
350 
351        .izfe-float-left{ 
352            float: left; 
353
354        .izfe-float-right{ 
355            float: left; 
356
357 
358        .calendar-btns { 
359            display: flex; 
360            flex-direction: column; 
361            align-items: flex-start; 
362            gap: 1rem; 
363            margin-top: 1.5rem; 
364
365         
366        .calendar-btns > * { 
367            background-color: transparent; 
368            border: 3px solid #004996; 
369            padding: 0.5rem 1rem; 
370            border-radius: 100px; 
371            color: #004996 !important; 
372            font-weight: bold; 
373            transition: all ease 0.25s; 
374
375         
376        .calendar-btns > *:hover { 
377            background-color: #004996; 
378            color: #fff !important; 
379            text-decoration: none; 
380            border: 3px solid #004996; 
381
382         
383        .calendar-btns > a { 
384            border: 3px solid #004996; 
385
386         
387        .calendar-btns > *:before { 
388            content: ""; 
389            background-image: url(/documents/20933/51832620/googlecalendar-add.svg/9d6629ee-f3d4-d19d-16f0-8fb2b8d782fb?t=1684320223063); 
390            width: 1.4rem; 
391            height: 1.4rem; 
392            display: inline-block; 
393            background-size: cover; 
394            margin-right: 0.5rem; 
395            vertical-align: middle; 
396
397         
398        .calendar-btns > :hover::before { 
399            background-image: url(/documents/20933/51832620/googlecalendar-add-hover.svg/3189e2b7-d616-3830-8357-50009c09bfc0?t=1684320223414); 
400
401         
402        .calendar-btns > #add-calendar::before { 
403            background-image: url(/documents/20933/51832620/calendar-add.svg/877c3465-d510-6131-03f5-101fbab05f15?t=1684320223745); 
404
405         
406        .calendar-btns > #add-calendar:hover::before { 
407            background-image: url(/documents/20933/51832620/calendar-add-hover.svg/c6fcebd6-4560-0d3f-47bf-64e909351f73?t=1684320224069); 
408
409         
410        </style> 
411    <script type="text/javascript"> 
412var saveAs=saveAs||function(e){"use strict";if(typeof e==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in r,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},i=/constructor/i.test(e.HTMLElement)||e.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s="application/octet-stream",d=1e3*40,c=function(e){var t=function(){if(typeof e==="string"){n().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,d)},l=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e["on"+t[r]];if(typeof o==="function"){try{o.call(e,n||e)}catch(a){u(a)}}}},p=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},v=function(t,u,d){if(!d){t=p(t)}var v=this,w=t.type,m=w===s,y,h=function(){l(v,"writestart progress write writeend".split(" "))},S=function(){if((f||m&&i)&&e.FileReader){var r=new FileReader;r.onloadend=function(){var t=f?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");var n=e.open(t,"_blank");if(!n)e.location.href=t;t=undefined;v.readyState=v.DONE;h()};r.readAsDataURL(t);v.readyState=v.INIT;return}if(!y){y=n().createObjectURL(t)}if(m){e.location.href=y}else{var o=e.open(y,"_blank");if(!o){e.location.href=y}}v.readyState=v.DONE;h();c(y)};v.readyState=v.INIT;if(o){y=n().createObjectURL(t);setTimeout(function(){r.href=y;r.download=u;a(r);h();c(y);v.readyState=v.DONE});return}S()},w=v.prototype,m=function(e,t,n){return new v(e,t||e.name||"download",n)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,n){t=t||e.name||"download";if(!n){e=p(e)}return navigator.msSaveOrOpenBlob(e,t)}}w.abort=function(){};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return m}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!==null){define("FileSaver.js",function(){return saveAs})} 
413 
414var ics=function(e,t){"use strict";{if(!(navigator.userAgent.indexOf("MSIE")>-1&&-1==navigator.userAgent.indexOf("MSIE 10"))){void 0===e&&(e="default"),void 0===t&&(t="Calendar");var r=-1!==navigator.appVersion.indexOf("Win")?"\r\n":"\n",n=[],i=["BEGIN:VCALENDAR","PRODID:"+t,"VERSION:2.0"].join(r),o=r+"END:VCALENDAR",a=["SU","MO","TU","WE","TH","FR","SA"];return{events:function(){return n},calendar:function(){return i+r+n.join(r)+o},addEvent:function(t,i,o,l,u,s){if(void 0===t||void 0===i||void 0===o||void 0===l||void 0===u)return!1;if(s&&!s.rrule){if("YEARLY"!==s.freq&&"MONTHLY"!==s.freq&&"WEEKLY"!==s.freq&&"DAILY"!==s.freq)throw"Recurrence rrule frequency must be provided and be one of the following: 'YEARLY', 'MONTHLY', 'WEEKLY', or 'DAILY'";if(s.until&&isNaN(Date.parse(s.until)))throw"Recurrence rrule 'until' must be a valid date string";if(s.interval&&isNaN(parseInt(s.interval)))throw"Recurrence rrule 'interval' must be an integer";if(s.count&&isNaN(parseInt(s.count)))throw"Recurrence rrule 'count' must be an integer";if(void 0!==s.byday){if("[object Array]"!==Object.prototype.toString.call(s.byday))throw"Recurrence rrule 'byday' must be an array";if(s.byday.length>7)throw"Recurrence rrule 'byday' array must not be longer than the 7 days in a week";s.byday=s.byday.filter(function(e,t){return s.byday.indexOf(e)==t});for(var c in s.byday)if(a.indexOf(s.byday[c])<0)throw"Recurrence rrule 'byday' values must include only the following: 'SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA'"}}var g=new Date(l),d=new Date(u),f=new Date,S=("0000"+g.getFullYear().toString()).slice(-4),E=("00"+(g.getMonth()+1).toString()).slice(-2),v=("00"+g.getDate().toString()).slice(-2),y=("00"+g.getHours().toString()).slice(-2),A=("00"+g.getMinutes().toString()).slice(-2),T=("00"+g.getSeconds().toString()).slice(-2),b=("0000"+d.getFullYear().toString()).slice(-4),D=("00"+(d.getMonth()+1).toString()).slice(-2),N=("00"+d.getDate().toString()).slice(-2),h=("00"+d.getHours().toString()).slice(-2),I=("00"+d.getMinutes().toString()).slice(-2),R=("00"+d.getMinutes().toString()).slice(-2),M=("0000"+f.getFullYear().toString()).slice(-4),w=("00"+(f.getMonth()+1).toString()).slice(-2),L=("00"+f.getDate().toString()).slice(-2),O=("00"+f.getHours().toString()).slice(-2),p=("00"+f.getMinutes().toString()).slice(-2),Y=("00"+f.getMinutes().toString()).slice(-2),U="",V="";y+A+T+h+I+R!=0&&(U="T"+y+A+T,V="T"+h+I+R);var B,C=S+E+v+U,j=b+D+N+V,m=M+w+L+("T"+O+p+Y);if(s)if(s.rrule)B=s.rrule;else{if(B="rrule:FREQ="+s.freq,s.until){var x=new Date(Date.parse(s.until)).toISOString();B+=";UNTIL="+x.substring(0,x.length-13).replace(/[-]/g,"")+"000000Z"}s.interval&&(B+=";INTERVAL="+s.interval),s.count&&(B+=";COUNT="+s.count),s.byday&&s.byday.length>0&&(B+=";BYDAY="+s.byday.join(","))}(new Date).toISOString();var H=["BEGIN:VEVENT","UID:"+n.length+"@"+e,"CLASS:PUBLIC","DESCRIPTION:"+i,"DTSTAMP;VALUE=DATE-TIME:"+m,"DTSTART;VALUE=DATE-TIME:"+C,"DTEND;VALUE=DATE-TIME:"+j,"LOCATION:"+o,"SUMMARY;LANGUAGE=en-us:"+t,"TRANSP:TRANSPARENT","END:VEVENT"];return B&&H.splice(4,0,B),H=H.join(r),n.push(H),H},download:function(e,t){if(n.length<1)return!1;t=void 0!==t?t:".ics",e=void 0!==e?e:"calendar";var a,l=i+r+n.join(r)+o;if(-1===navigator.userAgent.indexOf("MSIE 10"))a=new Blob([l]);else{var u=new BlobBuilder;u.append(l),a=u.getBlob("text/x-vCalendar;charset="+document.characterSet)}return saveAs(a,e+t),l},build:function(){return!(n.length<1)&&i+r+n.join(r)+o}}}console.log("Unsupported Browser")}}; 
415	</script> 
416 
417		 <script type="text/javascript">						 
418			cal_event = ics(); 
419			var descripcion=`${evento.descripcion?replace("\n", "")?replace("\t", "")?replace('<[^>]+>','','r')?trim}`; 
420			<#assign startDateArr=evento.getStartDate()?split("/") /> 
421			<#assign endDateArr=evento.getEndDate()?split("/") /> 
422			var startDate="${startDateArr[1]}/${startDateArr[0]}/${startDateArr[2]}"; 
423			var endDate="${endDateArr[1]}/${endDateArr[0]}/${endDateArr[2]}"; 
424			<#assign direccion="" /> 
425            <#if evento.direccion?has_content >  
426                <#assign direccion=direccion+evento.direccion /> 
427            </#if> 
428            <#if evento.direccion?has_content && evento.localizacion?has_content> 
429                <#assign direccion=direccion+"/" /> 
430            </#if> 
431            <#if evento.localizacion?has_content > 
432                <#assign direccion=direccion+evento.localizacion /> 
433            </#if>                             
434 
435    		cal_event.addEvent( 
436    			'${evento.title?replace('<[^>]+>','','r')?replace('\'','"')}',  
437    			descripcion,  
438    			'${direccion}',  
439    			startDate+' ${evento.getStartOnlyTime()}',  
440    			endDate+' ${evento.getEndOnlyTime()}'); 
441    			 
442    		document.getElementById("add-calendar").addEventListener("click", function() { 
443    			cal_event.download('${evento.title?replace('<[^>]+>','','r')?replace('\'','"')}'); 
444    		}); 
445 
446	</script> 
447</#if>