1(()=>{"use strict";var e,t,r,n={59897(e,t,r){var n=r(72397),i=r(34357),o=r(712),a=r(16082),s=r(36267),c=r(50720);window.newspackRAS=window.newspackRAS||[],window.newspackRAS.push(function(e){const t=(e="otp",t={})=>{(0,i.eK)({skipAuthenticatedCheck:!0,skipNewslettersSignup:!0,backButtonClosesModal:!0,initialState:e,closeOnSuccess:!0,skipSuccess:!1,onClose:()=>window.location.reload(),...t})},r=()=>{(0,s.au)({onSuccess:()=>window.location.reload(),onDismiss:()=>window.location.reload(),closeOnSuccess:!0,signupMethod:"reader-registration"})},d=()=>{t("otp",{onClose:null,onSuccess:r,onDismiss:r})};(0,n.Qc)(function(){[...document.querySelectorAll(".newspack__reader-verification")].filter(e=>!e.querySelector(".newspack-ui__modal-container")).forEach(r=>{(0,c.$)(r,{url:reader_registration_block_config.verification_url,nonce:reader_registration_block_config.verification_nonce,errorText:reader_registration_block_config.verification_error,onSent:()=>{e.setOTPTimer(),t("otp")}})}),document.querySelectorAll(".newspack-registration").forEach(n=>{const i=n.querySelector("form");if(!i)return;let s=new FormData(i),c=!1;const l=n.querySelector(".newspack-registration__response"),p=i.querySelector('button[type="submit"]'),u=document.createElement("span");u.classList.add("spinner"),i.startLoginFlow=()=>{l.classList.add("newspack-registration--hidden"),l.innerHTML="",p.disabled=!0,p.appendChild(u),n.classList.add("newspack-registration--in-progress")},i.endLoginFlow=(a=null,g=500,f=null)=>{if(c)return;let h;if(f?.existing_user&&!f?.authenticated&&f?.action){const r=f.email||i.npe?.value;if(p.contains(u)&&p.removeChild(u),p.disabled=!1,n.classList.remove("newspack-registration--in-progress"),e.setReaderEmail(r),"otp"===f.action){if(e.getOTPHash())e.setOTPTimer(),t("otp");else{const n=new FormData;n.set("reader-activation-auth-form","1"),n.set("npe",r),n.set("action","link"),fetch(i.getAttribute("action")||window.location.pathname,{method:"POST",headers:{Accept:"application/json"},body:n}).then(r=>{200===r.status?(e.setOTPTimer(),t("otp")):t("signin")}).catch(()=>t("signin"))}return}return void t(f.action)}const m=!f?.existing_user&&newspack_ras_config.verify_new_reader_accounts&&!0!==f?.verified,_=n.querySelector(".newspack-registration__registration-success");if(_?.classList.add("newspack-registration--hidden"),a){h=document.createElement("p"),h.textContent=a;const e=_?.querySelector("p");e&&f?.sso&&e.replaceWith(h)}const w=200===g;if(n.classList.add("newspack-registration--"+(w?"success":"error")),w){if(c=!0,m||f?.existing_user||(i.remove(),_.classList.remove("newspack-registration--hidden")),f?.email&&(s=new FormData(i),e.setReaderEmail(f.email),e.setAuthenticated(f?.authenticated),m&&(f.verification_nonce&&(reader_registration_block_config.verification_nonce=f.verification_nonce),(0,o.F)({email:f.email,verificationNonce:reader_registration_block_config.verification_nonce,setOTPTimer:e.setOTPTimer,onSendCode:d,onDismiss:r})),f.authenticated&&!m)){const t={email:f.email},r=s.getAll("lists[]");s.has("newspack_popup_id")&&(t.newspack_popup_id=s.get("newspack_popup_id")),s.has("gate_post_id")&&(t.gate_post_id=s.get("gate_post_id")),f?.sso&&(t.sso=!0),r?.length&&e.dispatchActivity("newsletter_signup",{...t,newsletters_subscription_method:"reader-registration",lists:r}),f?.existing_user?e.dispatchActivity("reader_logged_in",{...t,login_method:f?.metadata?.login_method||"registration-block"}):e.dispatchActivity("reader_registered",{...t,registration_method:f?.metadata?.registration_method||"registration-block"})}}else h&&(l.appendChild(h),l.classList.remove("newspack-registration--hidden"));p.contains(u)&&p.removeChild(u),p.disabled=!1,n.classList.remove("newspack-registration--in-progress")},i.addEventListener("submit",e=>(e.preventDefault(),i.startLoginFlow(),i.npe?.value?(s=new FormData(i),s.has("npe")&&s.get("npe")?void(0,a.E)({email:s.get("npe"),onProceed:()=>{fetch(i.getAttribute("action")||window.location.pathname,{method:"POST",headers:{Accept:"application/json"},body:s}).then(e=>{e.json().then(({message:t,data:r})=>i.endLoginFlow(t,e.status,r)).catch(()=>i.endLoginFlow("An error occurred.",e.status||400))}).catch(e=>{i.endLoginFlow(e?.message||"An error occurred.",400)})},onCancel:()=>{c=!1,p.contains(u)&&p.removeChild(u),p.disabled=!1,n.classList.remove("newsp
1ack-registration--in-progress")}}):i.endLoginFlow("Please enter a valid email address.",400)):i.endLoginFlow("Please enter a valid email address.",400))),e.on("reader",({detail:e})=>{e.authenticated&&!c&&i.endLoginFlow(null,200,{existing_user:!0})})})})})},50720(e,t,r){function n({url:e,nonce:t}){const r=new FormData;return r.set("action","newspack_reader_registration_verification"),r.set("nonce",t),fetch(e,{method:"POST",headers:{Accept:"application/json"},body:r}).then(e=>{if(!e.ok)throw new Error(e.statusText);return e.json()}).then(e=>{if(!e?.success){const t="string"==typeof e?.data&&!!e.data,r=new Error(t?e.data:"Failed to send verification code.");throw r.isServerMessage=t,r}return e})}function i(e,{url:t,nonce:r,onSent:i,errorText:o}){const a=e?.querySelector("[data-send-otp]");if(!a||a.dataset.otpWired)return!1;a.dataset.otpWired="1";const s=t=>{a.disabled=!1,a.removeAttribute("aria-busy"),a.textContent=a.textContent.trim(),a.focus();const r=e.querySelector("[data-error-target]");if(!r)return;const n=t?.isServerMessage?t.message:o;n&&(r.textContent=n,r.hidden=!1)};return a.addEventListener("click",()=>{a.disabled=!0,a.setAttribute("aria-busy","true"),n({url:t,nonce:r}).then(()=>{"function"==typeof i&&!1===i()&&s()}).catch(s)}),!0}r.d(t,{$:()=>i,d:()=>n})}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return n[e](r,r.exports,o),r.loaded=!0,r.exports}o.m=n,e=[],o.O=(t,r,n,i)=>{if(!r){var a=1/0;for(l=0;l<e.length;l++){for(var[r,n,i]=e[l],s=!0,c=0;c<r.length;c++)(!1&i||a>=i)&&Object.keys(o.O).every(e=>o.O[e](r[c]))?r.splice(c--,1):(s=!1,i<a&&(a=i));if(s){e.splice(l--,1);var d=n();void 0!==d&&(t=d)}}return t}i=i||0;for(var l=e.length;l>0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[r,n,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var i=Object.create(null);o.r(i);var a={};t=t||[null,r({}),r([]),r(r)];for(var s=2&n&&e;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=r(s))Object.getOwnPropertyNames(s).forEach(t=>a[t]=()=>e[t]);return a.default=()=>e,o.d(i,a),i},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=2636,(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={2636:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var n,i,[a,s,c]=r,d=0;if(a.some(t=>0!==e[t])){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);if(c)var l=c(o)}for(t&&t(r);d<a.length;d++)i=a[d],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(l)},r=globalThis.webpackChunknewspack=globalThis.webpackChunknewspack||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=o.O(void 0,[4223],()=>o(59897));a=o.O(a)})();
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.