!function(){const o=window.navigator.userAgent;Object.entries({android:/android/i,iphone:/iPhone/i,ipad:/iPad/i}).forEach((([n,i])=>{o.match(i)&&document.body.classList.add(`tec-is-${n}`)}))}(),window.tec=window.tec||{},window.tec.common=window.tec.common||{},window.tec.common.userAgent={};; (()=>{const e=document.querySelectorAll(".coblocks-animate");if("IntersectionObserver"in window){const t=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(e.target.classList.add(e.target.dataset.coblocksAnimation),t.unobserve(e.target))}))}),{threshold:[.15]});e.forEach((e=>{t.observe(e)}))}else e.forEach((e=>{e.classList.remove("coblocks-animate"),delete e.dataset.coblocksAnimation}))})();; !function(){var t={30:function(){window.CTCTSupport={},function(t,e){e.init=function(){e.cache(),e.bindEvents()},e.cache=function(){e.cache={forms:[]};var t=document.querySelectorAll(".ctct-form-wrapper");t.length&&t.forEach(function(t){var n=t.querySelector("form");n&&e.cache.forms.push(n)}),e.cache.forms.forEach(function(t,n){e.cache.forms[n].honeypot=t.querySelector(".ctct_usage_field"),e.cache.forms[n].submitButton=t.querySelector("input[type=submit]"),e.cache.forms[n].recaptcha=t.querySelector(".g-recaptcha")}),e.timeout=null},e.setAllInputsValid=function(){e.cache.forms.forEach(function(t){var e=t.querySelectorAll(".ctct-invalid");Array.from(e).forEach(function(t){t.classList.remove("ctct-invalid")})})},e.processError=function(t){if(void 0!==t.id){var e=document.querySelectorAll("#"+t.id);Array.from(e).forEach(function(t){t.classList.add("ctct-invalid")})}},e.checkHoneypot=function(t,e,n){02&&void 0!==arguments[2]?arguments[2]:"",c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"log",r=t.parentElement;r.querySelector("p.ctct-message")&&r.querySelector("p.ctct-message").remove();var o=document.createElement("p");o.setAttribute("class","ctct-message "+n),o.setAttribute("role",c),o.innerHTML=e;var a=document.createElement("button");a.setAttribute("class","button button-secondary ctct-dismiss ctct-dismiss-ajax-notice"),a.setAttribute("aria-label","Dismiss notification"),a.innerHTML="✕",o.prepend(a),t.parentElement.prepend(o),r.querySelector(".ctct-dismiss-ajax-notice").addEventListener("click",function(){this.parentElement.remove()})},e.submitForm=function(n){var c=new FormData,r=new FormData(n),o=new URLSearchParams(r);c.append("action","ctct_process_form"),c.append("data",o);var a={method:"POST",body:c};fetch(t.ajaxurl,a).then(function(t){return t.json()}).then(function(t){return void 0!==t.status&&("success"!==t.status?(void 0!==t.errors?(e.setAllInputsValid(),t.errors.forEach(e.processError)):e.showMessage(n,t.message,"ctct-error","alert"),!1):(n.style.display="none",e.showMessage(n,t.message,"ctct-success","status"),void n.reset()))})},e.handleSubmission=function(t,n){if(!e.validateSubmission(n))return!1;clearTimeout(e.timeout),n.checkValidity()&&(e.timeout=setTimeout(e.submitForm,500,n))},e.bindEvents=function(){e.cache.forms.forEach(function(t){t.querySelector("[type=submit]").addEventListener("click",function(n){var c=t.getAttribute("data-doajax");c&&"on"===c&&(n.preventDefault(),e.handlerecaptcha(t)),t.classList.contains("ctct-submitted")||(t.classList.add("ctct-submitted"),e.handleSubmission(n,t),t.classList.remove("ctct-submitted"))}),t.honeypot.addEventListener("change",function(n){e.checkHoneypot(n,t.honeypot,t.submitButton)}),t.honeypot.addEventListener("keyup",function(n){e.checkHoneypot(n,t.honeypot,t.submitButton)})})},e.handlerecaptcha=function(t){"undefined"!=typeof recaptchav3&&void 0!==recaptchav3.site_key&&"undefined"!=typeof grecaptcha&&grecaptcha.ready(function(){try{grecaptcha.execute(recaptchav3.site_key,{action:"constantcontactsubmit"}).then(function(e){var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","g-recaptcha-response"),n.setAttribute("value",e),t.append(n.cloneNode(!0))})}catch(t){console.log(t)}})},e.init()}(window,window.CTCTSupport)}},e={};function n(c){var r=e[c];if(void 0!==r)return r.exports;var o=e[c]={exports:{}};return t[c](o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var c in e)n.o(e,c)&&!n.o(t,c)&&Object.defineProperty(t,c,{enumerable:!0,get:e[c]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";n(30)}()}(); //# sourceMappingURL=ctct-plugin-frontend.min.js.map; /** * File primary-navigation.js. * * This files only gets added to themes that support the mobile nav on side */ ( function() { /** * Menu Toggle Behaviors * * @param {Element} element */ var navMenu = function ( buttonId, inputId ) { var wrapper = document.body; var toggleButton = document.getElementById( buttonId ); var toggleInput = document.getElementById( inputId ); if ( toggleButton ) { toggleButton.onclick = function() { if ( true == toggleInput.checked ) { wrapper.classList.remove( 'lock-scrolling' ); } else { wrapper.classList.add( 'lock-scrolling' ); } toggleButton.focus(); } } document.addEventListener( 'click', function( event ) { // If target onclick is with # within the href attribute if ( event.target.hash && event.target.hash.includes( '#' ) ) { wrapper.classList.remove( 'lock-scrolling' ); if (toggleInput) { toggleInput.checked = false; } // Wait 550 and scroll to the anchor. setTimeout(function () { var anchor = document.getElementById(event.target.hash.slice(1)); anchor.scrollIntoView(); }, 550); } } ); } window.addEventListener( 'load', function() { navMenu( 'toggle-menu', 'toggle' ); navMenu( 'toggle-cart', 'woocommerce-toggle' ); } ); } )();; (()=>{var e=[],t=!1,i=[],n=new Promise(e=>{"loading"!==document.readyState?e():window.addEventListener("DOMContentLoaded",()=>e())});function o(e,t){if("string"==typeof e)try{e=JSON.parse(e)}catch{return}if(t&&"function"==typeof t.postMessage)try{t.postMessage(JSON.stringify({type:"likesMessage",data:e}),"*")}catch{}}function s(){const t=[];document.querySelectorAll("div.jetpack-likes-widget-unloaded").forEach(i=>{if(!(e.indexOf(i.id)>-1)&&c(i)){e.push(i.id);var n,o=/like-(post|comment)-wrapper-(\d+)-(\d+)-(\w+)/.exec(i.id);o&&5===o.length&&(n={blog_id:o[2],width:i.width},"post"===o[1]?n.post_id=o[3]:"comment"===o[1]&&(n.comment_id=o[3]),n.obj_id=o[4],t.push(n))}}),t.length>0&&o({event:"initialBatch",requests:t},window.frames["likes-master"])}function a(){const e=document.querySelector("#likes-other-gravatars");if(e){e.style.display="none",e.setAttribute("aria-hidden","true");const t=e.__resizeHandler;t&&(window.removeEventListener("resize",t),delete e.__resizeHandler)}}function r(){var e;if(t){!function(){for(let e=i.length-1;e>=0;e--){const t=i[e];if(!c(t)){const n=t&&t.parentElement&&t.parentElement.parentElement;n.classList.remove("jetpack-likes-widget-loaded"),n.classList.remove("jetpack-likes-widget-loading"),n.classList.add("jetpack-likes-widget-unloaded"),i.splice(e,1),t.remove()}}}();var n=[...document.querySelectorAll("div.jetpack-likes-widget-unloaded")].filter(e=>c(e));n.length>0&&s();for(var o=0,a=n.length;o<=a-1;o++)(e=n[o].id)&&l(e)}else setTimeout(r,500)}function l(e){if(void 0===e)return;const t=document.querySelector("#"+e);t.querySelectorAll("iframe").forEach(e=>e.remove());const n=t.querySelector(".likes-widget-placeholder");if(n&&n.classList.contains("post-likes-widget-placeholder")){const e=document.createElement("iframe");e.classList.add("post-likes-widget","jetpack-likes-widget"),e.name=t.dataset.name,e.src=t.dataset.src,e.height="55px",e.width="100%",e.frameBorder="0",e.scrolling="no",e.title=t.dataset.title,n.after(e)}if(n.classList.contains("comment-likes-widget-placeholder")){const e=document.createElement("iframe");e.class="comment-likes-widget-frame jetpack-likes-widget-frame",e.name=t.dataset.name,e.src=t.dataset.src,e.height="18px",e.width="100%",e.frameBorder="0",e.scrolling="no",t.querySelector(".comment-like-feedback").after(e),i.push(e)}t.classList.remove("jetpack-likes-widget-unloaded"),t.classList.add("jetpack-likes-widget-loading"),t.querySelector("iframe").addEventListener("load",e=>{o({event:"loadLikeWidget",name:e.target.name,width:e.target.width},window.frames["likes-master"]),t.classList.remove("jetpack-likes-widget-loading"),t.classList.add("jetpack-likes-widget-loaded")})}function c(e){const t=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;return t+2e3>=0&&i<=window.innerHeight+2e3}window.addEventListener("message",function(e){let i=e&&e.data;if("string"==typeof i)try{i=JSON.parse(i)}catch{return}const r=i&&i.type,l=i&&i.data;if("likesMessage"!==r||void 0===l.event)return;if("https://widgets.wp.com"===e.origin)switch(l.event){case"masterReady":n.then(()=>{t=!0;const e={event:"injectStyles"},i=document.querySelector(".sd-text-color"),n=document.querySelector(".sd-link-color"),a=i&&getComputedStyle(i)||{},r=n&&getComputedStyle(n)||{};document.body.classList.contains("single")&&o({event:"reblogsEnabled"},window.frames["likes-master"]),e.textStyles={color:a.color,fontFamily:a["font-family"],fontSize:a["font-size"],direction:a.direction,fontWeight:a["font-weight"],fontStyle:a["font-style"],textDecoration:a["text-decoration"]},e.linkStyles={color:r.color,fontFamily:r["font-family"],fontSize:r["font-size"],textDecoration:r["text-decoration"],fontWeight:r["font-weight"],fontStyle:r["font-style"]},o(e,window.frames["likes-master"]),s()});break;case"showLikeWidget":case"showCommentLikeWidget":break;case"killCommentLikes":document.querySelectorAll(".jetpack-comment-likes-widget-wrapper").forEach(e=>e.remove());break;case"clickReblogFlair":wpcom_reblog&&"function"==typeof wpcom_reblog.toggle_reblog_box_flair&&wpcom_reblog.toggle_reblog_box_flair(l.obj_id);break;case"hideOtherGravatars":a();break;case"showOtherGravatars":{const e=document.querySelector("#likes-other-gravatars");if(!e)break;const t=e.querySelector("ul");e.style.display="none",t.innerHTML="",e.querySelectorAll(".likes-text span").forEach(e=>e.textContent=l.totalLikesLabel),(l.likers||[]).forEach(async(e,i)=>{if("http"!==e.profile_URL.substr(0,4))return;const n=document.createElement("li");t.append(n);const s=encodeURI(e.profile_URL),r=encodeURI(e.avatar_URL);n.innerHTML=`\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t`,n.classList.add(e.css_class),n.querySelector("img").alt=l.avatarAltTitle.replace("%s",e.name),n.querySelector("span").innerText=e.name,i===l.likers.length-1&&n.addEventListener("keydown",e=>{"Tab"!==e.key||e.shiftKey||(e.preventDefault(),a(),o({event:"focusLikesCount",parent:l.parent},window.frames["likes-master"]))})});const i=function(){const t="rtl"===getComputedStyle(e).direction,i=document.querySelector(`*[name='${l.parent}']`),n=i.getBoundingClientRect(),o=i.ownerDocument.defaultView,s=n.top+o.pageYOffset,a=n.left+o.pageXOffset;let r;if(e.style.top=s+l.position.top-1+"px",t){const t=l&&l.likers?Math.min(l.likers.length,5):0;r=a+l.position.left+24*t+4,e.style.transform="translateX(-100%)"}else r=a+l.position.left;e.style.left=r+"px",e.style.left="-9999px",e.style.display="block";const c=e.offsetWidth;r+c>o.innerWidth&&(r=n.right-c),e.style.left=r+"px",e.setAttribute("aria-hidden","false")};i(),e.focus();const n=function(e,t){var i;return function(){var n=this,o=arguments;clearTimeout(i),i=setTimeout(function(){e.apply(n,o)},t)}},s=n(i,100);e.__resizeHandler=s,window.addEventListener("resize",s),e.focus()}}}),document.addEventListener("click",a);var d,f,m,p=(d=250,f=r,function(){clearTimeout(m),m=setTimeout(f,d)});r(),window.addEventListener("scroll",p,!0)})();;