!function(e){function t(a){if(r[a])return r[a].exports;var i=r[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=7)}([,,,,,,,function(e,t,r){"use strict";r(8),r(9);var a=r(10),i=function(e){return e&&e.__esModule?e:{default:e}}(a);!function(e){e(function(){window.ag_customiser||new i.default})}(jQuery)},function(e,t){},function(e,t){},function(e,t,r){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r=this.settings.age&&(t=!1),this.settings.ignore_logged&&this.isLoggedIn()&&(t=!1),"all"===this.settings.type&&this.settings.bypass&&(t=!1),"selected"!==this.settings.type||this.settings.restrict||(t=!1),this.settings.has_filter?jQuery.post(age_gate_params.ajaxurl,{action:"age_gate_filters",id:age_gate_params.misc.i,type:age_gate_params.misc.t},function(r){(t=r.show)&&e.show()}):t&&this.show()}},{key:"show",value:function(){jQuery("html").addClass("age-gate-restricted age-gate-js"),jQuery("body").addClass("age-restriction"),jQuery(this.template).prependTo("body"),!this.settings.rechallenge&&this.readCookie("age_gate_failed")&&(this.removeForm(),jQuery('.age-gate-error[data-error-field="no-rechallenge"]').html("

"+age_gate_params.errors.failed+"

").addClass("has-error").show()),this.settings.title&&(this.pageTitle=document.title,document.title=this.settings.title),this.cookiesAllowed()||jQuery(".age-gate-form").prepend('

'+age_gate_params.errors.cookies+"

"),jQuery(document).trigger("agegateshown")}},{key:"hide",value:function(){jQuery("body").removeClass("age-restriction"),jQuery("html").removeClass("age-gate-restricted age-gate-js"),jQuery(".age-gate-wrapper").remove()}},{key:"formSubmission",value:function(e){var t=this;e.preventDefault(),jQuery("body").addClass("age-gate-working");var r=jQuery(".age-gate-form").serialize();jQuery.post(age_gate_params.ajaxurl,r,function(e){jQuery("body").removeClass("age-gate-working"),"success"!==e.status?e.redirect?window.location.href=e.redirect:(t.clearErrors(),jQuery.each(e.messages,function(e,t){jQuery('.age-gate-error[data-error-field="'+e+'"]').html('

'+t+"

").addClass("has-error").show()}),e.message&&jQuery('.age-gate-error[data-error-field="no-rechallenge"]').html('

'+e.message+"

").addClass("has-error").show(),t.settings.rechallenge||"error"!==e.status||(t.setCookie("age_gate_failed",1),t.removeForm())):(t.setCookie("age_gate",Math.floor(e.age),e.remember,e.timescale),t.settings.title&&t.pageTitle&&(document.title=t.pageTitle),jQuery(document).trigger("agegatepassed"),t.hide())})}},{key:"clearErrors",value:function(){jQuery(".age-gate-error").html("").hide()}},{key:"removeForm",value:function(){jQuery(".age-gate-form").find(".age-gate-form-elements, .age-gate-remember-wrapper, input, button, .age-gate-challenge").remove()}},{key:"setCookie",value:function(e,t,r,a){var i="";if(r){var s=new Date;switch(a){case"hours":s.setTime(s.getTime()+60*r*60*1e3);break;case"minutes":s.setTime(s.getTime()+60*r*1e3);break;default:s.setTime(s.getTime()+24*r*60*60*1e3)}i="; expires="+s.toUTCString()}document.cookie=e+"="+t+i+"; path=/"}},{key:"isLoggedIn",value:function(){if(jQuery("body").hasClass("logged-in"))return!0}},{key:"readCookie",value:function(e){for(var t=e+"=",r=document.cookie.split(";"),a=0;a')}}}]),e}();t.default=s}]);