1(function(b){var g=window.moment;g.locale("en");const e=(new window.StecHelper).lang;window.StecRsvpToEvent=function(a){this.settings={popup:"#"+a,id:null,offset:null,event:null,glob:null,helper:null,layout:null,calData:null,$instance:null,update:!1,displayPrivacyAgreement:0,privacyAgreemntContent:""};this.temp={customFields:[]};this.blockAction=!1};var f=window.StecRsvpToEvent.prototype;f.set=function(a,b){"undefined"!==typeof this.settings[a]&&(this.settings[a]=b);return this};f.controller=function(){var a= 2this;b(document).on(this.settings.helper.clickHandle(),a.settings.popup+" .stec-rsvp-popup",function(a){a.stopPropagation()});b(document).on(this.settings.helper.clickHandle(),a.settings.popup+" .stec-rsvp-popup-button-cancel",function(b){b.stopPropagation();a.popClose()});b(document).on(this.settings.helper.clickHandle(),a.settings.popup+" .stec-rsvp-popup-button-close",function(b){a.popClose()});b(document).on(this.settings.helper.clickHandle(),a.settings.popup,function(b){a.popClose()});b(document).on(this.settings.helper.clickHandle(), 3a.settings.popup+" .stec-rsvp-popup-button-proceed",function(d){d.stopPropagation();!0===a.settings.update?a.updateRSVP():!1!==a.popFieldsValid()&&(1===parseInt(a.settings.glob.options.captcha.enabled,10)&&a.settings.glob.options.captcha.site_key?(a.popCaptcha.sitekey||(a.popCaptcha.sitekey=a.settings.glob.options.captcha.site_key),0>=b(".stec-rsvp-popup-wrapper-captcha-placeholder").children().length?a.popCaptcha.open(function(){!1!==a.popFieldsValid()&&!1!==a.popCaptcha.captchaValid&&a.sendRSVP()}): 4!0===a.popCaptcha.captchaValid&&a.sendRSVP()):(a.popCaptcha.captchaValid=!0,a.sendRSVP()))});b(document).on(this.settings.helper.clickHandle(),"#stec-layout-event-inner-"+a.settings.glob.options.id+" .stec-layout-event-inner-intro-rsvp",function(d){d.preventDefault();a.settings.id=b("#stec-layout-event-inner-"+a.settings.glob.options.id).data("eventId");a.settings.offset=b("#stec-layout-event-inner-"+a.settings.glob.options.id).data("repeatTimeOffset");a.settings.event=a.settings.calData.getEventById(a.settings.id); 5a.settings.date=g.tz(a.settings.event.start_date,a.settings.event.timezone).add(a.settings.offset,"seconds").format("YYYY-MM-DD");a.popOpen()});b(document).on(this.settings.helper.clickHandle(),this.settings.helper.getSelector(a.settings.$instance,".stec-layout-event-inner-intro-rsvp"),function(d){d.preventDefault();a.settings.id=b(this).parents(".stec-layout-event").first().data("id");a.settings.offset=b(this).parents(".stec-layout-event").first().data("repeat-time-offset");a.settings.event=a.settings.calData.getEventById(a.settings.id); 6a.settings.date=g.tz(a.settings.event.start_date,a.settings.event.timezone).add(a.settings.offset,"seconds").format("YYYY-MM-DD");a.popOpen()});b(document).on(this.settings.helper.clickHandle(),this.settings.helper.getSelector(a.settings.$instance,".stec-layout-grid-rsvp"),function(d){d.preventDefault();a.settings.id=b(this).parents(".stec-layout-grid-event").first().data("id");a.settings.offset=b(this).parents(".stec-layout-grid-event").first().data("repeat-time-offset");a.settings.event=a.settings.calData.getEventById(a.settings.id); 7a.settings.date=g.tz(a.settings.event.start_date,a.settings.event.timezone).add(a.settings.offset,"seconds").format("YYYY-MM-DD");a.popOpen()});b(document).on(this.settings.helper.clickHandle(),this.settings.helper.getSelector(a.settings.$instance,".stec-layout-single-rsvp"),function(b){b.preventDefault();a.settings.id=window.stecSingleEvent.id;a.settings.offset=window.stecSingleOptions.repeat_offset;a.settings.event=window.stecSingleEvent;a.settings.date=g.tz(a.settings.event.start_date,a.settings.event.timezone).add(a.settings.offset, 8"seconds").format("YYYY-MM-DD");a.popOpen()})};f.updateRSVP=function(){var a=this,d=new window.StecDB,c=d.newRequest(),h=b(a.settings.popup).find('.stec-rsvp-popup-wrapper-settings input[name="people"]').val().trim(),e,f;if(!h||isNaN(h))h=1;!0!==a.blockAction&&(c.setBefore(function(){a.blockAction=!0;b(a.settings.popup).find(".stec-rsvp-popup-wrapper-settings, .stec-rsvp-popup-wrapper-captcha").css("opacity",.3);b(a.settings.glob.template.preloader).appendTo(b(a.settings.popup).find(".stec-rsvp-popup-wrapper"))}), 9c.setData({action:"stec_public_ajax_action",task:"set_user_event_attendance",status:1,event_id:a.settings.id,date:a.settings.date,people:h}),c.setCallback(function(c){b(a.settings.popup).find(".stec-rsvp-popup-wrapper-settings, .stec-rsvp-popup-wrapper-captcha").css("opacity",1);b(a.settings.popup).find(".stec-preloader, .stec-layout-single-preloader").remove();b(a.settings.popup).find(".stec-rsvp-popup-wrapper-settings").hide();b(a.settings.popup).find(".stec-rsvp-popup-wrapper-captcha").hide(); 10b(a.settings.popup).find(".stec-rsvp-popup-wrapper-status span").text(c.msg);b(a.settings.popup).find(".stec-rsvp-popup-wrapper-status").show();b(a.settings.popup).find(".stec-rsvp-popup-button-cancel").hide();b(a.settings.popup).find(".stec-rsvp-popup-button-proceed").hide();b(a.settings.popup).find(".stec-rsvp-popup-button-close").show();a.blockAction=!1;1!==c.error?b(a.settings.event.attendance).each(function(){if(this.userid===a.settings.glob.options.userid)return this.status[a.settings.date]= 111,this.people=h,!1}):b(a.settings.popup).find(".stec-rsvp-popup-header i").attr("class","fa fa-exclamation");a.settings.layout?(a.settings.layout.set(),"modal"===a.settings.glob.options.general_settings.open_event_in&&(b("#stec-layout-event-inner-out-wrapper-"+a.settings.glob.options.id).remove(),b("body").removeClass("stec-no-scroll"))):(b(".stec-layout-single-rsvp").remove(),b(".stec-layout-single-attendance-buttons").children().removeClass("active"),b(".stec-layout-single-attendance-invited-buttons").children().removeClass("active"), 121!==c.error&&(f=b(".stec-layout-single").find(".stec-layout-single-attendance-attendee-avatar").filter('[data-userid="'+a.settings.glob.options.userid+'"]'),e=f.parent(),b(".stec-layout-single").find(".stec-layout-single-attendance-slots-count").text(c.slots_left),b(".stec-layout-single").find(".stec-layout-single-attendance-button-attend, .stec-layout-single-attendance-invited-buttons-attend").addClass("active"),f.find("li i").attr("class","fa fa-check"),e.find(".stec-layout-single-attendance-attendee-persons").show(), 13e.find(".stec-layout-single-attendance-attendee-persons span").text(h)))}),d.query(c))};f.sendRSVP=function(){var a=this,d=new window.StecDB,c=d.newRequest();if(!0!==a.blockAction){c.setBefore(function(){a.blockAction=!0;b(a.settings.popup).find(".stec-rsvp-popup-wrapper-settings, .stec-rsvp-popup-wrapper-captcha").css("opacity",.3);b(a.settings.glob.template.preloader).appendTo(b(a.settings.popup).find(".stec-rsvp-popup-wrapper"))});var e={action:"stec_public_ajax_action",task:"rsvp_to_event","g-recaptcha-response":b(a.settings.popup).find(".g-recaptcha-response").val(), 14event_id:a.settings.id,date:a.settings.date};b.each(b(a.settings.popup).find(".stec-rsvp-popup-wrapper-settings").find("input,textarea,select"),function(){e[b(this).attr("name")]=b(this).val().trim()});c.setData(e);c.setCallback(function(c){b(a.settings.popup).find(".stec-rsvp-popup-wrapper-settings, .stec-rsvp-popup-wrapper-captcha").css("opacity",1);b(a.settings.popup).find(".stec-preloader, .stec-layout-single-preloader").remove();b(a.settings.popup).find(".stec-rsvp-popup-wrapper-settings").hide(); 15b(a.settings.popup).find(".stec-rsvp-popup-wrapper-captcha").hide();b(a.settings.popup).find(".stec-rsvp-popup-wrapper-status span").text(c.msg);b(a.settings.popup).find(".stec-rsvp-popup-wrapper-status").show();b(a.settings.popup).find(".stec-rsvp-popup-button-cancel").hide();b(a.settings.popup).find(".stec-rsvp-popup-button-proceed").hide();b(a.settings.popup).find(".stec-rsvp-popup-button-close").show();a.blockAction=!1;1!==c.error?a.settings.event.attendance.push(c.data.attendee):b(a.settings.popup).find(".stec-rsvp-popup-header i").attr("class", 16"fa fa-exclamation");a.settings.layout?(a.settings.layout.set(),"modal"===a.settings.glob.options.general_settings.open_event_in&&(b("#stec-layout-event-inner-out-wrapper-"+a.settings.glob.options.id).remove(),b("body").removeClass("stec-no-scroll"))):b(".stec-layout-single-rsvp").remove()});d.query(c)}};f.popFieldsValid=function(){var a=!0;""===b('.stec-rsvp-popup-wrapper-settings input[name="name"]').val().trim()&&(a=!1);""===b('.stec-rsvp-popup-wrapper-settings input[type="email"]').val().trim()&& 17(a=!1);b(".stec-rsvp-popup-wrapper-settings input,select").filter("[required]:visible").each(function(){if(b(this).is(":checkbox")&&!1===b(this).prop("checked")||""===b(this).val().trim())return a=!1});return a};f.popHtml=function(){var a="",d=0,c=[],f="",g="",k=this.settings.calData?this.settings.calData.getEventById(this.settings.id):this.settings.glob.event;0<k.images_meta.length&&(a=k.images_meta[0].src);this.settings.glob.options.useremail&&(g=this.settings.glob.options.useremail,f=this.settings.glob.options.username); 18window.stecSingleEvent?(d=parseInt(b(".stec-layout-single-attendance-slots-count").text(),10),isNaN(d)&&(d=this.settings.helper.attendanceHasFreeSlots(k,this.settings.date))):d=this.settings.helper.attendanceHasFreeSlots(k,this.settings.date);c.push('<div id="'+this.settings.popup.replace("#","")+'" class="stec-rsvp-popup-background stec-modal">');c.push(' <div class="stec-rsvp-popup">');c.push(' <div class="stec-rsvp-popup-header" style="background-image:url('+a+')"><i class="far fa-envelope-open"></i></div>'); 19c.push(' <div class="stec-rsvp-popup-wrapper">');c.push(' <div class="stec-rsvp-popup-wrapper-captcha">');
19c.push(" <span>"+e("confirmhumanity")+"</span>");c.push(" <span>"+e("confirmhumanitydesc")+"</span>");c.push(' <div class="stec-rsvp-popup-wrapper-captcha-placeholder"></div>');c.push(" </div>");c.push(' <div class="stec-rsvp-popup-wrapper-settings">');c.push(" <span>"+e("rsvpToEvent")+ 20"</span>");9999>d&&c.push(' <span class="stec-rsvp-popup-places-left">'+e("Places left")+": "+d+"</span>");!1===this.settings.update&&(c.push(' <input type="text" name="name" placeholder="'+e("name")+'" value="'+f+'" />'),c.push(' <input type="email" name="email" placeholder="'+e("email")+'" value="'+g+'" />'),this.settings.$instance.trigger("stecOnRsvpAfterFields",this));c.push(' <input type="number" min="1" max="'+(0<d?d:100)+'" name="people" placeholder="'+ 21e("Number of Persons")+'" value="" />');try{this.temp.customFields&&!1===this.settings.update&&b.each(this.temp.customFields,function(){c.push(this)})}catch(l){console.log("Invalid custom fields",this.temp.customFields)}"1"===this.settings.displayPrivacyAgreement&&(c.push(' <label class="stec-rsvp-popup-checkbox">'),c.push(' <input type="checkbox" required />'),c.push(' <span class="stec-style-text">'+this.settings.privacyAgreemntContent+"</span>"),c.push(" </label>")); 22c.push(" </div>");c.push(" </div>");c.push(' <div class="stec-rsvp-popup-wrapper-status">');c.push(" <span></span>");c.push(" </div>");c.push(' <button class="stec-rsvp-popup-button-cancel" type="button">'+e("cancel")+"</button>");c.push(' <button class="stec-rsvp-popup-button-proceed" type="button">'+e("attend")+"</button>");c.push(' <button class="stec-rsvp-popup-button-close" type="button">'+e("close")+"</button>");c.push(" </div>"); 23c.push("</div>");return c.join("")};f.popOpen=function(){b("body").addClass("stec-modal-opened");b("#stec-layout-event-inner-out-wrapper-"+this.settings.glob.options.id).hide();b(this.popHtml()).appendTo("body")};f.popClose=function(){this.settings.id=null;this.settings.offset=null;this.settings.event=null;this.settings.date=null;this.blockAction=!1;b(this.settings.popup).remove();0>=b("body > .stec-modal").length&&b("body").removeClass("stec-modal-opened");b("#stec-layout-event-inner-out-wrapper-"+ 24this.settings.glob.options.id).show()};f.popCaptcha={sitekey:null,captchaValid:!1,open:function(a){var d=this;d.captchaValid=!1;b(".stec-rsvp-popup-wrapper-settings").hide();b(".stec-rsvp-popup-wrapper-captcha").show();window.grecaptcha.render(b(".stec-rsvp-popup-wrapper-captcha-placeholder").get(0),{sitekey:d.sitekey,callback:function(b){0!==b.length&&(d.captchaValid=!0,"function"===typeof a&&a())}})}}})(window.jQuery);
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.