function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],d=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);d=!0);}catch(e){c=!0,a=e}finally{try{if(!d&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}
/**
* @package DPCalendar
* @copyright Digital Peak GmbH. <https://www.digital-peak.com>
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
*/!function(){"use strict";function e(e,t){var r;return null==localStorage.getItem(t.storageId)&&(localStorage.setItem(t.storageId,JSON.stringify(t.calendarIds)),r=t.calendarIds),r||(r=JSON.parse(localStorage.getItem(t.storageId)).filter((function(e){return t.calendarIds.findIndex((function(t){return String(t)===String(e)}))>=0}))),t.singleCalendarsFetch?[r.join(",")]:r}function t(e){var t=[];return t.month="dayGridMonth",t.week="timeGridWeek",t.day="timeGridDay",t.list="list",t.resyear="resourceTimelineYear",t.resmonth="resourceTimelineMonth",t.resweek="resourceTimelineWeek",t.resday="resourceTimelineDay",null!=e.resources&&e.resourceViews&&e.resourceViews.find((function(e){return"week"===e}))&&(t.week="resourceTimeGridWeek"),null!=e.resources&&e.resourceViews&&e.resourceViews.find((function(e){return"day"===e}))&&(t.day="resourceTimeGridDay"),t}function r(e){var t=[];return t.dayGridMonth="month",t.timeGridWeek="week",t.timeGridDay="day",t.list="list",t.resourceTimelineYear="resyear",t.resourceTimelineMonth="resmonth",t.resourceTimelineWeek="resweek",t.resourceTimelineDay="resday",null!=e.resources&&(t.resourceTimeGridWeek="week",t.resourceTimeGridDay="day"),t}function n(e,t,r,n){if(r.use_hash){var a="year="+e.getUTCFullYear()+"&month="+(e.getUTCMonth()+1)+"&day="+e.getUTCDate()+"&view="+t;window.location.hash.replace(/&/gi,"&").replace("#","")!=a&&(window.location.hash=a)}else n.dpCalendar.gotoDate(e)}var a=function(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r},o=function(e,t,r,n,o,i){return a((l=a(a(t,e),a(n,i)))<<(d=o)|l>>>32-d,r);var l,d},i=function(e,t,r,n,a,i,l){return o(t&r|~t&n,e,t,a,i,l)},l=function(e,t,r,n,a,i,l){return o(t&n|r&~n,e,t,a,i,l)},d=function(e,t,r,n,a,i,l){return o(t^r^n,e,t,a,i,l)},c=function(e,t,r,n,a,i,l){return o(r^(t|~n),e,t,a,i,l)},s=function(e,t,r){var n=_slicedToArray(e,4),a=n[0],o=n[1],l=n[2],d=n[3];return a=i(a,o,l,d,t[r+0],7,-680876936),d=i(d,a,o,l,t[r+1],12,-389564586),l=i(l,d,a,o,t[r+2],17,606105819),o=i(o,l,d,a,t[r+3],22,-1044525330),a=i(a,o,l,d,t[r+4],7,-176418897),d=i(d,a,o,l,t[r+5],12,1200080426),l=i(l,d,a,o,t[r+6],17,-1473231341),o=i(o,l,d,a,t[r+7],22,-45705983),a=i(a,o,l,d,t[r+8],7,1770035416),d=i(d,a,o,l,t[r+9],12,-1958414417),l=i(l,d,a,o,t[r+10],17,-42063),o=i(o,l,d,a,t[r+11],22,-1990404162),a=i(a,o,l,d,t[r+12],7,1804603682),d=i(d,a,o,l,t[r+13],12,-40341101),l=i(l,d,a,o,t[r+14],17,-1502002290),[a,o=i(o,l,d,a,t[r+15],22,1236535329),l,d]},u=function(e,t,r){var n=_slicedToArray(e,4),a=n[0],o=n[1],i=n[2],d=n[3];return a=l(a,o,i,d,t[r+1],5,-165796510),d=l(d,a,o,i,t[r+6],9,-1069501632),i=l(i,d,a,o,t[r+11],14,643717713),o=l(o,i,d,a,t[r],20,-373897302),a=l(a,o,i,d,t[r+5],5,-701558691),d=l(d,a,o,i,t[r+10],9,38016083),i=l(i,d,a,o,t[r+15],14,-660478335),o=l(o,i,d,a,t[r+4],20,-405537848),a=l(a,o,i,d,t[r+9],5,568446438),d=l(d,a,o,i,t[r+14],9,-1019803690),i=l(i,d,a,o,t[r+3],14,-187363961),o=l(o,i,d,a,t[r+8],20,1163531501),a=l(a,o,i,d,t[r+13],5,-1444681467),d=l(d,a,o,i,t[r+2],9,-51403784),i=l(i,d,a,o,t[r+7],14,1735328473),[a,o=l(o,i,d,a,t[r+12],20,-1926607734),i,d]},p=function(e,t,r){var n=_slicedToArray(e,4),a=n[0],o=n[1],i=n[2],l=n[3];return a=d(a,o,i,l,t[r+5],4,-378558),l=d(l,a,o,i,t[r+8],11,-2022574463),i=d(i,l,a,o,t[r+11],16,1839030562),o=d(o,i,l,a,t[r+14],23,-35309556),a=d(a,o,i,l,t[r+1],4,-1530992060),l=d(l,a,o,i,t[r+4],11,1272893353),i=d(i,l,a,o,t[r+7],16,-155497632),o=d(o,i,l,a,t[r+10],23,-1094730640),a=d(a,o,i,l,t[r+13],4,681279174),l=d(l,a,o,i,t[r],11,-358537222),i=d(i,l,a,o,t[r+3],16,-722521979),o=d(o,i,l,a,t[r+6],23,76029189),a=d(a,o,i,l,t[r+9],4,-640364487),l=d(l,a,o,i,t[r+12],11,-421815835),i=d(i,l,a,o,t[r+15],16,530742520),[a,o=d(o,i,l,a,t[r+2],23,-995338651),i,l]},_=function(e,t,r){var n=_slicedToArray(e,4),a=n[0],o=n[1],i=n[2],l=n[3];return a=c(a,o,i,l,t[r],6,-198630844),l=c(l,a,o,i,t[r+7],10,1126891415),i=c(i,l,a,o,t[r+14],15,-1416354905),o=c(o,i,l,a,t[r+5],21,-57434055),a=c(a,o,i,l,t[r+12],6,1700485571),l=c(l,a,o,i,t[r+3],10,-1894986606),i=c(i,l,a,o,t[r+10],15,-1051523),o=c(o,i,l,a,t[r+1],21,-2054922799),a=c(a,o,i,l,t[r+8],6,1873313359),l=c(l,a,o,i,t[r+15],10,-30611744),i=c(i,l,a,o,t[r+6],15,-1560198380),o=c(o,i,l,a,t[r+13],21,1309151649),a=c(a,o,i,l,t[r+4],6,-145523070),l=c(l,a,o,i,t[r+11],10,-1120210379),i=c(i,l,a,o,t[r+2],15,718787259),[a,o=c(o,i,l,a,t[r+9],21,-343485551),i,l]},m=function(e){return function(e){return Array(4*e.length).fill(8).reduce((function(t,r,n){return t+String.fromCharCode(e[n*r>>5]>>>n*r%32&255)}),"")}(function(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var r=[s,u,p,_];return Array.from({length:Math.floor(e.length/16)+1},(function(e,t){return 16*t})).reduce((function(t,n){return r.reduce((function(t,r){return r(t,e,n)}),t.slice()).map((function(e,r){return a(e,t[r])}))}),[1732584193,-271733879,-1732584194,271733878])}((t=e,Array.from(t).map((function(e){return e.charCodeAt(0)})).reduce((function(e,t,r){var n=e.slice();return n[8*r>>5]|=(255&t)<<8*r%32,n}),[])),8*e.length));var t},f=function(e){return m(function(e){if("string"!=typeof e)throw new TypeError("parameter ‘unicodeString’ is not a string");var t=function(e){return e.charCodeAt(0)};return e.replace(/[\u0080-\u07ff]/g,(function(e){return String.fromCharCode(192|t(e)>>6,128|63&t(e))})).replace(/[\u0800-\uffff]/g,(function(e){return String.fromCharCode(224|t(e)>>12,128|t(e)>>6&63,128|63&t(e))}))}(e))},v=function(e){return t=f(e),r=function(e){return"0123456789abcdef".charAt(e)},Array.from(t).map((function(e){return e.charCodeAt(0)})).reduce((function(e,t){return e+r(t>>>4&15)+r(15&t)}),"");var t,r};function y(a,o){var i=["/com_dpcalendar/js/popper/popper.js"];o.resources?i.push("/com_dpcalendar/js/scheduler/scheduler.js"):i.push("/com_dpcalendar/js/fullcalendar/fullcalendar.js"),loadDPAssets(i,(function(){a.parentElement.parentElement.querySelector(".dp-loader").classList.add("dp-loader_hidden");var i,l=t(o),d=r(o);o.storageId=a.getAttribute("data-options")+"-calendar-state-"+(i=o.calendarIds.toString(),v(i)),function(e,n){var a=t(n),o=r(n);if(n.use_hash)for(var i=window.location.hash.replace(/&/gi,"&").split("&"),l=0;l<i.length;l++)i[l].match("^#year")&&(n.year=i[l].substring(6)),i[l].match("^month")&&(n.month=i[l].substring(6)),i[l].match("^day")&&(n.date=i[l].substring(4)),i[l].match("^view")&&(n.initialView=i[l].substring(5));n.initialDate=new Date(n.year+"-"+DPCalendar.pad(parseInt(n.month),2)+"-"+DPCalendar.pad(n.date,2)),n.timeZone=Joomla.getOptions("DPCalendar.timezone"),n.initialView=a[n.initialView],document.body.clientWidth<n.screen_size_list_view&&"day"!=o[n.initialView]&&-1!==n.headerToolbar.right.indexOf("list")&&(n.initialView=a.list),n.schedulerLicenseKey="GPL-My-Project-Is-Open-Source",n.eventDisplay="block",n.progressiveEventRendering=!1,n.weekNumberTitle="",n.weekNumberFormat={week:"numeric"},n.moreLinkContent=Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_MORE"),n.allDayContent=Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_ALL_DAY"),n.buttonHints={next:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_TOOLBAR_NEXT"),prev:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_TOOLBAR_PREVIOUS")},n.buttonText={today:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_TOOLBAR_TODAY"),year:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_YEAR"),month:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_MONTH"),week:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_WEEK"),day:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_DAY"),list:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_LIST")},n.listTexts={until:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_UNTIL"),past:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_PAST"),today:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_TODAY"),tomorrow:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_TOMORROW"),thisWeek:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_THIS_WEEK"),nextWeek:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_NEXT_WEEK"),thisMonth:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_THIS_MONTH"),nextMonth:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_NEXT_MONTH"),future:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_FUTURE"),week:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_VIEW_TEXTS_WEEK")},n.buttonHints={prev:()=>Joomla.Text._("COM_DPCALENDAR_PREVIOUS"),next:()=>Joomla.Text._("COM_DPCALENDAR_NEXT"),today:()=>Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_TOOLBAR_TODAY")}}(0,o),function(e,t){t.eventDragStart=function(e){e.el._tippy&&e.el._tippy.destroy()},t.eventDrop=function(e){if(e.event.resourceId)return e.revert(),!1;DPCalendar.request("task=event.move&Itemid="+Joomla.getOptions("DPCalendar.itemid"),(function(t){if(t.data.url&&e.event.setProp("url",t.data.url),t.data.description&&e.event.setExtendedProp("description",t.data.description),t.success)if(null!=t.messages){for(var r in t.messages)if("message"!=r)return void e.revert()}else e.revert();else e.revert()}),"id="+e.event.id+"&minutes="+dayjs.duration(e.delta).asMinutes()+"&allDay="+e.event.allDay)},t.eventResize=function(e){e.el._tippy&&e.el._tippy.destroy(),DPCalendar.request("task=event.move&Itemid="+Joomla.getOptions("DPCalendar.itemid"),(function(t){if(t.data.url&&e.event.setProp("url",t.data.url),t.data.description&&e.event.setExtendedProp("description",t.data.description),t.success)if(null!=t.messages){for(var r in t.messages)if("message"!=r)return void e.revert()}else e.revert();else e.revert()}),"id="+e.event.id+"&minutes="+dayjs.duration(e.endDelta).asMinutes()+"&onlyEnd=1&allDay="+e.event.allDay)}}(0,o),function(e,r){var a=t(r);r.eventClick=function(t){t.jsEvent.preventDefault(),t.jsEvent.currentTarget._tippy&&t.jsEvent.currentTarget._tippy.hide(),2!=r.show_event_as_popup&&(1!=r.show_event_as_popup?window.location=DPCalendar.encode(t.event.url):DPCalendar.modal(t.event.url,r.popupWidth,r.popupHeight,(function(r){r.contentWindow.location.href.indexOf("view=form")>0&&DPCalendar.request("index.php?option=com_dpcalendar&task=event.checkin&e_id="+t.event.id+"&"+Joomla.getOptions("csrf.token")+"=1");var n=r.contentDocument||r.contentWindow.document;!n.getElementById("system-message-container")||n.getElementById("system-message-container").children.length<1||e.dpCalendar.refetchEvents()})))},r.dateClick=function(t){if(0!=r.event_create_form){var o=e.parentElement.querySelector(".dp-quickadd .dp-form"),i=dayjs.utc(t.date);if(o){t.jsEvent.preventDefault(),o.querySelector("input[name=urlhash]").value=window.location.hash,t.view.type==a.month&&(i=(i=i.hour(8)).minute(0));var l=o.querySelector("#jform_start_date");l.value=i.format(l.getAttribute("data-format")),l.actualDate=l.value,l.setAttribute("data-date",i.format("YYYY-MM-DD")),l.dpPikaday.setDate(i.format("YYYY-MM-DD HH:mm")),(l=o.querySelector("#jform_start_date_time")).value=i.format(l.getAttribute("data-format")),l.actualDate=l.value,i=i.add(1,"hours");var d=o.querySelector("#jform_end_date");if(d.value=i.format(d.getAttribute("data-format")),d.actualDate=d.value,d.setAttribute("data-date",i.format("YYYY-MM-DD")),d.dpPikaday.setDate(i.format("YYYY-MM-DD HH:mm")),(d=o.querySelector("#jform_end_date_time")).value=i.format(d.getAttribute("data-format")),d.actualDate=d.value,t.resource){var c=t.resource.id.split("-");o.querySelector('input[name="jform[location_ids][]"]').value=[c[0]],c.length>1&&(o.querySelector('input[name="jform[rooms][]"]').value=[t.resource.id])}1==r.event_create_form&&window.innerWidth>600?(o.parentElement.style.display="block",t.jsEvent.target.dpPopper||(t.jsEvent.target.dpPopper=Popper.createPopper(t.jsEvent.target,o.parentElement,{onFirstUpdate:function(e){return e.elements.popper.querySelector("#jform_title").focus()}})),t.jsEvent.target.dpPopper.forceUpdate()):(o.querySelector("input[name=task]").value="",o.submit())}else r.headerToolbar.right.indexOf(a.day)>0&&n(t.date,"day",r,e)}},document.body.addEventListener("click",(function(e){return!(e.target&&e.target.closest(".dp-event-tooltip__action-delete")&&!confirm(Joomla.Text._("COM_DPCALENDAR_CONFIRM_DELETE"))&&(e.preventDefault(),1))}))}(a,o),function(e,t){t.customButtons={},t.headerToolbar.left.indexOf("datepicker")&&(t.customButtons.datepicker={text:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_SHOW_DATEPICKER"),icon:"icon-calendar",click:function(){loadDPAssets(["/com_dpcalendar/js/pikaday/pikaday.js","/com_dpcalendar/css/pikaday/pikaday.css"],(function(){var a=e.querySelector(".fc-datepicker-button"),o=a.querySelector("input");if(!o){(o=document.createElement("input")).setAttribute("type","hidden"),o.id="datepicker-input",a.appendChild(o);var i=Joomla.getOptions("DPCalendar.calendar.names");o.dpPicker=new Pikaday({field:o,trigger:a,firstDay:t.firstDay,i18n:{months:i.monthNames,weekdays:i.dayNames,weekdaysShort:i.dayNamesShort},onSelect:function(a){n(new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0)),r(t)[e.dpCalendar.view.type],t,e)}})}o.dpPicker.show()}))}}),t.headerToolbar.left.indexOf("print")&&(t.customButtons.print={text:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_TOOLBAR_PRINT"),icon:"icon-print",click:function(){var e=window.open();loadDPAssets(["/com_dpcalendar/js/domurl/url.js"],(function(){var r=new Url;r.query.layout="print"+(t.resources?"timeline":""),r.query.tmpl="component",e.location.href=r.decode(r.toString()),e.focus()}))}}),t.headerToolbar.left.indexOf("add")&&t.event_create_url&&(t.customButtons.add={text:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_TOOLBAR_ADD"),icon:"icon-add",click:function(){return location.href=t.event_create_url+"&urlhash="+encodeURIComponent(window.location.hash)}}),t.headerToolbar.left.indexOf("fullscreen")&&(t.customButtons.fullscreen_open={icon:"icon-fullscreen",text:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_TOOLBAR_FULLSCREEN_OPEN"),click:function(){document.querySelector(".com-dpcalendar-calendar").requestFullscreen(),document.querySelector(".fc-fullscreen_open-button").style.setProperty("display","none","important"),document.querySelector(".fc-fullscreen_close-button").style.setProperty("display","inherit","important")}},t.customButtons.fullscreen_close={icon:"icon-fullscreen",text:Joomla.Text._("COM_DPCALENDAR_VIEW_CALENDAR_TOOLBAR_FULLSCREEN_CLOSE"),click:function(){document.fullscreenElement&&document.exitFullscreen(),document.querySelector(".fc-fullscreen_open-button").style.setProperty("display","inherit","important"),document.querySelector(".fc-fullscreen_close-button").style.setProperty("display","none","important")}})}(a,o),function(e,n){if(n.use_hash){var a=t(n),o=r(n);window.addEventListener("hashchange",(function(){var t=new Date,r=t.getUTCFullYear(),i=t.getUTCMonth()+1,l=t.getUTCDate(),d=o[n.initialView];window.location.hash.replace(/&/gi,"&").split("&").forEach((function(e){e.match("^#year")&&(r=e.substring(6)),e.match("^month")&&(i=e.substring(6)-1),e.match("^day")&&(l=e.substring(4)),e.match("^view")&&(d=e.substring(5))}));var c=new Date(Date.UTC(r,i,l,0,0,0)),s=e.dpCalendar.getDate(),u=e.dpCalendar.view;c.getUTCFullYear()==s.getUTCFullYear()&&c.getUTCMonth()==s.getUTCMonth()&&c.getUTCDate()==s.getUTCDate()||e.dpCalendar.gotoDate(c),u.type!=a[d]&&e.dpCalendar.changeView(a[d])}))}}(a,o),function(t,r){t.dpEventMarkerSet=[],r.viewClassNames=function(){var e=t.parentElement.querySelector(".dp-map");DPCalendar.Map&&null!=e&&r.show_map&&(t.dpEventMarkerSet=[],DPCalendar.Map.clearMarkers(e))},r.eventContent=function(e){var t='<span class="dp-event__time">'+e.timeText+'</span><span class="dp-event__title">'+e.event.title+"</span>";return void 0!==e.event.extendedProps.capacity&&0!=e.event.extendedProps.capacity&&(t+='<span class="dp-event__capacity"><svg class="dp-event__capacity-icon"><use href="#dp-icon-users"/></svg>',t+='<span class="dp-event__capacity-text">',null===e.event.extendedProps.capacity?t+=Joomla.Text._("COM_DPCALENDAR_FIELD_CAPACITY_UNLIMITED"):t+=e.event.extendedProps.capacity_used+"/"+e.event.extendedProps.capacity,t+="</span>",t+="</span>"),"list"==e.view.type&&(t='<a href="'+e.event.url+'">'+t+"</a>"),{html:t}},r.eventDidMount=function(e){e.event.view_class&&e.el.classList.add(e.event.view_class),"list"!=e.view.type&&(e.el.style.fill=e.event.textColor);var n=e.event.extendedProps.description;if(n&&(n=(n=n.replace("task=event.delete","task=event.delete&urlhash="+encodeURIComponent(window.location.hash))).replace("task=event.edit","task=event.edit&urlhash="+encodeURIComponent(window.location.hash)),!e.isMirror)){var a=[e.el];e.el.classList.contains("fc-bg-event")&&a.push(e.el.closest(".fc-day").querySelector(".fc-daygrid-day-number")),loadDPAssets(["/com_dpcalendar/js/tippy/tippy.js","/com_dpcalendar/css/tippy/tippy.css"],(function(){document.createElement("div").innerHTML=n,tippy(a,{interactive:!0,delay:100,arrow:!0,content:n,allowHTML:!0,ignoreAttributes:!0,appendTo:document.body,theme:"light",touch:!1,onShow:function(e){return e.popper.querySelector('div[role="tooltip"]').classList.add("show")},popperOptions:{modifiers:[{name:"preventOverflow",enabled:!1},{name:"hide",enabled:!1}]}})}))}var o=t.parentElement.querySelector(".dp-map");DPCalendar.Map&&null!=o&&r.show_map&&e.event.extendedProps.location&&e.event.extendedProps.location.forEach((function(r){if(!t.dpEventMarkerSet[e.event.id+" "+r.latitude+" "+r.longitude]){var a=JSON.parse(JSON.stringify(r));a.title=e.event.title,a.color=e.event.backgroundColor,e.event.url&&n&&(n=n.replace(e.event.title,'<a href="'+e.event.url+'">'+e.event.title+"</a>")),a.description=n,t.dpEventMarkerSet[e.event.id+" "+r.latitude+" "+r.longitude]=a,DPCalendar.Map.createMarker(o,a)}}))},r.eventDataTransform=function(e){if(e.allDay){var t=dayjs(e.end);t=t.add(1,"day"),e.end=t.format("YYYY-MM-DD")}return e},r.loading=function(e){e?t.parentElement.parentElement.querySelector(".dp-loader").classList.remove("dp-loader_hidden"):t.parentElement.parentElement.querySelector(".dp-loader").classList.add("dp-loader_hidden")},r.eventSources=[],e(0,r,DPCalendar).forEach((function(e,t){r.eventSources[t]={id:e,events:function(t,n){DPCalendar.request(r.requestUrlRoot+"&ids="+e+"&date-start="+t.startStr+"&date-end="+t.endStr,(function(e){return n(e.data)}),null,!1,"GET")}}}))}(a,o),function(t,r,n){var a=e(0,r),o=t.parentElement,i=o.querySelector(".com-dpcalendar-calendar__toggle, .com-dpcalendar-calendar-timeline__toggle");i&&i.addEventListener("click",(function(){n.slideToggle(o.querySelector(".com-dpcalendar-calendar__list, .com-dpcalendar-calendar-timeline__list"),(function(e){if(!e)return o.querySelector('[data-direction="up"]').classList.add("dp-toggle_hidden"),void o.querySelector('[data-direction="down"]').classList.remove("dp-toggle_hidden");o.querySelector('[data-direction="up"]').classList.remove("dp-toggle_hidden"),o.querySelector('[data-direction="down"]').classList.add("dp-toggle_hidden")}))}));var l=[].slice.call(t.parentElement.querySelectorAll(".com-dpcalendar-calendar__calendars .dp-calendar__input, .com-dpcalendar-calendar-timeline__calendars .dp-calendar__input"));l.forEach((function(e){a.forEach((function(t){t==e.value&&(e.checked=!0)})),e.addEventListener("click",(function(e){var o=e.target,i=o.value;o.checked?(t.dpCalendar.addEventSource({id:i,events:function(e,t){n.request(r.requestUrlRoot+"&ids="+i+"&date-start="+e.startStr+"&date-end="+e.endStr,(function(e){return t(e.data)}),null,!1)}}),a.push(i)):(t.dpCalendar.getEventSources().forEach((function(e){e.id==i&&e.remove()})),a.forEach((function(e,t){e==i&&a.splice(t,1)}))),localStorage.setItem(r.storageId,JSON.stringify(a))}))}));var d=document.querySelector(".com-dpcalendar-calendar__list-toggle-input, .com-dpcalendar-calendar-timeline__list-toggle-input");d&&d.addEventListener("click",(function(){l.forEach((function(e){e.checked!==d.checked&&(e.checked=!d.checked,e.click())}))}))}(a,o,DPCalendar);var c=Joomla.getOptions("DPCalendar.calendar.names");dayjs.updateLocale("en",{months:c.monthNames,monthsShort:c.monthNamesShort,weekdays:c.dayNames,weekdaysShort:c.dayNamesShort,weekdaysMin:c.dayNamesMin});var s=o.views;if(o.views={},Object.keys(s).forEach((function(e){var t=s[e].titleFormat;s[e].titleFormat=function(r){return"list"==e||"week"==e||"resweek"==e?dayjs(r.start.array).format(t)+" - "+dayjs(r.end.array).format(t):dayjs(r.start.array).format(t)},o.views[l[e]]=s[e],s[e].slotDuration&&s[e].slotDuration.indexOf("{")>-1&&(s[e].slotDuration=JSON.parse(s[e].slotDuration)),s[e].slotLabelInterval&&s[e].slotLabelInterval.indexOf("{")>-1&&(s[e].slotLabelInterval=JSON.parse(s[e].slotLabelInterval))})),o.headerToolbar.right){var u="";o.headerToolbar.right.split(",").forEach((function(e,t){u+=(0!=t?",":"")+l[e]})),o.headerToolbar.right=u}o.datesSet=function(e){o.use_hash&&n(a.dpCalendar.getDate(),d[e.view.type],o,a),function(e){var t=function(t,r){var n=e.parentElement.querySelector(".dp-icon_"+t),a=e.parentElement.querySelector(".fc-"+r+"-button .fc-icon");null!==n&&null!==a&&(a.innerHTML=n.outerHTML)};t("angle-left","prev"),t("angle-right","next"),t("calendar-days","datepicker"),t("up-right-and-down-left-from-center","fullscreen_open"),t("down-left-and-up-right-to-center","fullscreen_close"),t("print","print"),t("plus","add")}(a)};var p=new FullCalendar.Calendar(a,o);a.dpCalendar=p,p.render(),a.dispatchEvent(new CustomEvent("dp-calendar-loaded",{detail:{calendar:p}}))}))}[].slice.call(document.querySelectorAll(".dp-calendar")).forEach((function(e){e.getAttribute("data-options")&&loadDPAssets(["/com_dpcalendar/js/dayjs/dayjs.js","/com_dpcalendar/js/dpcalendar/dpcalendar.js"],(function(){return y(e,Joomla.getOptions(e.getAttribute("data-options")))}))}))}();