PageSourceSearch

https://communicateclearly.com/wp-content/plugins/wp-events-manage…//dist/js/frontend/events.min.js?ver=7.1.1

js communicateclearly.com collected 2026-09-24 13:57:28 UTC 4,859 bytes, 1 lines download raw bytes

1!function(e,t){"use strict";function n(e,n){for(;e&&e!==t;){if(e.matches(n))return e;e=e.parentElement}return null}function o(){return e.WPEMS||{}}function i(t){return new e.URLSearchParams(new e.FormData(t))}function r(e,t){e.querySelectorAll(t).forEach(function(e){e.remove()})}function a(e,t){e.insertAdjacentHTML("beforebegin",t)}function s(e){if(!e.ok)throw new Error("Request failed");return e}function c(e){return{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:e.toString()}}var l={init:function(){t.addEventListener("click",this.onClick.bind(this)),t.addEventListener("submit",this.onSubmit.bind(this)),this.sanitizeFormFields(),this.initCountdowns(),this.initCarousels()},onClick:function(e){var t=n(e.target,".event-load-booking-form");t&&(e.preventDefault(),this.loadFormRegister(t))},onSubmit:function(e){var t=e.target;if(t.matches("form.event_register:not(.active)"))return e.preventDefault(),void this.bookEventForm(t);t.matches("#event-lightbox .event-auth-form")&&(e.preventDefault(),this.ajaxLogin(t))},loadFormRegister:function(n){var i=o(),r=t.createElement("i"),a=new e.URLSearchParams;i.ajaxurl&&(r.className="event-icon-spinner2 spinner",n.appendChild(r),a.append("event_id",n.dataset.event||""),a.append("nonce",i.register_button||""),a.append("action","load_form_register"),e.fetch(i.ajaxurl,c(a)).then(s).then(function(e){return e.text()}).then(this.lightbox.bind(this)).catch(function(){e.alert(i.something_wrong||"Something went wrong.")}).finally(function(){r.remove()}))},bookEventForm:function(t){var n=o(),a=t.querySelector('button[type="submit"]');n.ajaxurl&&(r(t,".tp-event-notice"),a&&a.classList.add("event-register-loading"),t.classList.add("active"),e.fetch(n.ajaxurl,c(i(t))).then(s).then(function(e){return e.json()}).then(function(o){void 0!==o.status?!0===o.status&&o.url?e.location.href=o.url:(!0===o.status&&""===o.url&&o.event&&(l.closeLightbox(),l.showCartMessage(o.event)),o.message&&l.setMessage(t,o.message)):l.setMessage(t,n.something_wrong||"Something went wrong.")}).catch(function(){l.setMessage(t,n.something_wrong||"Something went wrong.")}).finally(function(){a&&a.classList.remove("event-register-loading"),t.classList.remove("active")}))},closeLightbox:function(){e.WPEMSModal&&"function"==typeof e.WPEMSModal.close&&e.WPEMSModal.close()},showCartMessage:function(n){var i=o();t.querySelectorAll(".woocommerce-message").forEach(function(e){e.hidden=!0}),e.setTimeout(function(){t.querySelectorAll(".entry-register, .event_register_foot").forEach(function(e){var o,r;e.insertAdjacentHTML("beforeend",'<div class="woocommerce-message">'+(i.woo_cart_url||"")+'<p>"'+(o=n,(r=t.createElement("div")).textContent=o||"",r.innerHTML+'"')+(i.add_to_cart||"")+"</p></div>")})},100)},setMessage:function(e,t){var n=e.querySelector(".event_register_foot");n&&n.insertAdjacentHTML("beforeend",'<div class="tp-event-notice error"><div class="event_auth_register_message_error">'+t+"</div></div>")},sanitizeFormFields:function(){t.querySelectorAll(".form-row.form-required input").forEach(function(e){e.dataset.wpemsValidated||(e.dataset.wpemsValidated="1",e.addEventListener("blur",function(){var t=n(e,".form-row");t&&t.classList.contains("form-required")&&(t.classList.toggle("has-error",""===e.value),t.classList.toggle("validated",""!==e.value))}))})},lightbox:function(n){var o=t.createElement("div");e.WPEMSModal&&"function"==typeof e.WPEMSModal.open&&(o.id="event-lightbox",o.innerHTML=n,e.WPEMSModal.open({content:o,mainClass:"event-lightbox-wrap",onOpen:function(){o.classList.add("event-fade"),e.requestAnimationFrame(function(){o.classList.add("event-in"),l.sanitizeFormFields()})}}))},ajaxLogin:function(n){var l=o(),u=n.querySelector("#wp-submit"),d=t.getElementById("event-lightbox");l.ajaxurl&&(d&&r(d,".tp-event-notice"),u&&u.classList.add("event-register-loading"),e.fetch(l.ajaxurl,c(i(n))).then(s).then(function(e){return e.json()}).then(function(t){t.notices&&a(n,t.notices),!0===t.status&&(t.redirect?e.location.href=t.redirect:e.location.reload())}).catch(function(){a(n,'<ul class="tp-event-notice error"><li>'+(l.something_wrong||"Something went wrong.")+"</li></ul>")}).finally(function(){u&&u.classList.remove("event-register-loading")}))}
1,initCountdowns:function(){var n=o();"function"==typeof e.WPEMSCountdown&&t.querySelectorAll(".tp_event_counter").forEach(function(t){new e.WPEMSCountdown(t,{labels:n.l18n?n.l18n.labels:null,labels1:n.l18n?n.l18n.labels1:null,serverSync:n.current_time,gmtOffset:n.gmt_offset})})},initCarousels:function(){"function"==typeof e.WPEMSCarousel&&t.querySelectorAll(".tp_event_owl_carousel").forEach(function(t){new e.WPEMSCarousel(t,{navigation:!0,slideSpeed:300,paginationSpeed:400,singleItem:!0})})}};t.addEventListener("DOMContentLoaded",function(){l.init()})}(window,document);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.