!function(){"use strict";var e={706:function(e,t,o){o.d(t,{default:function(){return i}}),e=o.hmd(e);const n={hookIntoPmcPiano:function(){const e=this;window.pmcPiano.callbacks.onInit({knownUser:()=>{e.setAuthenticatedUserId(),e.maybeRenderMyAccountPage(),e.maybeRenderPasswordResetPage()},unknownUser:()=>{e.maybeRenderMyAccountPage(),e.maybeRenderPasswordResetPage()}}).onLogin((()=>{e.setAuthenticatedUserId(),e.maybeRenderMyAccountPage(),e.maybeRenderPasswordResetPage()})).onLogout(e.maybeRenderMyAccountPage.bind(e)).onRegistration(e.onRegistration.bind(e)),window.tp.push(["addHandler","checkoutComplete",function(){/reader_id=amp/gi.exec(window.location.search)&&window.close()}]),window.tp.push(["addHandler","externalCheckoutComplete",function(){location.reload()}])},maybeRenderMyAccountPage:function(){const e=".js-subscription-my-account-component";document.querySelector(e)&&window.tp.myaccount.show({displayMode:"inline",containerSelector:e})},maybeRenderPasswordResetPage:function(){if(!document.querySelector(".js-subscription-password-reset-component"))return"password reset element missing";const e=window.location.search.match(/reset_token=([A-Za-z0-9]+)/);if(!e)return"invalid token";window.addEventListener("message",this.redirectHomeOnClosedMessage.bind(this)),window.tp.pianoId.show({resetPasswordToken:e[1],loggedIn:function(){window.location="/"}})},onRegistration:()=>{let e=!1;window.tp.push(["addHandler","checkoutClose",function(t){e||(e=!0,window.pmcPiano.piano.reRenderExperiences())}])},redirectHomeOnClosedMessage:function(e){if(!e.origin.endsWith("tinypass.com"))return!1;let t;try{t=JSON.parse(e.data)}catch(e){return!1}return!!(t.sender&&t.event&&t.sender.startsWith("piano-id")&&"closed"===t.event)&&(window.location="/",!0)},setAuthenticatedUserId:function(){const e=window.tp.pianoId.getUser(),t=window.blogherads||{};var o,n;(null===(n=null===(o=window.location)||void 0===o?void 0:o.search)||void 0===n?void 0:n.includes("pianoDebug"))&&console.log("PMC: Piano: ","wordPressThemes.setAuthenticatedUserId",e.uid),t.adq=t.adq||[],t.adq.push((function(){try{t.setAuthenticatedUserId(e.uid,"piano")}catch(e){}}))},registerStickyFooter:e=>{const t=window.pmcPiano.wordPressThemes;window.pmcPiano.callbacks.onInit({unknownUser:(()=>{const o=document.querySelector(e.className||".js-subscription-sticky-footer");if(!o)return;const n=document.getElementsByClassName(e.targetClassName||"footer"),i=()=>{const e=()=>{const e=window.scrollY,t=window.innerHeight,i=n[0].offsetTop;return e+t+("static"===o.style.position?o.clientHeight:0)>i};setTimeout(function(){this.stickyFooterPrevTime=this.stickyFooterPrevTime||Date.now(),this.stickyFooterPrevTime&&500>Date.now()-this.stickyFooterPrevTime||(this.stickyFooterPrevTime=Date.now(),e()||"fixed"===o.style.position?e()&&"static"!==o.style.position&&(o.style.position="static"):(o.style.position="fixed",o.style.bottom="0px"))}.bind(t),500)};i(),window.addEventListener("load",i),window.addEventListener("scroll",i),window.addEventListener("resize",i)}).bind(t)})}};n.hookIntoPmcPiano();var i=n;"undefined"!=typeof exports&&(e.exports=n)}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={id:n,loaded:!1,exports:{}};return e[n](s,s.exports,o),s.loaded=!0,s.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var n=o(706);(window.pmcPiano=window.pmcPiano||{}).wordPressThemes=n.default}();