1(()=>{"use strict";var e,t={5920:(e,t,n)=>{n.d(t,{AU:()=>l,Ic:()=>s,on:()=>c,qY:()=>i});const r="newspack-ras",i={reader:"reader",data:"data",activity:"activity",overlay:"overlay",segment:"segment",session:"session"},o=Object.values(i);function a(e){return o.includes(e)?`${r}-${e}`:""}function s(e,t){if(!(e=a(e)))throw new Error("Invalid event");window.dispatchEvent(new CustomEvent(e,{detail:t}))}function c(e,t){if(!(e=a(e)))throw new Error("Invalid event");window.addEventListener(e,t)}function l(e,t){if(!(e=a(e)))throw new Error("Invalid event");window.removeEventListener(e,t)}},8621:(e,t,n)=>{n.d(t,{M_:()=>g,OO:()=>y});var r=n(4916),i=n(5325),o=n(5920),a=n(2952),s=n(6500),c=n(4907),l=n(8905),u=n(3497),d=n(1026),f=n(5547),p=n(8330),w=n(6525);window.newspack_ras_config=window.newspack_ras_config||{};const g=(0,r.A)();function h(e,t,n=0){const r={action:e,data:t,timestamp:n||Date.now()};return g.add("activity",r),(0,o.Ic)(o.qY.activity,r),r}function m(e){const t=g.get("activity")||[];return e?t.filter(t=>t.action===e):t}function _(e){if(!e)return;const t=y();t.email=e,g.set("reader",t,!1),(0,o.Ic)(o.qY.reader,t)}function v(e=!0){const t=g.get("reader")||{};if(!t.email)throw new Error("Reader email not set");t.authenticated=Boolean(e),g.set("reader",t,!1),(0,o.Ic)(o.qY.reader,t)}function y(){return g.get("reader")||{}}const b=["pwd","link"];function k(){return(0,a.Ri)("np_otp_hash")}const A="newspack_otp_timer";function S(){localStorage.removeItem(A)}const E={store:g,overlays:s.A,segments:c.A,on:o.on,off:o.AU,dispatchActivity:h,getActivities:m,getUniqueActivitiesBy:function(e,t){const n=m(e),r=[],i={};for(const e of n){const n="function"==typeof t?t(e):e.data[t];i[n]||(r.push(e),i[n]=!0)}return r},setReaderEmail:_,setAuthenticated:v,refreshAuthentication:function(){const e=(0,a.Ri)("np_auth_reader");e?(_(e),v(!0)):_((0,a.Ri)("np_auth_intention"))},getReader:y,openNewslettersSignupModal:function(e={}){e={onSuccess:null,onDismiss:null,onError:null,initialState:null,skipSuccess:!1,labels:{},content:null,closeOnSuccess:!0,...e},E?._openNewslettersSignupModal?E._openNewslettersSignupModal(e):(console.warn("Newsletters signup modal not available"),e?.onError&&"function"==typeof e.onError&&e.onError())},hasAuthLink:function(){const e=y(),t=(0,a.Ri)("np_otp_hash");return!(!e?.email||!t)},getOTPHash:k,setOTPTimer:function(){localStorage.setItem(A,Math.floor(Date.now()/1e3))},clearOTPTimer:S,getOTPTimeRemaining:function(){const e=localStorage.getItem(A);if(!e)return 0;const t=newspack_ras_config.otp_rate_interval-(Math.floor(Date.now()/1e3)-e);return t||S(),t>0?t:0},authenticateOTP:function(e){return new Promise((t,n)=>{const r=k(),i=y()?.email;return r?i?e?void fetch("",{method:"POST",headers:{Accept:"application/json"},body:new URLSearchParams({action:newspack_ras_config.otp_auth_action,email:i,hash:r,code:e})}).then(e=>e.json()).then(({success:e,message:r,data:o})=>{const a={...o,email:i,authenticated:!!e,message:r};v(!!e),e?t(a):n(a)}):n({message:"Invalid code"}):n({message:"You must provide an email"}):n({message:"Code has expired",expired:!0})})},setAuthStrategy:function(e){if(!b.includes(e))throw new Error("Invalid authentication strategy");return(0,a.TV)("np_auth_strategy",e),e},getAuthStrategy:function(){return k()?"otp":(0,a.Ri)("np_auth_strategy")},setPendingCheckout:i._,getPendingCheckout:i.m,debugLog:a.cY,register:function(e,t,n={}){const r=(newspack_ras_config?.frontend_registration_integrations||{})[t];if(!r)return Promise.reject(new Error("Unknown integration: "+t));if(!e||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return Promise.reject(new Error("Invalid email address."));if(!newspack_ras_config?.frontend_registration_url)return Promise.reject(new Error("Registration is not available."));const i={npe:e,integration_id:t,integration_key:r.key,first_name:n.first_name||"",last_name:n.last_name||"",metadata:n.metadata||{}},a=newspack_ras_config?.captcha_site_key,s=newspack_ras_config?.captcha_version;let c;if(a){if(!window.grecaptcha)return Promise.reject(new Error("reCAPTCHA is configured but not loaded."));c="v3"===s?new Promise(function(e,t){window.grecaptcha.ready(function(){window.grecaptcha.execute(a,{action:"integration_registration"}).then(e).catch(t)})}):s&&"v2"===s.substring(0,2)?new Promise(function(e,t){window.grecaptcha.ready(function(){var n;(n=a,new Promise(function(e,t){const r=document.createElement("div");r.style.display="none",document.body.appendChild(r);let i=!1;
1const o=setTimeout(function(){i||(i=!0,r.remove(),t(new Error("reCAPTCHA timed out.")))},3e4);function a(e,t){i||(i=!0,clearTimeout(o),r.remove(),e(t))}try{const i=window.grecaptcha.render(r,{sitekey:n,size:"invisible",isolated:!0,callback(t){a(e,t)},"error-callback"(){a(t,new Error("reCAPTCHA challenge failed."))},"expired-callback"(){a(t,new Error("reCAPTCHA token expired."))}});window.grecaptcha.execute(i)}catch(e){a(t,e)}})).then(e).catch(t)})}):Promise.resolve("")}else c=Promise.resolve("");return c.then(function(e){e&&(i["g-recaptcha-response"]=e);const t={"Content-Type":"application/json"},n=(0,w.C)();return n&&(t["X-WP-Nonce"]=n),fetch(newspack_ras_config.frontend_registration_url,{method:"POST",headers:t,credentials:"same-origin",body:JSON.stringify(i)})}).then(function(e){return e.json().then(function(t){if(!e.ok){const e=new Error(t.message||"Registration failed.");throw e.code=t.code,e}return t})}).then(function(n){const r=n.email||e,i={...g.get("reader")||{},email:r,authenticated:!0};return g.set("reader",i,!1),(0,o.Ic)(o.qY.reader,i),h("reader_registered",{email:r,integration_id:t,status:n.status||"created"}),n}).catch(function(n){throw h("reader_registration_failed",{email:e,integration_id:t,error:n.code||"network_error"}),n})},...newspack_ras_config.is_ras_enabled&&{openAuthModal:function(e={}){e={onSuccess:null,onDismiss:null,onError:null,initialState:null,skipSuccess:!1,skipNewslettersSignup:!1,labels:{signin:{title:window.newspack_reader_activation_labels.signin.title},register:{title:window.newspack_reader_activation_labels.register.title}},content:null,trigger:null,closeOnSuccess:!0,...e}
1,newspack_ras_config.is_logged_in?e.onSuccess&&"function"==typeof e.onSuccess&&e.onSuccess():(0,p.eK)(e)}}};function P(...e){e.forEach(e=>{Array.isArray(e)&&"string"==typeof e[0]?h(...e):"function"==typeof e?e(E):console.warn("Invalid newspackRAS.push argument",e)})}window.newspackRASInitialized||function(){const e=newspack_ras_config,t=e?.authenticated_email||(0,a.Ri)("np_auth_intention"),n=!!e?.authenticated_email,r=y(),i={email:t||r?.email,authenticated:n};r?.email===i?.email&&r?.authenticated===i?.authenticated||g.set("reader",i,!1),(0,o.Ic)(o.qY.reader,i),(0,l.Ay)(E),(0,f.A)(E),function(){const e=newspack_ras_config.cid_cookie;(0,a.Ri)(e)||(0,a.TV)(e,(0,a.ni)(12))}(),(0,u.A)(E),(0,d.A)(E),function(){if((0,a.Ri)("np_auth_reader"))return;const e=setInterval(()=>{const t=y(),n=(0,a.Ri)("np_auth_intention");if(n&&t.email!==n)_(n);else{const t=(0,a.Ri)("np_auth_reader");t&&(_(t),v(!0),(0,w.E)(),clearInterval(e))}},1e3)}(),function(){const e=(e,t="submit")=>{const n="FORM"===e.tagName?e:e.querySelector("form");n&&n.addEventListener(t,()=>{g.set("is_newsletter_subscriber",!0)})},t=[];document.querySelectorAll([".mc4wp-form",".newspack-subscribe-form"].join(",")).forEach(n=>{n.id.startsWith("gform_")&&n.hasAttribute("data-formid")?t.push(parseInt(n.getAttribute("data-formid"))):e(n)}),document.querySelectorAll([".newspack-newsletters-subscribe"].join(",")).forEach(t=>e(t,"newspack-newsletters-subscribe-success")),document.addEventListener("gform/post_render",e=>{window.gform?.utils?.addAsyncFilter&&t.includes(e.detail?.formId)&&gform.utils.addAsyncFilter("gform/submission/pre_submission",async e=>(g.set("is_newsletter_subscriber",!0),e))})}(),(newspack_reader_data?.reader_activity||[]).forEach(({action:e,data:t})=>h(e,t)),function(){const e=e=>e.trim().toLowerCase().replace(/^www\./,""),t=document.referrer?e(new URL(document.referrer).hostname):"";t&&t!==e(window.location.hostname)?g.set("referrer",t):g.set("referrer","")}(),window.newspackReaderActivation=E,window.newspackRAS=window.newspackRAS||[],window.newspackRAS.forEach(e=>P(e)),window.newspackRAS.push=P,g.rehydrate(),window.newspackRASInitialized=!0}()}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e](o,o.exports,r),o.loaded=!0,o.exports}r.m=t,e=[],r.O=(t,n,i,o)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,i,o]=e[u],s=!0,c=0;c<n.length;c++)(!1&o||a>=o)&&Object.keys(r.O).every(e=>r.O[e](n[c]))?n.splice(c--,1):(s=!1,o<a&&(a=o));if(s){e.splice(u--,1);var l=i();void 0!==l&&(t=l)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,i,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.j=3619,(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=n[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={3619:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,o,[a,s,c]=n,l=0;if(a.some(t=>0!==e[t])){for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(c)var u=c(r)}for(t&&t(n);l<a.length;l++)o=a[l],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return r.O(u)},n=globalThis.webpackChunknewspack=globalThis.webpackChunknewspack||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i=r.O(void 0,[4223],()=>r(8621));i=r.O(i)})();
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.