(()=>{var e={553:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof w?t:w,a=Object.create(o.prototype),i=new L(r||[]);return a._invoke=function(e,t,n){var r=f;return function(o,a){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw a;return N()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=_(i,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?h:d,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",g={};function w(){}function m(){}function v(){}var y={};c(y,a,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(T([])));x&&x!==n&&r.call(x,a)&&(y=x);var k=v.prototype=w.prototype=Object.create(y);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(o,a,i,s){var c=l(e[o],e,a);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,s)}))}s(c.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function _(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,_(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},757:(e,t,n)=>{e.exports=n(553)},669:(e,t,n)=>{e.exports=n(609)},448:(e,t,n)=>{"use strict";var r=n(867),o=n(26),a=n(372),i=n(327),s=n(97),c=n(109),u=n(985),l=n(61),f=n(655),d=n(263);e.exports=function(e){return new Promise((function(t,n){var p,h=e.data,g=e.headers,w=e.responseType;function m(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(h)&&delete g["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(y+":"+b)}var x=s(e.baseURL,e.url);function k(){if(v){var r="getAllResponseHeaders"in v?c(v.getAllResponseHeaders()):null,a={data:w&&"text"!==w&&"json"!==w?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:r,config:e,request:v};o((function(e){t(e),m()}),(function(e){n(e),m()}),a),v=null}}if(v.open(e.method.toUpperCase(),i(x,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=k:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(k)},v.onabort=function(){v&&(n(l("Request aborted",e,"ECONNABORTED",v)),v=null)},v.onerror=function(){n(l("Network Error",e,null,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||f.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},r.isStandardBrowserEnv()){var S=(e.withCredentials||u(x))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;S&&(g[e.xsrfHeaderName]=S)}"setRequestHeader"in v&&r.forEach(g,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete g[t]:v.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),w&&"json"!==w&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){v&&(n(!e||e&&e.type?new d("canceled"):e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),h||(h=null),v.send(h)}))}},609:(e,t,n)=>{"use strict";var r=n(867),o=n(849),a=n(321),i=n(185);var s=function e(t){var n=new a(t),s=o(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return e(i(t,n))},s}(n(655));s.Axios=a,s.Cancel=n(263),s.CancelToken=n(972),s.isCancel=n(502),s.VERSION=n(288).version,s.all=function(e){return Promise.all(e)},s.spread=n(713),s.isAxiosError=n(268),e.exports=s,e.exports.default=s},263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:(e,t,n)=>{"use strict";var r=n(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(867),o=n(327),a=n(782),i=n(572),s=n(185),c=n(875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new a,response:new a}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var l=[i,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(a),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var f=e;n.length;){var d=n.shift(),p=n.shift();try{f=d(f)}catch(e){p(e);break}}try{o=i(f)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:(e,t,n)=>{"use strict";var r=n(793),o=n(303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},61:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},572:(e,t,n)=>{"use strict";var r=n(867),o=n(527),a=n(502),i=n(655),s=n(263);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},185:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function i(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function c(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||a,o=t(e);r.isUndefined(o)&&t!==c||(n[e]=o)})),n}},26:(e,t,n)=>{"use strict";var r=n(61);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},527:(e,t,n)=>{"use strict";var r=n(867),o=n(655);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},655:(e,t,n)=>{"use strict";var r=n(867),o=n(16),a=n(481),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(448)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(i)})),e.exports=u},288:e=>{e.exports={version:"0.24.0"}},849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},109:(e,t,n)=>{"use strict";var r=n(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:(e,t,n)=>{"use strict";var r=n(288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,i){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!a[r]&&(a[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,i)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],i=t[a];if(i){var s=e[a],c=void 0===s||i(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:o}},867:(e,t,n)=>{"use strict";var r=n(849),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,a){var i=t.apply(n,r);function s(t){e(i,o,a,s,c,"next",t)}function c(t){e(i,o,a,s,c,"throw",t)}s(void 0)}))}}var r=n(757),o=n.n(r);const a={debug:!!window.authentication_config.debug,sessionManagementEnabled:!!window.authentication_config&&"1"===window.authentication_config.sessionManagementEnabled,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.entitlements_config?window.entitlements_config.entitlementsEndpoint:"",entitlementsApiKey:window.entitlements_config?window.entitlements_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.entitlements_config&&window.entitlements_config.linaCheckOnArticles,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled};const i=function(){if(a.debug){for(var e,t=arguments.length,n=new Array(t),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i};function h(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(p(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return p(t)}}function g(e){this.message=e}g.prototype=new Error,g.prototype.name="InvalidTokenError";const w=function(e,t){if("string"!=typeof e)throw new g("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(h(e.split(".")[n]))}catch(e){throw new g("Invalid token specified: "+e.message)}},m="auth0_sub",v="_sp_uid",y="c_mId",b="cs_mId",x="mng-entitlements",k="__MNG_Session",S="isAuthenticatedSSOR",A="c_isLoggedOut";var _=function(){var e=window.location.href;return new URL(e)},E=function(e){for(var t="".concat(e,"="),n=decodeURIComponent(document.cookie).split(";"),r=0;r0&&void 0!==arguments[0]&&arguments[0],t=_(),n=t.hostname,r=n;e&&"string"==typeof e&&(r=e);var o=r.split(".");return"".concat(o[o.length-2],".").concat(o[o.length-1])},T=function(){var e=L();return".".concat(e)},N=function(e,t,n){var r="".concat(e,"=").concat(t,";");void 0!==n?(i("Setting cookie with options: ",n),Object.entries(n).forEach((function(e){var t=f(e,2),n=t[0],o=t[1];if("expires"===n){var a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3),r+="expires=".concat(a.toUTCString(),";")}else r+="".concat(n,"=").concat(o,";")}))):r+="path=/;",document.cookie=r},P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="".concat(e,"= ;expires= Thu, 01 Jan 1970 00:00:00 GMT;"),o=L(),a="www".concat(o),i=".www".concat(o),s=[o,a,i];n&&s.push(n),Object.entries(t).forEach((function(e){var t=f(e,2),n=t[0],o=t[1];r+="".concat(n,"=").concat(o,";")})),0===Object.keys(t).length&&(r+="path=/;"),document.cookie=r,s.forEach((function(e){document.cookie=r.concat("domain=",e,";")}))},I=function(e){return w(e)},O=function(){var e=E(y);e||(e=E(b));var t=E(v);return"string"==typeof(e=e||t)&&e.includes("-")&&(e=function(e){return e.split(",")[0]}(e)),e},R=function(){return"complete"===document.readyState},j=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(n){var r=!0;if(R())n();else{i("UIHandler: ","Waiting for the body to load...");var a=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e&&(r=R()),document.querySelector("body")&&r&&(clearInterval(a),n(!0));case 2:case"end":return t.stop()}}),t)}))),200)}}))},U=function(){return new Promise((function(e){void 0!==window.blueConicClient&&void 0!==window.blueConicClient.event&&void 0!==window.blueConicClient.event.subscribe?e():window.addEventListener("onBlueConicLoaded",(function(){e()}),!1)}))},M=function(){return new Promise((function(e,t){void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady?(i("Authentication already ready: ",window.MNGAuthentication.authenticationReady),e(window.MNGAuthentication.authenticationReady)):(i("Adding authenticationReady listener..."),window.addEventListener("authenticationReady",(function(n){try{var r=n.detail||{};i("Event: authentication ready: ",r),e(r)}catch(e){i(e),t(e)}}),!1))}))},G=function(){P(m),P(v),P(y),P(b);var e=C();e&&(P(y,{},e),P(b,{},e)),function(){i("Clearing entitlements...");try{P(x,{path:"/"})}catch(e){i("Failed to delete legacy cookie: ",e)}try{P(x,{path:"/",domain:L(),expires:365,secure:!0})}catch(e){i("Failed to delete entitlements cookie: ",e)}try{window.localStorage.removeItem(k)}catch(e){i("Failed to remove local storage: ",e)}}()},F=function(){var e=_();return!["local","develop","preprod","trbdev"].some((function(t){return e.origin.includes(t)}))},B=function(e){i("Removing storageObject : ",e),void 0!==window.localStorage.getItem(e)&&(window.localStorage.removeItem(e),i("Storage Object removed : ",e))},D=function(e){var t=new CustomEvent("authenticationReady",{detail:e});window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.authenticationReady=e,i("Dispatching authenticationReady Event: ",t),window.dispatchEvent(t),i("Dispatched authenticationReady event!")};var W=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return e.next=4,M();case 4:return e.abrupt("return",new Promise((function(e){i("ANALYTICS: inside BCregwall events");var t=_();t.searchParams.delete("regwall");var n=blueConicClient.profile.getProfile();localStorage.setItem("regwallSuccess","yes"),localStorage.setItem("regwallEvent","yes"),n.setValue("bang_reg_wall_status","Y"),n.setValue("regwall_newspaper",t.host),n.setValue("regwall_success_date",new Date),n.setValue("regwall_success","yes"),blueConicClient.profile.updateProfile(),e(!0)})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=function(){var e=t(o().mark((function e(t){var n,r,a,s,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{void 0!==(n=I(t))&&n&&(i("ANALYTICS: Partner Access: JWT found"),r=n.entitlement_entitled,a=n.entitlement_source,s=n.entitlement_organizationTrackingId,c=n.entitlement_organizationType,i("ANALYTICS: Partner Access Event: Entitled: ".concat(r," and source: ").concat(a)),r&&"partner-access"===a&&(i("ANALYTICS: GA event for partner access"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"partnerAccess",partner:"".concat(s,"|").concat(c)})))}catch(e){i("ANALYTICS: Failed to send Partner Access event: ",e)}case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{"yes"===localStorage.getItem("regwallEvent")&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"regwall_success"}),i("ANALYTICS: GA/ datalayer ",window.dataLayer),localStorage.removeItem("regwallEvent"))}catch(e){i("ANALYTICS: Failed to send Regwall Succuss Event: ",e)}case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=t(o().mark((function e(t,n){var r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.entitlements&&(r=I(n.entitlements.token)),i("ANALYTICS: user state variables are: ",t,n.userState),a="known"===t&&n.userState?r&&r.entitlement_entitled?"".concat(n.userState).concat(r.entitlement_serviceCode?"-".concat(r.entitlement_serviceCode):""):n.userState:"known"!==t||n.userState?"unknown"===t||"unknown-default"===t||"unknown-fail"===t&&"noEntitlements"===n.userState?t:t&&n.userState?r&&r.entitlement_entitled?"".concat(n.userState).concat(r.entitlement_serviceCode?"-".concat(r.entitlement_serviceCode):""):n.userState:"noState":"known-entitlements-failed",i("ANALYTICS: user state is ",a),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Auth0State_event",Auth0State:a});case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),z=function(){var e=t(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,M();case 3:n=e.sent,r=n.isAuthenticated,e.t0=r,e.next=!0===e.t0?8:!1===e.t0?10:12;break;case 8:return t="known",e.abrupt("break",14);case 10:return t="unknown",e.abrupt("break",14);case 12:return t="unknown-default",e.abrupt("break",14);case 14:return e.abrupt("return",t);case 17:return e.prev=17,e.t1=e.catch(0),i("ANALYTICS: Error during onAuthReadyAnalytics: ",e.t1),e.abrupt("return","unknown-fail");case 21:case"end":return e.stop()}}),e,null,[[0,17]])})));return function(){return e.apply(this,arguments)}}(),H=function(e){try{window.dataLayer.push({event:e}),i("ANALYTICS: ".concat(e," event")),i("ANALYTICS: GA/ datalayer ",window.dataLayer)}catch(t){i("ANALYTICS: Failed to send ".concat(e," event: "),t)}},V=function(e){try{H({googleonetap:"one_tap_login",viafoura_signup:"viafoura_signup_success",viafoura_login:"viafoura_login_success"}[e])}catch(e){i("ANALYTICS: Event not setup",e)}},X=function(){var e=t(o().mark((function e(){var n,r,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=!1,e.next=4,new Promise((function(e,n){a.entitlementsEnabled?void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.entitlementsReady?(i("Entitlements already ready: ",window.MNGAuthentication.entitlementsReady),e(window.MNGAuthentication.entitlementsReady)):(i("Adding entitlementsReady listener..."),window.addEventListener("entitlementsReady",function(){var r=t(o().mark((function t(r){var a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{a=r.detail||{},i("Event: entitlements ready: ",a),e(a)}catch(e){i(e),n(e)}case 1:case"end":return t.stop()}}),t)})));return function(e){return r.apply(this,arguments)}}(),!1)):e(!1)}));case 4:if(!(r=e.sent)||!r.token){e.next=12;break}return s=r.token,c=r.isEntitled,u=r.adfree,i("ANALYTICS: entitlements options: ",c,u),!0===u&&i("ANALYTICS: user state: found ad free",u),!0===c?(i("ANALYTICS: user state: found subscriber"),n="subscriber"):(i("ANALYTICS: user state: LINA"),n="lina"),Y(s),e.abrupt("return",{userState:n,entitlements:r});case 12:return e.abrupt("return","noEntitlements");case 15:return e.prev=15,e.t0=e.catch(0),i("ANALYTICS:",e.t0),e.abrupt("return","entitlementError");case 19:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(){return e.apply(this,arguments)}}(),K=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();const $={onLoadAnalytics:function(){var e=t(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("ANALYTICS: Start Analytics"),J(),window.MNGAuthentication.postAuthEvents=[],window.MNGAuthentication.preAuthGTMEvents=[],window.MNGAuthentication.postAuthEvents.push(V),!((t=_()).pathname.startsWith("/logout")||t.pathname.startsWith("/login")||t.pathname.startsWith("/callback"))){e.next=8;break}return e.abrupt("return");case 8:return K(),e.next=11,z();case 11:return n=e.sent,e.next=14,X();case 14:r=e.sent,q(n,r);case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),blueConicRegwallEvents:W,callPreparedGTMEvent:H};var Q,Z=n(669),ee=n.n(Z),te=function(){try{var e=localStorage.getItem(k);return"string"==typeof e?e:"{}"}catch(e){i("Unable to get session from local storage: ",e)}return"{}"},ne=function(e){try{i("Setting local storage session",e),localStorage.setItem(k,e)}catch(e){i("Unable to save session from local storage: ",e)}},re=function(){var e=t(o().mark((function e(){var t,n,r,s,c,u,l,f,d,p;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(a.sessionServer,"/api/session"),i("Checking server session: ",t),e.next=5,ee().get(t,{withCredentials:!0});case 5:if(!(n=e.sent).data){e.next=10;break}return r=n.data,s=r.idToken,c=r.entitlementToken,u=r.expiration,l=r.entitlementSource,f=r.isEntitled,d=r.adFree,p=r.entitlementLevel,ne(JSON.stringify({idToken:s,entitlementToken:c,expiration:u,entitlementSource:l,isEntitled:f,adFree:d,entitlementLevel:p})),e.abrupt("return",{idToken:s,entitlementToken:c,expiration:u,entitlementSource:l,isEntitled:f,adFree:d,entitlementLevel:p});case 10:return e.abrupt("return",{idToken:null,entitlementToken:null,expiration:null,entitlementSource:null,isEntitled:null,adFree:null,entitlementLevel:null});case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n="".concat(a.sessionServer,"/api/session"),i("Updating server session: ",n),e.next=6,ee().post(n,t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),i("Failed to update session server: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=t(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t="".concat(a.sessionServer,"/api/session"),i("Deleting server session: ",t),e.next=6,ee().delete(t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),i("Failed to delete server session: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=t(o().mark((function e(){var t,n,r,a,s,c,u,l,f,d,p,h,g,w,m,v,y,b,x,k,S,A,_,E;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Inside getSession"),e.prev=1,l=te(),i("Session: __MNG_Session = ",l),f=JSON.parse(l),d=f.idToken,p=f.entitlementToken,h=f.expiration,g=f.entitlementSource,w=f.isEntitled,m=f.adFree,v=f.entitlementLevel,r=h,a=g,s=w,c=m,u=v,i("Session: check both tokens: ",t=d,n=p),void 0!==d&&void 0!==p&&null!==d&&null!==p){e.next=32;break}return i("Session: missing id or entitlements, try session server"),e.next=17,re();case 17:y=e.sent,b=y.idToken,x=y.entitlementToken,k=y.expiration,S=y.entitlementSource,A=y.isEntitled,_=y.adFree,E=y.entitlementLevel,t=b,n=x,r=k,a=S,s=A,c=_,u=E;case 32:e.next=37;break;case 34:e.prev=34,e.t0=e.catch(1),i("Failed to get session: ",e.t0);case 37:return i("Returning session: ",t,n),e.abrupt("return",{idToken:t,entitlementToken:n,expiration:r,entitlementSource:a,isEntitled:s,adFree:c,entitlementLevel:u});case 39:case"end":return e.stop()}}),e,null,[[1,34]])})));return function(){return e.apply(this,arguments)}}(),se=function(){var e=t(o().mark((function e(t){var n,r,a,s,c,u,l,f,d,p,h,g,w,m,v,y,b,x,k,S,A,_,E,C,L;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=te(),r=JSON.parse(n),a=r.idToken,s=void 0===a?null:a,c=r.entitlementToken,u=void 0===c?null:c,l=r.expiration,f=void 0===l?null:l,d=r.entitlementSource,p=void 0===d?null:d,h=r.isEntitled,g=void 0===h?null:h,w=r.adFree,m=void 0===w?null:w,v=r.entitlementLevel,y=void 0===v?null:v,b=t.idToken,x=t.entitlementToken,k=t.expiration,S=t.entitlementSource,A=t.isEntitled,_=t.adFree,E=t.entitlementLevel,C={idToken:null==b?s:b,entitlementToken:null==x?u:x,expiration:null==k?f:k,entitlementSource:null==S?p:S,isEntitled:null==A?g:A,adFree:null==_?m:_,entitlementLevel:null==E?y:E},i("Current session data: ",r),i("New session data: ",t),i("Updated session data:",C),L=JSON.stringify(C),ne(L),n===L){e.next=14;break}return e.next=14,oe(C);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),i("Unable to save session: ",e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}(),ce=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Ending session..."),G(),e.next=4,ae();case 4:localStorage.removeItem(k);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===Q){e.next=2;break}return e.abrupt("return",Q);case 2:return t=a.auth0Domain,n=a.auth0ClientId,e.next=5,createAuth0Client({domain:t,client_id:n,useRefreshTokens:!0,cacheLocation:"localstorage",audience:"access-extension"});case 5:return Q=e.sent,e.abrupt("return",Q);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(){return"logout"===(_().searchParams.get("state")||"").toLowerCase()};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.logoutCallbacks=[];var fe=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ue();case 2:n=e.sent,i("Calling Auth0 logout..."),n.logout({returnTo:t});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),de=function(){var e=t(o().mark((function e(){var n,r,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Attempting to logout..."),!a.sessionManagementEnabled){e.next=6;break}return e.next=4,ce();case 4:e.next=7;break;case 6:G();case 7:return pe(!0),e.prev=8,i("Cycling through logout callbacks..."),n=window.MNGAuthentication.logoutCallbacks.map((function(e){return e()})),e.next=13,Promise.all(n);case 13:i("Finished cycling through logout callbacks."),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(8),i("Failed to cycle through logout callbacks: ",e.t0);case 19:Object.keys(localStorage).filter((function(e){return e.includes("auth0")})).forEach((function(e){localStorage.removeItem(e),i("Removed Auth0 storage object...")})),B("hhsl"),B("userNewsLetterData"),r=_(),s=window.location.origin;try{r.searchParams.get("returnURL")&&(c=decodeURIComponent(r.searchParams.get("returnURL")),s=c)}catch(e){i(e),s=window.location.origin}return s=new URL(s),e.next=29,new Promise((function(e){var t=setTimeout((function(){"undefined"!=typeof Connext?(i("Connext actually did load..."),clearTimeout(t),e(!0)):(i("Connext did not load in time. Resolving false..."),clearTimeout(t),e(!1))}),6e3);"undefined"!=typeof Connext?(i("Connext already ready."),clearTimeout(t),e(!0)):(i("Listening for Connext Ready event..."),document.addEventListener("onFinish",(function(){clearTimeout(t),i("Connext loaded!"),e(!0)})))}));case 29:if(!e.sent){e.next=59;break}if(u=s,s.origin!==window.location.origin&&(u=new URL(window.location.origin)).searchParams.append("returnAfterLogout",s),window.history.replaceState({additionalInformation:"Updated the URL to prevent another login cycle"},"Home",u),!F()){e.next=40;break}return i("About to call Connext Logout..."),e.next=38,Connext.Logout();case 38:e.next=57;break;case 40:if("Logged In"!==("undefined"==typeof CnnXt?(i("Connext was not loaded."),!1):Connext.Storage.GetUserState())){e.next=54;break}if(i("Connext user state is logged in, setting timeout..."),setTimeout(t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Connext took too long to logout, calling auth0 logout..."),e.next=3,fe(s);case 3:case"end":return e.stop()}}),e)}))),8e3),"function"!=typeof Connext._logout){e.next=49;break}return i("About to call Connext _logout..."),e.next=47,Connext._logout();case 47:e.next=52;break;case 49:return i("About to call Connext Logout..."),e.next=52,Connext.Logout();case 52:e.next=57;break;case 54:return i("Connext user state is logged out, not calling it, going to auth0 logout."),e.next=57,fe(s);case 57:e.next=62;break;case 59:return i("Connext Logout was NOT called"),e.next=62,fe(s);case 62:case"end":return e.stop()}}),e,null,[[8,16]])})));return function(){return e.apply(this,arguments)}}(),pe=function(e){N(A,e,{domain:T(),path:"/",expires:365,secure:!0});var t=C();t&&N(A,e,{domain:t,path:"/",expires:365,secure:!0})},he=function(){var e=0;for(var t in localStorage){var n=2*localStorage[t].length/1024/1024;!Number.isNaN(n)&&localStorage.hasOwnProperty(t)&&(e+=n)}return e},ge=function(){var e=t(o().mark((function e(t,n,r,s){var c,u,f,d,p,h,g,w,m,v,y,b,x;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Attempting to login..."),he()>4.5&&localStorage.clear(),window.MNGAuthentication.preAuthGTMEvents.forEach((function(e){return H(e)})),i("Cycled through preauth GTM events."),s&&(c=[],u=window.localStorage.getItem("callbackEvents"),f=JSON.parse(u),c=f&&f.length>0?l(new Set([].concat(l(s),l(f)))):s,window.localStorage.setItem("callbackEvents",JSON.stringify(c))),d=null,e.next=7,ue();case 7:if(p=e.sent,h=_(),g=h.origin,w=new URL("".concat(g,"/callback")),m={},h.searchParams.get("regwall")&&(h.searchParams.get("returnUrl")&&(v=h.searchParams.get("returnUrl")),h.searchParams.get("auth_redirect")&&(v=h.searchParams.get("auth_redirect"))),h.pathname.startsWith("/login")||h.pathname.startsWith("/callback")?h.searchParams.get("returnUrl")&&w.searchParams.set("auth_redirect",h.searchParams.get("returnUrl")):w.searchParams.set("auth_redirect",h.toString()),v&&"regwall"!==t&&w.searchParams.set("auth_redirect",v),"true"===h.searchParams.get("close-after-finish")&&w.searchParams.set("close-after-finish","true"),"true"!==h.searchParams.get("ssl")){e.next=23;break}if(!a.sessionManagementEnabled){e.next=22;break}return e.next=20,ce();case 20:e.next=23;break;case 22:G();case 23:return null!==(d=h.searchParams.get("login-with"))?m.connection=d:n&&(m.connection=n),y="none",t&&"regwall"===t&&(w.searchParams.set("regwall","true"),y="signUp",i("Logging in with regwall")),t&&(w.searchParams.set("loginsource",t),i("Logging in with ".concat(t))),r&&(m.login_hint=r),m.redirect_uri=w.toString(),m.initialScreen=y,"googleonetap"!==t&&(m.prompt="select_account"),null!==(b=h.searchParams.get("ampRegiWall"))&&(x=window.location.hostname,m.ampRegiWall=b,m.sourceDomain=x.replace("www.","").replace("preprod.","").replace("develop.",""),m.initialScreen="signUp",m.preferenceId=h.searchParams.get("prefId")),e.next=36,p.loginWithRedirect(m);case 36:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),we=function(){return new Promise((function(e){var t=setTimeout((function(){e()}),8e3);try{var n=window.localStorage.getItem("callbackEvents"),r=JSON.parse(n);r&&0!==r.length||e(),i("Adding listeners to events we need to wait for...");var o=r.map((function(e){return t=e,new Promise((function(e){i("Adding event to wait for: ",t),window.addEventListener(t,(function(n){try{var r=n.detail||{};i("Event: ".concat(t,"} ready: "),r),e(r)}catch(t){i(t),e()}}),!1)}));var t}));Promise.all(o).then((function(){clearTimeout(t),e()}))}catch(t){i("Failed to wait for callback events",t),e()}}))},me=function(e,t){if(e&&(i("This is an SSOR user, with id of ".concat(e,". Setting ").concat(v," now.")),N(v,e,{domain:T(),path:"/",expires:365,secure:!0}),t)){i("Setting _mId cookies now with value of ".concat(t)),N(y,t,{domain:T(),path:"/",expires:365,secure:!0}),N(b,t,{domain:T(),path:"/",expires:365,secure:!0});var n=C();n&&(N(y,t,{domain:n,path:"/",expires:365,secure:!0}),N(b,t,{domain:n,path:"/",expires:365,secure:!0}))}};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.oidcLoginCallbacks=[];var ve=function(){var e=t(o().mark((function e(){var n,r,s,c,u,l,f,d,p,h,g,w,m,v;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Handling post login callback..."),s=_(),e.next=4,ue();case 4:return c=e.sent,e.next=7,c.handleRedirectCallback();case 7:return e.next=9,c.getIdTokenClaims();case 9:return u=e.sent,e.next=12,c.getUser();case 12:return l=e.sent,i("Auth0 user profile: ",l),f=u.__raw,e.next=17,c.getTokenSilently();case 17:return d=e.sent,e.prev=18,i("Cycling through login callbacks..."),e.next=22,we();case 22:return p=window.MNGAuthentication.oidcLoginCallbacks.map(function(){var e=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(f));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=25,Promise.all(p);case 25:i("Finished cycling through login callbacks."),e.next=31;break;case 28:e.prev=28,e.t0=e.catch(18),i("Failed to cycle through login callbacks: ",e.t0);case 31:if((h={accessToken:d,userId:l.sub,email:l.email,picture:l.picture}).ssorId=null!==(n=l["http://medianewsgroup.com/ssor_id"])&&void 0!==n&&n,h.master_id=null!==(r=l["http://medianewsgroup.com/ssor_master_id"])&&void 0!==r&&r,h.ssorId&&h.master_id&&me(h.ssorId,h.master_id),pe(!1),i("Storing User info: ",h),!a.sessionManagementEnabled){e.next=40;break}return e.next=40,se({idToken:f});case 40:if(!s.searchParams.get("close-after-finish")){e.next=42;break}return e.abrupt("return",window.close());case 42:if(!s.search.includes("loginsource")){e.next=47;break}return g=s.searchParams.get("loginsource"),w=window.MNGAuthentication.postAuthEvents.map(function(){var e=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(g));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=47,Promise.all(w);case 47:return e.prev=47,m=s.searchParams.get("auth_redirect"),v=new URL(m),e.abrupt("return",window.location.assign(v));case 53:e.prev=53,e.t1=e.catch(47),i("Failed to redirect after authentication: ",e.t1);case 56:return window.location.assign(new URL(window.location.origin)),e.abrupt("return","Finished execution, please await result...");case 58:case"end":return e.stop()}}),e,null,[[18,28],[47,53]])})));return function(){return e.apply(this,arguments)}}(),ye=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("ANALYTICS: fireBC events"),e.next=3,W();case 3:i("ANALYTICS: bc values should be filled");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=function(){var e=t(o().mark((function e(){var t,n,r,a,s,c,u,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:if(t=e.sent,(n=t.idToken)!==S){e.next=6;break}return e.abrupt("return",{authenticated:!0});case 6:if(""===n){e.next=18;break}return e.prev=7,r=I(n),a=r.email,s=r.picture,c=r.sub,(u=c.split("|")).pop(),l=u.join("|"),e.abrupt("return",{authenticated:!0,email:a,picture:s,userId:c,connectionSource:l});case 15:e.prev=15,e.t0=e.catch(7),i("Unable to parse idToken: ",n," Error: ",e.t0);case 18:return e.abrupt("return",{authenticated:!1});case 19:case"end":return e.stop()}}),e,null,[[7,15]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.login=ge,window.MNGAuthentication.logout=de,window.MNGAuthentication.getUserInfo=be;const xe={init:function(){var e=t(o().mark((function e(){var n,r,c,u,l,f,d,p,h,g,w,m,v;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=_(),r=!1,c="",u={},n.searchParams.get("returnAfterLogout")&&(f=decodeURIComponent(n.searchParams.get("returnAfterLogout")),window.location.assign(f)),d=function(){var e=t(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ue();case 3:return t=e.sent,e.next=6,t.getIdTokenClaims();case 6:return u=e.sent,e.next=9,t.isAuthenticated();case 9:r=e.sent,c="object"===s(u)?u.__raw:"",e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),i("Unable to verify user has active auth0 session: ",e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(){return e.apply(this,arguments)}}(),n.pathname.startsWith("/logout")){e.next=47;break}if(!a.sessionManagementEnabled){e.next=33;break}return e.next=10,d();case 10:if(""===c){e.next=19;break}if(p=null,h=JSON.parse(window.localStorage.getItem(k)),"{}"!==te()){e.next=17;break}return h&&(p=h.jwt),e.next=17,se({idToken:c,entitlementToken:p});case 17:e.next=31;break;case 19:return e.prev=19,e.next=22,ie();case 22:g=e.sent,c=g.idToken,r="string"==typeof c,c!==S&&(u=I(c)),e.next=31;break;case 28:e.prev=28,e.t0=e.catch(19),i("Unable to initialize session: ",e.t0);case 31:e.next=35;break;case 33:return e.next=35,d();case 35:if(!(l=O())){e.next=47;break}if(i("Looking for SSOR cookie: value is ",l),"string"==typeof c&&""!==c){e.next=47;break}if(r=!0,i("This is an SSO SSOR user"),!a.sessionManagementEnabled){e.next=46;break}return i("Saving SSO data",w={idToken:S}),e.next=46,se(w);case 46:c=S;case 47:if(m={isAuthenticated:r,idToken:c,claims:u,ssorCookie:l},r&&pe(!1),D(m),r?(i("User is authenticated."),n.searchParams.get("auth_redirect")&&(i("Auth Redirect is present, sending user to auth redirect..."),(v=n.searchParams.get("auth_redirect")).endsWith("#")&&(v=v.slice(0,v.length)),window.location.assign(v)),n.pathname.startsWith("/login")&&!le()&&(i("Page is login. The user is already logged in and Connext Logout param is not present... Redirecting..."),window.location.assign(n.origin))):i("User is not authenticated."),n.pathname.startsWith("/login")&&!le()?(i("Page is login. Attempting to log user in..."),ge()):i("Page is not login or Connext state is present"),!n.pathname.startsWith("/callback")||!n.searchParams.get("regwall")){e.next=60;break}return i("Page is callback with regwall param. Routing to regwall receiver..."),e.next=56,ye();case 56:i("Now login from regwall"),ge(),e.next=70;break;case 60:if(!n.pathname.startsWith("/callback")){e.next=66;break}return i("Page is callback without regwall param. Routing to callback receiver..."),e.next=64,ve();case 64:e.next=70;break;case 66:if(!n.pathname.startsWith("/logout")){e.next=70;break}return i("Page is logout. Routing to logout function..."),e.next=70,de();case 70:case"end":return e.stop()}}),e,null,[[19,28]])})));return function(){return e.apply(this,arguments)}}()};var ke=function(e,t){return new Promise((function(n){try{"undefined"==typeof CnnXt&&(i("Connext was not loaded."),n(!1)),i("connext subscribeToNewsletter","about to call Cnnxt NewsletterSubscribe with pref id ".concat(t," and email ").concat(e)),CnnXt.API.NewsletterSubscribe({email:e,id:t,onSuccess:function(){i("Signed user up to newsletter: ",t),n(!0)},onError:function(e){i("subscribeToNewsletter error: ",e),n(!1)}})}catch(e){i("subscribeToNewsletter Error:",e),n(!1)}}))};var Se=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Google token ",t),n=I(t.credential),e.prev=2,H("one_tap_click"),localStorage.setItem("regwallSuccess","yes"),!a.newsletterId){e.next=9;break}return i("About to call Connext's subscribeToNewsletter function"),e.next=9,ke(n.email,a.newsletterId);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(2),i("Error: ",e.t0);case 14:return i("About to login with onetap flow..."),e.next=17,window.MNGAuthentication.login("googleonetap","google-oauth2",n.email);case 17:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),Ae=function(e){var t=document.getElementById("credential_picker_container");switch(i("checking onetap settings for group: ",e),e){case"A":void 0!==window.authentication_config&&"1"===window.authentication_config.gotAGroupEnabled&&""!==window.authentication_config.gotAModalPosition&&(t.classList=window.authentication_config.gotAModalPosition);break;case"B":void 0!==window.authentication_config&&"1"===window.authentication_config.gotBGroupEnabled&&""!==window.authentication_config.gotBModalPosition&&(t.classList=window.authentication_config.gotBModalPosition);break;case"C":void 0!==window.authentication_config&&"1"===window.authentication_config.gotCGroupEnabled&&""!==window.authentication_config.gotCModalPosition&&(t.classList=window.authentication_config.gotCModalPosition);break;case"D":void 0!==window.authentication_config&&"1"===window.authentication_config.gotDGroupEnabled&&""!==window.authentication_config.gotDModalPosition&&(t.classList=window.authentication_config.gotDModalPosition);break;default:i("Cookie not provided")}},_e=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:google.accounts.id.initialize({client_id:a.googleClientId,callback:Se,auto_select:!1,cancel_on_tap_outside:!1}),i("Showing the onetap modal..."),google.accounts.id.prompt((function(e){if(e.isDisplayed()){var t=/Windows|Macintosh|Mac OS X|Linux/.test(navigator.userAgent),n=localStorage.getItem("abcdLocal");n&&t&&Ae(n),H("one_tap_displayed")}else e.isSkippedMoment()?H("one_tap_cancel"):e.isNotDisplayed()&&"suppressed_by_user"===e.j&&H("one_tap_auto_hide")}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();const Ee={init:function(){var e=t(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.oneTapEnabled){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,M();case 4:if(t=e.sent,n=t.isAuthenticated,r=_(),!(n||r.pathname.startsWith("/login")||r.pathname.startsWith("/logout")||r.pathname.startsWith("/callback"))){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,j();case 11:return i("onetap loading..."),e.next=14,_e();case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()};var Ce=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Settings: ",a),xe.init(),$.onLoadAnalytics(),e.next=5,Ee.init();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();window.disableAuth0AuthFlow=!0,Ce()})()})();; (()=>{var e={553:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),i=new v(r||[]);return a._invoke=function(e,t,n){var r=f;return function(o,a){if(r===d)throw new Error("Generator is already running");if(r===E){if("throw"===o)throw a;return B()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=L(i,n);if(s){if(s===N)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=E,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?E:A,c.arg===N)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=E,n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",A="suspendedYield",d="executing",E="completed",N={};function h(){}function p(){}function S(){}var R={};c(R,a,(function(){return this}));var I=Object.getPrototypeOf,O=I&&I(I(y([])));O&&O!==n&&r.call(O,a)&&(R=O);var T=S.prototype=h.prototype=Object.create(R);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function n(o,a,i,s){var c=l(e[o],e,a);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,s)}))}s(c.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function L(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method))return N;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return N}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,N;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,N):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,N)}function m(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function v(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(m,this),this.reset(!0)}function y(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),N}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:y(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),N}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},757:(e,t,n)=>{e.exports=n(553)},669:(e,t,n)=>{e.exports=n(609)},448:(e,t,n)=>{"use strict";var r=n(867),o=n(26),a=n(372),i=n(327),s=n(97),c=n(109),u=n(985),l=n(61),f=n(655),A=n(263);e.exports=function(e){return new Promise((function(t,n){var d,E=e.data,N=e.headers,h=e.responseType;function p(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}r.isFormData(E)&&delete N["Content-Type"];var S=new XMLHttpRequest;if(e.auth){var R=e.auth.username||"",I=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";N.Authorization="Basic "+btoa(R+":"+I)}var O=s(e.baseURL,e.url);function T(){if(S){var r="getAllResponseHeaders"in S?c(S.getAllResponseHeaders()):null,a={data:h&&"text"!==h&&"json"!==h?S.response:S.responseText,status:S.status,statusText:S.statusText,headers:r,config:e,request:S};o((function(e){t(e),p()}),(function(e){n(e),p()}),a),S=null}}if(S.open(e.method.toUpperCase(),i(O,e.params,e.paramsSerializer),!0),S.timeout=e.timeout,"onloadend"in S?S.onloadend=T:S.onreadystatechange=function(){S&&4===S.readyState&&(0!==S.status||S.responseURL&&0===S.responseURL.indexOf("file:"))&&setTimeout(T)},S.onabort=function(){S&&(n(l("Request aborted",e,"ECONNABORTED",S)),S=null)},S.onerror=function(){n(l("Network Error",e,null,S)),S=null},S.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||f.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",S)),S=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||u(O))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;C&&(N[e.xsrfHeaderName]=C)}"setRequestHeader"in S&&r.forEach(N,(function(e,t){void 0===E&&"content-type"===t.toLowerCase()?delete N[t]:S.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(S.withCredentials=!!e.withCredentials),h&&"json"!==h&&(S.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&S.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&S.upload&&S.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(d=function(e){S&&(n(!e||e&&e.type?new A("canceled"):e),S.abort(),S=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d))),E||(E=null),S.send(E)}))}},609:(e,t,n)=>{"use strict";var r=n(867),o=n(849),a=n(321),i=n(185);var s=function e(t){var n=new a(t),s=o(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return e(i(t,n))},s}(n(655));s.Axios=a,s.Cancel=n(263),s.CancelToken=n(972),s.isCancel=n(502),s.VERSION=n(288).version,s.all=function(e){return Promise.all(e)},s.spread=n(713),s.isAxiosError=n(268),e.exports=s,e.exports.default=s},263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:(e,t,n)=>{"use strict";var r=n(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(867),o=n(327),a=n(782),i=n(572),s=n(185),c=n(875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new a,response:new a}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var l=[i,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(a),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var f=e;n.length;){var A=n.shift(),d=n.shift();try{f=A(f)}catch(e){d(e);break}}try{o=i(f)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:(e,t,n)=>{"use strict";var r=n(793),o=n(303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},61:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},572:(e,t,n)=>{"use strict";var r=n(867),o=n(527),a=n(502),i=n(655),s=n(263);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},185:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function i(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function c(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||a,o=t(e);r.isUndefined(o)&&t!==c||(n[e]=o)})),n}},26:(e,t,n)=>{"use strict";var r=n(61);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},527:(e,t,n)=>{"use strict";var r=n(867),o=n(655);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},655:(e,t,n)=>{"use strict";var r=n(867),o=n(16),a=n(481),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(448)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(i)})),e.exports=u},288:e=>{e.exports={version:"0.24.0"}},849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},109:(e,t,n)=>{"use strict";var r=n(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:(e,t,n)=>{"use strict";var r=n(288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,i){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!a[r]&&(a[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,i)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],i=t[a];if(i){var s=e[a],c=void 0===s||i(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:o}},867:(e,t,n)=>{"use strict";var r=n(849),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,a){var i=t.apply(n,r);function s(t){e(i,o,a,s,c,"next",t)}function c(t){e(i,o,a,s,c,"throw",t)}s(void 0)}))}}var r=n(757),o=n.n(r);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i};function f(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(l(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return l(t)}}function A(e){this.message=e}A.prototype=new Error,A.prototype.name="InvalidTokenError";const d=function(e,t){if("string"!=typeof e)throw new A("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(f(e.split(".")[n]))}catch(e){throw new A("Invalid token specified: "+e.message)}},E={debug:!!window.authentication_config.debug,sessionManagementEnabled:!!window.authentication_config&&"1"===window.authentication_config.sessionManagementEnabled,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.entitlements_config?window.entitlements_config.entitlementsEndpoint:"",entitlementsApiKey:window.entitlements_config?window.entitlements_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.entitlements_config&&window.entitlements_config.linaCheckOnArticles,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled};const N=function(){if(E.debug){for(var e,t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]&&arguments[0],t=g(),n=t.hostname,r=n;e&&"string"==typeof e&&(r=e);var o=r.split(".");return"".concat(o[o.length-2],".").concat(o[o.length-1])},v=function(){var e=w();return".".concat(e)},y=function(e,t,n){var r="".concat(e,"=").concat(t,";");void 0!==n?(N("Setting cookie with options: ",n),Object.entries(n).forEach((function(e){var t=c(e,2),n=t[0],o=t[1];if("expires"===n){var a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3),r+="expires=".concat(a.toUTCString(),";")}else r+="".concat(n,"=").concat(o,";")}))):r+="path=/;",document.cookie=r},B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="".concat(e,"= ;expires= Thu, 01 Jan 1970 00:00:00 GMT;"),o=w(),a="www".concat(o),i=".www".concat(o),s=[o,a,i];n&&s.push(n),Object.entries(t).forEach((function(e){var t=c(e,2),n=t[0],o=t[1];r+="".concat(n,"=").concat(o,";")})),0===Object.keys(t).length&&(r+="path=/;"),document.cookie=r,s.forEach((function(e){document.cookie=r.concat("domain=",e,";")}))},M=function(e){return d(e)},b=function(){return"complete"===document.readyState},G=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(n){var r=!0;if(b())n();else{N("UIHandler: ","Waiting for the body to load...");var a=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e&&(r=b()),document.querySelector("body")&&r&&(clearInterval(a),n(!0));case 2:case"end":return t.stop()}}),t)}))),200)}}))},U=function(){var e=t(o().mark((function e(n){var r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){if(b())e();else{N("Utils digisubsDataLayerLoaded: ","Waiting for the dataLayer to load...");var n=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.dataLayer&&window.dataLayer.length>2&&(clearInterval(n),e(!0));case 1:case"end":return t.stop()}}),t)}))),200)}}));case 2:if(N("Utils getDataLayerObject: looking for this dataLayer object ",n),window.dataLayer=window.dataLayer||[],r="",N("Utils getDataLayerObject: here is dataLayer length ",dataLayer.length),a=function(e){return N("Utils dataLayerLoop: look for this element ",e),e[n]?(N("Utils dataLayerLoop: found ",e[n]),r=e[n],e[n]):(N("Utils dataLayerLoop: dataLayer search ",!1),!1)},!dataLayer.some(a)){e.next=10;break}return e.abrupt("return",r);case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=t(o().mark((function e(){var t,n,r=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"Page Type",e.next=3,U(t);case 3:return n=e.sent,N("Utils pageType: page type is ",n),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){return new Promise((function(e,t){void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady?(N("Authentication already ready: ",window.MNGAuthentication.authenticationReady),e(window.MNGAuthentication.authenticationReady)):(N("Adding authenticationReady listener..."),window.addEventListener("authenticationReady",(function(n){try{var r=n.detail||{};N("Event: authentication ready: ",r),e(r)}catch(e){N(e),t(e)}}),!1))}))},x=function(){B(h),B(p),B(S),B(R);var e=m();e&&(B(S,{},e),B(R,{},e)),function(){N("Clearing entitlements...");try{B(I,{path:"/"})}catch(e){N("Failed to delete legacy cookie: ",e)}try{B(I,{path:"/",domain:w(),expires:365,secure:!0})}catch(e){N("Failed to delete entitlements cookie: ",e)}try{window.localStorage.removeItem(O)}catch(e){N("Failed to remove local storage: ",e)}}()},X=function(){var e=g();return!["local","develop","preprod","trbdev"].some((function(t){return e.origin.includes(t)}))},H=function(e){N("Removing storageObject : ",e),void 0!==window.localStorage.getItem(e)&&(window.localStorage.removeItem(e),N("Storage Object removed : ",e))},F=function(e){return new Promise((function(t){document.querySelector(e)&&t(document.querySelector(e));var n=new MutationObserver((function(){return document.querySelector(e)&&(t(document.querySelector(e)),n.disconnect()),!0}));n.observe(document.body,{childList:!0,subtree:!0})}))},K=function(){var e=t(o().mark((function e(t,n,r){var a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,N("subscribeElementToEvent","Waiting for ".concat(t," to exist...")),e.next=4,F(t);case 4:return a=e.sent,N("subscribeElementToEvent","".concat(t," does exist, adding listener.")),a.addEventListener(n,r),e.abrupt("return",!0);case 10:return e.prev=10,e.t0=e.catch(0),N("subscribeElementToEvent: ","".concat(e.t0)),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n,r){return e.apply(this,arguments)}}();function Y(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var V=function(e){try{window.dataLayer.push({event:e}),N("ANALYTICS: ".concat(e," event")),N("ANALYTICS: GA/ datalayer ",window.dataLayer)}catch(t){N("ANALYTICS: Failed to send ".concat(e," event: "),t)}};var k,W=n(669),_=n.n(W),j=function(){var e=t(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t="".concat(E.sessionServer,"/api/session"),N("Deleting server session: ",t),e.next=6,_().delete(t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),N("Failed to delete server session: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),J=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N("Ending session..."),x(),e.next=4,j();case 4:localStorage.removeItem(O);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Z=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===k){e.next=2;break}return e.abrupt("return",k);case 2:return t=E.auth0Domain,n=E.auth0ClientId,e.next=5,createAuth0Client({domain:t,client_id:n,useRefreshTokens:!0,cacheLocation:"localstorage",audience:"access-extension"});case 5:return k=e.sent,e.abrupt("return",k);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.logoutCallbacks=[];var Q=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z();case 2:n=e.sent,N("Calling Auth0 logout..."),n.logout({returnTo:t});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),q=function(){var e=t(o().mark((function e(){var n,r,a,i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N("Attempting to logout..."),!E.sessionManagementEnabled){e.next=6;break}return e.next=4,J();case 4:e.next=7;break;case 6:x();case 7:return z(!0),e.prev=8,N("Cycling through logout callbacks..."),n=window.MNGAuthentication.logoutCallbacks.map((function(e){return e()})),e.next=13,Promise.all(n);case 13:N("Finished cycling through logout callbacks."),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(8),N("Failed to cycle through logout callbacks: ",e.t0);case 19:Object.keys(localStorage).filter((function(e){return e.includes("auth0")})).forEach((function(e){localStorage.removeItem(e),N("Removed Auth0 storage object...")})),H("hhsl"),H("userNewsLetterData"),r=g(),a=window.location.origin;try{r.searchParams.get("returnURL")&&(i=decodeURIComponent(r.searchParams.get("returnURL")),a=i)}catch(e){N(e),a=window.location.origin}return a=new URL(a),e.next=29,new Promise((function(e){var t=setTimeout((function(){"undefined"!=typeof Connext?(N("Connext actually did load..."),clearTimeout(t),e(!0)):(N("Connext did not load in time. Resolving false..."),clearTimeout(t),e(!1))}),6e3);"undefined"!=typeof Connext?(N("Connext already ready."),clearTimeout(t),e(!0)):(N("Listening for Connext Ready event..."),document.addEventListener("onFinish",(function(){clearTimeout(t),N("Connext loaded!"),e(!0)})))}));case 29:if(!e.sent){e.next=59;break}if(s=a,a.origin!==window.location.origin&&(s=new URL(window.location.origin)).searchParams.append("returnAfterLogout",a),window.history.replaceState({additionalInformation:"Updated the URL to prevent another login cycle"},"Home",s),!X()){e.next=40;break}return N("About to call Connext Logout..."),e.next=38,Connext.Logout();case 38:e.next=57;break;case 40:if("Logged In"!==("undefined"==typeof CnnXt?(N("Connext was not loaded."),!1):Connext.Storage.GetUserState())){e.next=54;break}if(N("Connext user state is logged in, setting timeout..."),setTimeout(t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N("Connext took too long to logout, calling auth0 logout..."),e.next=3,Q(a);case 3:case"end":return e.stop()}}),e)}))),8e3),"function"!=typeof Connext._logout){e.next=49;break}return N("About to call Connext _logout..."),e.next=47,Connext._logout();case 47:e.next=52;break;case 49:return N("About to call Connext Logout..."),e.next=52,Connext.Logout();case 52:e.next=57;break;case 54:return N("Connext user state is logged out, not calling it, going to auth0 logout."),e.next=57,Q(a);case 57:e.next=62;break;case 59:return N("Connext Logout was NOT called"),e.next=62,Q(a);case 62:case"end":return e.stop()}}),e,null,[[8,16]])})));return function(){return e.apply(this,arguments)}}(),z=function(e){y(C,e,{domain:v(),path:"/",expires:365,secure:!0});var t=m();t&&y(C,e,{domain:t,path:"/",expires:365,secure:!0})},$=function(){var e=0;for(var t in localStorage){var n=2*localStorage[t].length/1024/1024;!Number.isNaN(n)&&localStorage.hasOwnProperty(t)&&(e+=n)}return e},ee=function(){var e=t(o().mark((function e(t,n,r,a){var i,s,c,u,l,f,A,d,h,p,S,R,I;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N("Attempting to login..."),$()>4.5&&localStorage.clear(),window.MNGAuthentication.preAuthGTMEvents.forEach((function(e){return V(e)})),N("Cycled through preauth GTM events."),a&&(i=[],s=window.localStorage.getItem("callbackEvents"),c=JSON.parse(s),i=c&&c.length>0?Y(new Set([].concat(Y(a),Y(c)))):a,window.localStorage.setItem("callbackEvents",JSON.stringify(i))),u=null,e.next=7,Z();case 7:if(l=e.sent,f=g(),A=f.origin,d=new URL("".concat(A,"/callback")),h={},f.searchParams.get("regwall")&&(f.searchParams.get("returnUrl")&&(p=f.searchParams.get("returnUrl")),f.searchParams.get("auth_redirect")&&(p=f.searchParams.get("auth_redirect"))),f.pathname.startsWith("/login")||f.pathname.startsWith("/callback")?f.searchParams.get("returnUrl")&&d.searchParams.set("auth_redirect",f.searchParams.get("returnUrl")):d.searchParams.set("auth_redirect",f.toString()),p&&"regwall"!==t&&d.searchParams.set("auth_redirect",p),"true"===f.searchParams.get("close-after-finish")&&d.searchParams.set("close-after-finish","true"),"true"!==f.searchParams.get("ssl")){e.next=23;break}if(!E.sessionManagementEnabled){e.next=22;break}return e.next=20,J();case 20:e.next=23;break;case 22:x();case 23:return null!==(u=f.searchParams.get("login-with"))?h.connection=u:n&&(h.connection=n),S="none",t&&"regwall"===t&&(d.searchParams.set("regwall","true"),S="signUp",N("Logging in with regwall")),t&&(d.searchParams.set("loginsource",t),N("Logging in with ".concat(t))),r&&(h.login_hint=r),h.redirect_uri=d.toString(),h.initialScreen=S,"googleonetap"!==t&&(h.prompt="select_account"),null!==(R=f.searchParams.get("ampRegiWall"))&&(I=window.location.hostname,h.ampRegiWall=R,h.sourceDomain=I.replace("www.","").replace("preprod.","").replace("develop.",""),h.initialScreen="signUp",h.preferenceId=f.searchParams.get("prefId")),e.next=36,l.loginWithRedirect(h);case 36:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}();window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.oidcLoginCallbacks=[];var te=function(){var e=t(o().mark((function e(){var t,n,r,a,i,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:if(t=e.sent,(n=t.idToken)!==T){e.next=6;break}return e.abrupt("return",{authenticated:!0});case 6:if(""===n){e.next=18;break}return e.prev=7,r=M(n),a=r.email,i=r.picture,s=r.sub,(c=s.split("|")).pop(),u=c.join("|"),e.abrupt("return",{authenticated:!0,email:a,picture:i,userId:s,connectionSource:u});case 15:e.prev=15,e.t0=e.catch(7),N("Unable to parse idToken: ",n," Error: ",e.t0);case 18:return e.abrupt("return",{authenticated:!1});case 19:case"end":return e.stop()}}),e,null,[[7,15]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.login=ee,window.MNGAuthentication.logout=q,window.MNGAuthentication.getUserInfo=te;var ne=function(e,t){return new Promise((function(n){try{"undefined"==typeof CnnXt&&(N("Connext was not loaded."),n(!1)),N("connext subscribeToNewsletter","about to call Cnnxt NewsletterSubscribe with pref id ".concat(t," and email ").concat(e)),CnnXt.API.NewsletterSubscribe({email:e,id:t,onSuccess:function(){N("Signed user up to newsletter: ",t),n(!0)},onError:function(e){N("subscribeToNewsletter error: ",e),n(!1)}})}catch(e){N("subscribeToNewsletter Error:",e),n(!1)}}))},re=function(e){try{"string"==typeof e&&y(h,e,{domain:v(),path:"/",expires:365,secure:!0})}catch(e){N("Failed to set auth0_sub cookie: ",e)}},oe=function(e){if(!L(h))try{var t=e.claims;if((null==t||"object"!==a(t)&&!Object.keys(t).includes("sub"))&&!e.ssorCookie)return;var n=e.ssorCookie?e.ssorCookie:t.sub;re(n)}catch(e){N("Failed to set auth0_sub: ",e)}},ae=function(e){try{if("string"==typeof e&&e!==T){var t=M(e).sub;re(t)}else N("Could not set auth0_sub on login, idToken was not available.")}catch(e){N("Failed to set auth0_sub on login: ",e)}};const ie={init:function(){var e=t(o().mark((function e(){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return document.addEventListener("click",(function(e){if(e.target.classList.contains("connext-login")){var t=window.location.href,n=new URL(t),r=n.origin,o=new URL("".concat(r,"/login"));o.searchParams.set("returnUrl",n.toString()),window.location.assign(o)}})),X()||document.addEventListener("onInit",(function(){if("undefined"!=typeof Connext){var e,t,n,r=Connext;t="Logout",n=function(){return function(){alert("Warning! You called Connext.Logout() directly! Calling MNGAuthentication.logout() next."),window.MNGAuthentication.logout()}},(e=r)._logout=Connext.Logout,e[t]=n(e[t])}})),document.addEventListener("onFinish",t(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=window.localStorage.getItem("newsletter_to_subscribe"))){e.next=11;break}return e.next=4,te();case 4:return n=e.sent,r=n.email,N("CONNEXT: about to sign up ".concat(r," to ").concat(t)),e.next=9,ne(r,t);case 9:window.localStorage.removeItem("newsletter_to_subscribe"),N("CONNEXT: newsletter_to_subscribe value removed from local storage.");case 11:case"end":return e.stop()}}),e)})))),MNGAuthentication.oidcLoginCallbacks.push(ae),e.next=6,D();case 6:n=e.sent,oe(n);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()};window.backToStory=function(){setTimeout((function(){Connext.Run()}),350)};var se=function(){return document.getElementById("tribRegiwallEmailId")},ce=function(){var e=t(o().mark((function e(){var t,n,r,i,s,c,u,l,f;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N("Regwall Validate: ","starting validateEmail"),document.getElementById("tribRegiwallSubButtonId").textContent="Validating...",t=se().value,n=new RegExp(/^(([^<>()[\]\\.,;:\s@']+(\.[^<>()[\]\\.,;:\s@']+)*)|('.+'))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i),t){e.next=6;break}return e.abrupt("return",{valid:!1,message:"Please, enter an email.",exist:null});case 6:if(n.test(t)){e.next=8;break}return e.abrupt("return",{valid:!1,message:"Please, enter a valid email.",exist:null});case 8:if(r=["zzz.pl"],i=["AAA","AARP","ABARTH","ABB","ABBOTT","ABBVIE","ABC","ABLE","ABOGADO","ABUDHABI","AC","ACADEMY","ACCENTURE","ACCOUNTANT","ACCOUNTANTS","ACO","ACTOR","AD","ADS","ADULT","AE","AEG","AERO","AETNA","AF","AFL","AFRICA","AG","AGAKHAN","AGENCY","AI","AIG","AIRBUS","AIRFORCE","AIRTEL","AKDN","AL","ALFAROMEO","ALIBABA","ALIPAY","ALLFINANZ","ALLSTATE","ALLY","ALSACE","ALSTOM","AM","AMAZON","AMERICANEXPRESS","AMERICANFAMILY","AMEX","AMFAM","AMICA","AMSTERDAM","ANALYTICS","ANDROID","ANQUAN","ANZ","AO","AOL","APARTMENTS","APP","APPLE","AQ","AQUARELLE","AR","ARAB","ARAMCO","ARCHI","ARMY","ARPA","ART","ARTE","AS","ASDA","ASIA","ASSOCIATES","AT","ATHLETA","ATTORNEY","AU","AUCTION","AUDI","AUDIBLE","AUDIO","AUSPOST","AUTHOR","AUTO","AUTOS","AVIANCA","AW","AWS","AX","AXA","AZ","AZURE","BA","BABY","BAIDU","BANAMEX","BANANAREPUBLIC","BAND","BANK","BAR","BARCELONA","BARCLAYCARD","BARCLAYS","BAREFOOT","BARGAINS","BASEBALL","BASKETBALL","BAUHAUS","BAYERN","BB","BBC","BBT","BBVA","BCG","BCN","BD","BE","BEATS","BEAUTY","BEER","BENTLEY","BERLIN","BEST","BESTBUY","BET","BF","BG","BH","BHARTI","BI","BIBLE","BID","BIKE","BING","BINGO","BIO","BIZ","BJ","BLACK","BLACKFRIDAY","BLOCKBUSTER","BLOG","BLOOMBERG","BLUE","BM","BMS","BMW","BN","BNPPARIBAS","BO","BOATS","BOEHRINGER","BOFA","BOM","BOND","BOO","BOOK","BOOKING","BOSCH","BOSTIK","BOSTON","BOT","BOUTIQUE","BOX","BR","BRADESCO","BRIDGESTONE","BROADWAY","BROKER","BROTHER","BRUSSELS","BS","BT","BUILD","BUILDERS","BUSINESS","BUY","BUZZ","BV","BW","BY","BZ","BZH","CA","CAB","CAFE","CAL","CALL","CALVINKLEIN","CAM","CAMERA","CAMP","CANON","CAPETOWN","CAPITAL","CAPITALONE","CAR","CARAVAN","CARDS","CARE","CAREER","CAREERS","CARS","CASA","CASE","CASH","CASINO","CAT","CATERING","CATHOLIC","CBA","CBN","CBRE","CBS","CC","CD","CENTER","CEO","CERN","CF","CFA","CFD","CG","CH","CHANEL","CHANNEL","CHARITY","CHASE","CHAT","CHEAP","CHINTAI","CHRISTMAS","CHROME","CHURCH","CI","CIPRIANI","CIRCLE","CISCO","CITADEL","CITI","CITIC","CITY","CITYEATS","CK","CL","CLAIMS","CLEANING","CLICK","CLINIC","CLINIQUE","CLOTHING","CLOUD","CLUB","CLUBMED","CM","CN","CO","COACH","CODES","COFFEE","COLLEGE","COLOGNE","COM","COMCAST","COMMBANK","COMMUNITY","COMPANY","COMPARE","COMPUTER","COMSEC","CONDOS","CONSTRUCTION","CONSULTING","CONTACT","CONTRACTORS","COOKING","COOKINGCHANNEL","COOL","COOP","CORSICA","COUNTRY","COUPON","COUPONS","COURSES","CPA","CR","CREDIT","CREDITCARD","CREDITUNION","CRICKET","CROWN","CRS","CRUISE","CRUISES","CU","CUISINELLA","CV","CW","CX","CY","CYMRU","CYOU","CZ","DABUR","DAD","DANCE","DATA","DATE","DATING","DATSUN","DAY","DCLK","DDS","DE","DEAL","DEALER","DEALS","DEGREE","DELIVERY","DELL","DELOITTE","DELTA","DEMOCRAT","DENTAL","DENTIST","DESI","DESIGN","DEV","DHL","DIAMONDS","DIET","DIGITAL","DIRECT","DIRECTORY","DISCOUNT","DISCOVER","DISH","DIY","DJ","DK","DM","DNP","DO","DOCS","DOCTOR","DOG","DOMAINS","DOT","DOWNLOAD","DRIVE","DTV","DUBAI","DUNLOP","DUPONT","DURBAN","DVAG","DVR","DZ","EARTH","EAT","EC","ECO","EDEKA","EDU","EDUCATION","EE","EG","EMAIL","EMERCK","ENERGY","ENGINEER","ENGINEERING","ENTERPRISES","EPSON","EQUIPMENT","ER","ERICSSON","ERNI","ES","ESQ","ESTATE","ET","ETISALAT","EU","EUROVISION","EUS","EVENTS","EXCHANGE","EXPERT","EXPOSED","EXPRESS","EXTRASPACE","FAGE","FAIL","FAIRWINDS","FAITH","FAMILY","FAN","FANS","FARM","FARMERS","FASHION","FAST","FEDEX","FEEDBACK","FERRARI","FERRERO","FI","FIAT","FIDELITY","FIDO","FILM","FINAL","FINANCE","FINANCIAL","FIRE","FIRESTONE","FIRMDALE","FISH","FISHING","FIT","FITNESS","FJ","FK","FLICKR","FLIGHTS","FLIR","FLORIST","FLOWERS","FLY","FM","FO","FOO","FOOD","FOODNETWORK","FOOTBALL","FORD","FOREX","FORSALE","FORUM","FOUNDATION","FOX","FR","FREE","FRESENIUS","FRL","FROGANS","FRONTDOOR","FRONTIER","FTR","FUJITSU","FUN","FUND","FURNITURE","FUTBOL","FYI","GA","GAL","GALLERY","GALLO","GALLUP","GAME","GAMES","GAP","GARDEN","GAY","GB","GBIZ","GD","GDN","GE","GEA","GENT","GENTING","GEORGE","GF","GG","GGEE","GH","GI","GIFT","GIFTS","GIVES","GIVING","GL","GLASS","GLE","GLOBAL","GLOBO","GM","GMAIL","GMBH","GMO","GMX","GN","GODADDY","GOLD","GOLDPOINT","GOLF","GOO","GOODYEAR","GOOG","GOOGLE","GOP","GOT","GOV","GP","GQ","GR","GRAINGER","GRAPHICS","GRATIS","GREEN","GRIPE","GROCERY","GROUP","GS","GT","GU","GUARDIAN","GUCCI","GUGE","GUIDE","GUITARS","GURU","GW","GY","HAIR","HAMBURG","HANGOUT","HAUS","HBO","HDFC","HDFCBANK","HEALTH","HEALTHCARE","HELP","HELSINKI","HERE","HERMES","HGTV","HIPHOP","HISAMITSU","HITACHI","HIV","HK","HKT","HM","HN","HOCKEY","HOLDINGS","HOLIDAY","HOMEDEPOT","HOMEGOODS","HOMES","HOMESENSE","HONDA","HORSE","HOSPITAL","HOST","HOSTING","HOT","HOTELES","HOTELS","HOTMAIL","HOUSE","HOW","HR","HSBC","HT","HU","HUGHES","HYATT","HYUNDAI","IBM","ICBC","ICE","ICU","ID","IE","IEEE","IFM","IKANO","IL","IM","IMAMAT","IMDB","IMMO","IMMOBILIEN","IN","INC","INDUSTRIES","INFINITI","INFO","ING","INK","INSTITUTE","INSURANCE","INSURE","INT","INTERNATIONAL","INTUIT","INVESTMENTS","IO","IPIRANGA","IQ","IR","IRISH","IS","ISMAILI","IST","ISTANBUL","IT","ITAU","ITV","JAGUAR","JAVA","JCB","JE","JEEP","JETZT","JEWELRY","JIO","JLL","JM","JMP","JNJ","JO","JOBS","JOBURG","JOT","JOY","JP","JPMORGAN","JPRS","JUEGOS","JUNIPER","KAUFEN","KDDI","KE","KERRYHOTELS","KERRYLOGISTICS","KERRYPROPERTIES","KFH","KG","KH","KI","KIA","KIDS","KIM","KINDER","KINDLE","KITCHEN","KIWI","KM","KN","KOELN","KOMATSU","KOSHER","KP","KPMG","KPN","KR","KRD","KRED","KUOKGROUP","KW","KY","KYOTO","KZ","LA","LACAIXA","LAMBORGHINI","LAMER","LANCASTER","LANCIA","LAND","LANDROVER","LANXESS","LASALLE","LAT","LATINO","LATROBE","LAW","LAWYER","LB","LC","LDS","LEASE","LECLERC","LEFRAK","LEGAL","LEGO","LEXUS","LGBT","LI","LIDL","LIFE","LIFEINSURANCE","LIFESTYLE","LIGHTING","LIKE","LILLY","LIMITED","LIMO","LINCOLN","LINDE","LINK","LIPSY","LIVE","LIVING","LK","LLC","LLP","LOAN","LOANS","LOCKER","LOCUS","LOFT","LOL","LONDON","LOTTE","LOTTO","LOVE","LPL","LPLFINANCIAL","LR","LS","LT","LTD","LTDA","LU","LUNDBECK","LUXE","LUXURY","LV","LY","MA","MACYS","MADRID","MAIF","MAISON","MAKEUP","MAN","MANAGEMENT","MANGO","MAP","MARKET","MARKETING","MARKETS","MARRIOTT","MARSHALLS","MASERATI","MATTEL","MBA","MC","MCKINSEY","MD","ME","MED","MEDIA","MEET","MELBOURNE","MEME","MEMORIAL","MEN","MENU","MERCKMSD","MG","MH","MIAMI","MICROSOFT","MIL","MINI","MINT","MIT","MITSUBISHI","MK","ML","MLB","MLS","MM","MMA","MN","MO","MOBI","MOBILE","MODA","MOE","MOI","MOM","MONASH","MONEY","MONSTER","MORMON","MORTGAGE","MOSCOW","MOTO","MOTORCYCLES","MOV","MOVIE","MP","MQ","MR","MS","MSD","MT","MTN","MTR","MU","MUSEUM","MUSIC","MUTUAL","MV","MW","MX","MY","MZ","NA","NAB","NAGOYA","NAME","NATURA","NAVY","NBA","NC","NE","NEC","NET","NETBANK","NETFLIX","NETWORK","NEUSTAR","NEW","NEWS","NEXT","NEXTDIRECT","NEXUS","NF","NFL","NG","NGO","NHK","NI","NICO","NIKE","NIKON","NINJA","NISSAN","NISSAY","NL","NO","NOKIA","NORTHWESTERNMUTUAL","NORTON","NOW","NOWRUZ","NOWTV","NP","NR","NRA","NRW","NTT","NU","NYC","NZ","OBI","OBSERVER","OFFICE","OKINAWA","OLAYAN","OLAYANGROUP","OLDNAVY","OLLO","OM","OMEGA","ONE","ONG","ONL","ONLINE","OOO","OPEN","ORACLE","ORANGE","ORG","ORGANIC","ORIGINS","OSAKA","OTSUKA","OTT","OVH","PA","PAGE","PANASONIC","PARIS","PARS","PARTNERS","PARTS","PARTY","PASSAGENS","PAY","PCCW","PE","PET","PF","PFIZER","PG","PH","PHARMACY","PHD","PHILIPS","PHONE","PHOTO","PHOTOGRAPHY","PHOTOS","PHYSIO","PICS","PICTET","PICTURES","PID","PIN","PING","PINK","PIONEER","PIZZA","PK","PL","PLACE","PLAY","PLAYSTATION","PLUMBING","PLUS","PM","PN","PNC","POHL","POKER","POLITIE","PORN","POST","PR","PRAMERICA","PRAXI","PRESS","PRIME","PRO","PROD","PRODUCTIONS","PROF","PROGRESSIVE","PROMO","PROPERTIES","PROPERTY","PROTECTION","PRU","PRUDENTIAL","PS","PT","PUB","PW","PWC","PY","QA","QPON","QUEBEC","QUEST","RACING","RADIO","RE","READ","REALESTATE","REALTOR","REALTY","RECIPES","RED","REDSTONE","REDUMBRELLA","REHAB","REISE","REISEN","REIT","RELIANCE","REN","RENT","RENTALS","REPAIR","REPORT","REPUBLICAN","REST","RESTAURANT","REVIEW","REVIEWS","REXROTH","RICH","RICHARDLI","RICOH","RIL","RIO","RIP","RO","ROCHER","ROCKS","RODEO","ROGERS","ROOM","RS","RSVP","RU","RUGBY","RUHR","RUN","RW","RWE","RYUKYU","SA","SAARLAND","SAFE","SAFETY","SAKURA","SALE","SALON","SAMSCLUB","SAMSUNG","SANDVIK","SANDVIKCOROMANT","SANOFI","SAP","SARL","SAS","SAVE","SAXO","SB","SBI","SBS","SC","SCA","SCB","SCHAEFFLER","SCHMIDT","SCHOLARSHIPS","SCHOOL","SCHULE","SCHWARZ","SCIENCE","SCOT","SD","SE","SEARCH","SEAT","SECURE","SECURITY","SEEK","SELECT","SENER","SERVICES","SES","SEVEN","SEW","SEX","SEXY","SFR","SG","SH","SHANGRILA","SHARP","SHAW","SHELL","SHIA","SHIKSHA","SHOES","SHOP","SHOPPING","SHOUJI","SHOW","SHOWTIME","SI","SILK","SINA","SINGLES","SITE","SJ","SK","SKI","SKIN","SKY","SKYPE","SL","SLING","SM","SMART","SMILE","SN","SNCF","SO","SOCCER","SOCIAL","SOFTBANK","SOFTWARE","SOHU","SOLAR","SOLUTIONS","SONG","SONY","SOY","SPA","SPACE","SPORT","SPOT","SR","SRL","SS","ST","STADA","STAPLES","STAR","STATEBANK","STATEFARM","STC","STCGROUP","STOCKHOLM","STORAGE","STORE","STREAM","STUDIO","STUDY","STYLE","SU","SUCKS","SUPPLIES","SUPPLY","SUPPORT","SURF","SURGERY","SUZUKI","SV","SWATCH","SWISS","SX","SY","SYDNEY","SYSTEMS","SZ","TAB","TAIPEI","TALK","TAOBAO","TARGET","TATAMOTORS","TATAR","TATTOO","TAX","TAXI","TC","TCI","TD","TDK","TEAM","TECH","TECHNOLOGY","TEL","TEMASEK","TENNIS","TEVA","TF","TG","TH","THD","THEATER","THEATRE","TIAA","TICKETS","TIENDA","TIFFANY","TIPS","TIRES","TIROL","TJ","TJMAXX","TJX","TK","TKMAXX","TL","TM","TMALL","TN","TO","TODAY","TOKYO","TOOLS","TOP","TORAY","TOSHIBA","TOTAL","TOURS","TOWN","TOYOTA","TOYS","TR","TRADE","TRADING","TRAINING","TRAVEL","TRAVELCHANNEL","TRAVELERS","TRAVELERSINSURANCE","TRUST","TRV","TT","TUBE","TUI","TUNES","TUSHU","TV","TVS","TW","TZ","UA","UBANK","UBS","UG","UK","UNICOM","UNIVERSITY","UNO","UOL","UPS","US","UY","UZ","VA","VACATIONS","VANA","VANGUARD","VC","VE","VEGAS","VENTURES","VERISIGN","VERSICHERUNG","VET","VG","VI","VIAJES","VIDEO","VIG","VIKING","VILLAS","VIN","VIP","VIRGIN","VISA","VISION","VIVA","VIVO","VLAANDEREN","VN","VODKA","VOLKSWAGEN","VOLVO","VOTE","VOTING","VOTO","VOYAGE","VU","VUELOS","WALES","WALMART","WALTER","WANG","WANGGOU","WATCH","WATCHES","WEATHER","WEATHERCHANNEL","WEBCAM","WEBER","WEBSITE","WED","WEDDING","WEIBO","WEIR","WF","WHOSWHO","WIEN","WIKI","WILLIAMHILL","WIN","WINDOWS","WINE","WINNERS","WME","WOLTERSKLUWER","WOODSIDE","WORK","WORKS","WORLD","WOW","WS","WTC","WTF","XBOX","XEROX","XFINITY","XIHUAN","XIN","XN--11B4C3D","XN--1CK2E1B","XN--1QQW23A","XN--2SCRJ9C","XN--30RR7Y","XN--3BST00M","XN--3DS443G","XN--3E0B707E","XN--3HCRJ9C","XN--3PXU8K","XN--42C2D9A","XN--45BR5CYL","XN--45BRJ9C","XN--45Q11C","XN--4DBRK0CE","XN--4GBRIM","XN--54B7FTA0CC","XN--55QW42G","XN--55QX5D","XN--5SU34J936BGSG","XN--5TZM5G","XN--6FRZ82G","XN--6QQ986B3XL","XN--80ADXHKS","XN--80AO21A","XN--80AQECDR1A","XN--80ASEHDB","XN--80ASWG","XN--8Y0A063A","XN--90A3AC","XN--90AE","XN--90AIS","XN--9DBQ2A","XN--9ET52U","XN--9KRT00A","XN--B4W605FERD","XN--BCK1B9A5DRE4C","XN--C1AVG","XN--C2BR7G","XN--CCK2B3B","XN--CCKWCXETD","XN--CG4BKI","XN--CLCHC0EA0B2G2A9GCD","XN--CZR694B","XN--CZRS0T","XN--CZRU2D","XN--D1ACJ3B","XN--D1ALF","XN--E1A4C","XN--ECKVDTC9D","XN--EFVY88H","XN--FCT429K","XN--FHBEI","XN--FIQ228C5HS","XN--FIQ64B","XN--FIQS8S","XN--FIQZ9S","XN--FJQ720A","XN--FLW351E","XN--FPCRJ9C3D","XN--FZC2C9E2C","XN--FZYS8D69UVGM","XN--G2XX48C","XN--GCKR3F0F","XN--GECRJ9C","XN--GK3AT1E","XN--H2BREG3EVE","XN--H2BRJ9C","XN--H2BRJ9C8C","XN--HXT814E","XN--I1B6B1A6A2E","XN--IMR513N","XN--IO0A7I","XN--J1AEF","XN--J1AMH","XN--J6W193G","XN--JLQ480N2RG","XN--JVR189M","XN--KCRX77D1X4A","XN--KPRW13D","XN--KPRY57D","XN--KPUT3I","XN--L1ACC","XN--LGBBAT1AD8J","XN--MGB9AWBF","XN--MGBA3A3EJT","XN--MGBA3A4F16A","XN--MGBA7C0BBN0A","XN--MGBAAKC7DVF","XN--MGBAAM7A8H","XN--MGBAB2BD","XN--MGBAH1A3HJKRD","XN--MGBAI9AZGQP6J","XN--MGBAYH7GPA","XN--MGBBH1A","XN--MGBBH1A71E","XN--MGBC0A9AZCG","XN--MGBCA7DZDO","XN--MGBCPQ6GPA1A","XN--MGBERP4A5D4AR","XN--MGBGU82A","XN--MGBI4ECEXP","XN--MGBPL2FH","XN--MGBT3DHD","XN--MGBTX2B","XN--MGBX4CD0AB","XN--MIX891F","XN--MK1BU44C","XN--MXTQ1M","XN--NGBC5AZD","XN--NGBE9E0A","XN--NGBRX","XN--NODE","XN--NQV7F","XN--NQV7FS00EMA","XN--NYQY26A","XN--O3CW4H","XN--OGBPF8FL","XN--OTU796D","XN--P1ACF","XN--P1AI","XN--PGBS0DH","XN--PSSY2U","XN--Q7CE6A","XN--Q9JYB4C","XN--QCKA1PMC","XN--QXA6A","XN--QXAM","XN--RHQV96G","XN--ROVU88B","XN--RVC1E0AM3E","XN--S9BRJ9C","XN--SES554G","XN--T60B56A","XN--TCKWE","XN--TIQ49XQYJ","XN--UNUP4Y","XN--VERMGENSBERATER-CTB","XN--VERMGENSBERATUNG-PWB","XN--VHQUV","XN--VUQ861B","XN--W4R85EL8FHU5DNRA","XN--W4RS40L","XN--WGBH1C","XN--WGBL6A","XN--XHQ521B","XN--XKC2AL3HYE2A","XN--XKC2DL3A5EE0H","XN--Y9A3AQ","XN--YFRO4I67O","XN--YGBI2AMMX","XN--ZFR164B","XXX","XYZ","YACHTS","YAHOO","YAMAXUN","YANDEX","YE","YODOBASHI","YOGA","YOKOHAMA","YOU","YOUTUBE","YT","YUN","ZA","ZAPPOS","ZARA","ZERO","ZIP","ZM","ZONE","ZUERICH","ZW"],s=/\.([^.\n\s]*)$/,c=t.match(s)[1].toUpperCase(),u=i.includes(c),N("Regwall Validate: ","TLD search ".concat(u)),!1!==u){e.next=16;break}return e.abrupt("return",{valid:!1,message:"Please, enter a valid email domain.",exist:null});case 16:if(-1!==r.findIndex((function(e){return e===t.split("@")[1]}))){e.next=23;break}return l="".concat(E.entitlementsEndpoint,"auth0/getDefaultUserConnection"),e.next=21,fetch(l,{method:"POST",body:JSON.stringify({email:t}),headers:{"X-API-Key":E.entitlementsApiKey}}).then((function(e){return e.json()})).then((function(e){return"object"===a(e)&&e.uuid?{valid:!0,message:"",exist:!0}:"string"==typeof e&&"User email not found"===e?(document.getElementById("tribRegiwallSubButtonId").textContent="Submitting...",{valid:!0,message:"",exist:!1,email:t}):{valid:!1,message:e.message,exist:null}})).catch((function(e){return N("Regwall Validate: ",e),document.getElementById("tribRegiwallSubButtonId").textContent="Continue",{valid:!1,message:"Email validation network error, try again.",exist:null}}));case 21:return f=e.sent,e.abrupt("return",f);case 23:return e.abrupt("return",{valid:!1,message:"This email is blocked, try another.",exist:null});case 24:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=function(e,t){var n=document.querySelector(".connext-error-message");t?(N("Regwall Validate: ","show message: ".concat(e)),n.innerHTML=e,n.style.display="block"):(n.textContent="",n.style.display="none")},le=function(e){e.valid?(ue("",!1),se().classList.remove("connext-validation-error")):(N("Regwall Validate: ","update message"),ue(e.message,!0),se().classList.add("connext-validation-error"))},fe=function(e){if(N("Regwall Validate: ","In goToSuccessStep"),document.querySelector(".hide-on-success").style.display="none",le({valid:!0}),!0===e){N("Regwall Validate: ","Registration success was successful."),document.querySelector(".show-on-success").style.display="block";var t=se();(window._matherq=window._matherq||[]).push(["paywallEvent",{type:"regwall",category:"regwall_registration",action:"completed"},{email:t.value}]),t.value="",localStorage.setItem("regwallSuccess","yes")}else{N("Regwall Validate: ","Registration is not unique."),document.querySelector(".show-on-alreadyRegisterd").style.display="block",localStorage.setItem("regwallAlreadyRegistered","yes")}};var Ae=function(){var e=t(o().mark((function e(t){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N("Regwall Validate: ","starting subscribe function"),t.preventDefault(),n=document.querySelector(".registrationWallID").textContent,e.next=5,ce();case 5:if(!1===(r=e.sent).valid&&(document.getElementById("tribRegiwallSubButtonId").textContent="Continue"),le(r),!(r.valid&&n.length>0&&!1===r.exist)){e.next=16;break}return N("Regwall Validate: ","validation good, success message"),e.next=12,ne(r.email,n);case 12:e.sent?(N("Regwall Validate: ","newsletter subscription was successful."),fe(!0)):(N("Regwall Validate: ","newsletter subscription was a FAIL."),le({valid:!1,message:"Newsletter subscription failed."})),e.next=17;break;case 16:r.valid&&n.length>0&&!0===r.exist?(N("Regwall Validate: ","validation failed, email already exists"),fe(!1),ue("Email already exists, try again.",!0)):0===n.length&&(N("Regwall Validate: ","validation failed, no newsletter code"),ue("Newsletter field is empty",!0));case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function de(){le({valid:!0})}var Ee=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P();case 2:return t=e.sent,N("Regwall Validate: ","Page type is ",t),e.next=6,MNGAuthentication.getUserInfo();case 6:if(n=e.sent,"article"===t&&!n.authenticated){e.next=10;break}return N("Regwall Validate: ","Returning, since page type was not article or user was logged in"),e.abrupt("return");case 10:N("Regwall Validate: ","Starting regwall validation code, adding listeners."),K("#tribRegiwallSubButtonId","click",Ae),K(".connext-trib-email-input","input",de),document.addEventListener("keyup",(function(e){"Enter"===e.code&&"tribRegiwallEmailId"===document.activeElement.id&&Ae(e)}));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ie.init(),e.next=3,G(!0);case 3:Ee();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()})()})();; (()=>{var e={553:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),a=new A(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return N()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?h:d,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",m={};function v(){}function w(){}function g(){}var y={};c(y,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(O([])));x&&x!==n&&r.call(x,i)&&(y=x);var k=g.prototype=v.prototype=Object.create(y);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,i,a,s){var c=l(e[o],e,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function T(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:O(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},757:(e,t,n)=>{e.exports=n(553)},669:(e,t,n)=>{e.exports=n(609)},448:(e,t,n)=>{"use strict";var r=n(867),o=n(26),i=n(372),a=n(327),s=n(97),c=n(109),u=n(985),l=n(61),f=n(655),d=n(263);e.exports=function(e){return new Promise((function(t,n){var p,h=e.data,m=e.headers,v=e.responseType;function w(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(h)&&delete m["Content-Type"];var g=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(y+":"+b)}var x=s(e.baseURL,e.url);function k(){if(g){var r="getAllResponseHeaders"in g?c(g.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g};o((function(e){t(e),w()}),(function(e){n(e),w()}),i),g=null}}if(g.open(e.method.toUpperCase(),a(x,e.params,e.paramsSerializer),!0),g.timeout=e.timeout,"onloadend"in g?g.onloadend=k:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(k)},g.onabort=function(){g&&(n(l("Request aborted",e,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",e,null,g)),g=null},g.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||f.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var E=(e.withCredentials||u(x))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;E&&(m[e.xsrfHeaderName]=E)}"setRequestHeader"in g&&r.forEach(m,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete m[t]:g.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(g.withCredentials=!!e.withCredentials),v&&"json"!==v&&(g.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&g.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){g&&(n(!e||e&&e.type?new d("canceled"):e),g.abort(),g=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),h||(h=null),g.send(h)}))}},609:(e,t,n)=>{"use strict";var r=n(867),o=n(849),i=n(321),a=n(185);var s=function e(t){var n=new i(t),s=o(i.prototype.request,n);return r.extend(s,i.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(655));s.Axios=i,s.Cancel=n(263),s.CancelToken=n(972),s.isCancel=n(502),s.VERSION=n(288).version,s.all=function(e){return Promise.all(e)},s.spread=n(713),s.isAxiosError=n(268),e.exports=s,e.exports.default=s},263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:(e,t,n)=>{"use strict";var r=n(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(867),o=n(327),i=n(782),a=n(572),s=n(185),c=n(875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(i),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var f=e;n.length;){var d=n.shift(),p=n.shift();try{f=d(f)}catch(e){p(e);break}}try{o=a(f)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:(e,t,n)=>{"use strict";var r=n(793),o=n(303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},61:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},572:(e,t,n)=>{"use strict";var r=n(867),o=n(527),i=n(502),a=n(655),s=n(263);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},185:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function c(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||i,o=t(e);r.isUndefined(o)&&t!==c||(n[e]=o)})),n}},26:(e,t,n)=>{"use strict";var r=n(61);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},527:(e,t,n)=>{"use strict";var r=n(867),o=n(655);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},655:(e,t,n)=>{"use strict";var r=n(867),o=n(16),i=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(448)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(a)})),e.exports=u},288:e=>{e.exports={version:"0.24.0"}},849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},109:(e,t,n)=>{"use strict";var r=n(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:(e,t,n)=>{"use strict";var r=n(288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},867:(e,t,n)=>{"use strict";var r=n(849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function s(t){e(a,o,i,s,c,"next",t)}function c(t){e(a,o,i,s,c,"throw",t)}s(void 0)}))}}var r=n(757),o=n.n(r);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}const a={debug:!!window.authentication_config.debug,sessionManagementEnabled:!!window.authentication_config&&"1"===window.authentication_config.sessionManagementEnabled,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.entitlements_config?window.entitlements_config.entitlementsEndpoint:"",entitlementsApiKey:window.entitlements_config?window.entitlements_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.entitlements_config&&window.entitlements_config.linaCheckOnArticles,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled};const s=function(){if(a.debug){for(var e,t=arguments.length,n=new Array(t),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function d(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(f(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return f(t)}}function p(e){this.message=e}p.prototype=new Error,p.prototype.name="InvalidTokenError";const h=function(e,t){if("string"!=typeof e)throw new p("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(d(e.split(".")[n]))}catch(e){throw new p("Invalid token specified: "+e.message)}},m="mng-entitlements",v="__MNG_Session",w="isAuthenticatedSSOR";var g=function(){var e=window.location.href;return new URL(e)},y=function(e){for(var t="".concat(e,"="),n=decodeURIComponent(document.cookie).split(";"),r=0;r0&&void 0!==arguments[0]&&arguments[0],t=g(),n=t.hostname,r=n;e&&"string"==typeof e&&(r=e);var o=r.split(".");return"".concat(o[o.length-2],".").concat(o[o.length-1])},x=function(e,t,n){var r="".concat(e,"=").concat(t,";");void 0!==n?(s("Setting cookie with options: ",n),Object.entries(n).forEach((function(e){var t=u(e,2),n=t[0],o=t[1];if("expires"===n){var i=new Date;i.setTime(i.getTime()+24*o*60*60*1e3),r+="expires=".concat(i.toUTCString(),";")}else r+="".concat(n,"=").concat(o,";")}))):r+="path=/;",document.cookie=r},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="".concat(e,"= ;expires= Thu, 01 Jan 1970 00:00:00 GMT;"),o=b(),i="www".concat(o),a=".www".concat(o),s=[o,i,a];n&&s.push(n),Object.entries(t).forEach((function(e){var t=u(e,2),n=t[0],o=t[1];r+="".concat(n,"=").concat(o,";")})),0===Object.keys(t).length&&(r+="path=/;"),document.cookie=r,s.forEach((function(e){document.cookie=r.concat("domain=",e,";")}))},E=function(e){return h(e)},S=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={};if("string"!=typeof e||""===e||t){if(!t)return{};n.ssor_id=t,n.sub=t}else{var r,o=E(e),i=o.sub,a=o.email_verified,c=null!==(r=o["http://medianewsgroup.com/ssor_id"])&&void 0!==r&&r;n={sub:i,email_verified:a,ssor_id:c}}return s("Utils: createTokenData: create entitlement token with these: ",n),n},T=function(){return"complete"===document.readyState},_=function(){var e=t(o().mark((function e(n){var r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){if(T())e();else{s("Utils digisubsDataLayerLoaded: ","Waiting for the dataLayer to load...");var n=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.dataLayer&&window.dataLayer.length>2&&(clearInterval(n),e(!0));case 1:case"end":return t.stop()}}),t)}))),200)}}));case 2:if(s("Utils getDataLayerObject: looking for this dataLayer object ",n),window.dataLayer=window.dataLayer||[],r="",s("Utils getDataLayerObject: here is dataLayer length ",dataLayer.length),i=function(e){return s("Utils dataLayerLoop: look for this element ",e),e[n]?(s("Utils dataLayerLoop: found ",e[n]),r=e[n],e[n]):(s("Utils dataLayerLoop: dataLayer search ",!1),!1)},!dataLayer.some(i)){e.next=10;break}return e.abrupt("return",r);case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=t(o().mark((function e(){var t,n,r=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"Page Type",e.next=3,_(t);case 3:return n=e.sent,s("Utils pageType: page type is ",n),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){return new Promise((function(e,t){void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady?(s("Authentication already ready: ",window.MNGAuthentication.authenticationReady),e(window.MNGAuthentication.authenticationReady)):(s("Adding authenticationReady listener..."),window.addEventListener("authenticationReady",(function(n){try{var r=n.detail||{};s("Event: authentication ready: ",r),e(r)}catch(e){s(e),t(e)}}),!1))}))},O=function(){s("Clearing entitlements...");try{k(m,{path:"/"})}catch(e){s("Failed to delete legacy cookie: ",e)}try{k(m,{path:"/",domain:b(),expires:365,secure:!0})}catch(e){s("Failed to delete entitlements cookie: ",e)}try{window.localStorage.removeItem(v)}catch(e){s("Failed to remove local storage: ",e)}};var N=n(669),j=n.n(N),C=function(){try{var e=localStorage.getItem(v);return"string"==typeof e?e:"{}"}catch(e){s("Unable to get session from local storage: ",e)}return"{}"},R=function(e){try{s("Setting local storage session",e),localStorage.setItem(v,e)}catch(e){s("Unable to save session from local storage: ",e)}},U=function(){var e=t(o().mark((function e(){var t,n,r,i,c,u,l,f,d,p;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(a.sessionServer,"/api/session"),s("Checking server session: ",t),e.next=5,j().get(t,{withCredentials:!0});case 5:if(!(n=e.sent).data){e.next=10;break}return r=n.data,i=r.idToken,c=r.entitlementToken,u=r.expiration,l=r.entitlementSource,f=r.isEntitled,d=r.adFree,p=r.entitlementLevel,R(JSON.stringify({idToken:i,entitlementToken:c,expiration:u,entitlementSource:l,isEntitled:f,adFree:d,entitlementLevel:p})),e.abrupt("return",{idToken:i,entitlementToken:c,expiration:u,entitlementSource:l,isEntitled:f,adFree:d,entitlementLevel:p});case 10:return e.abrupt("return",{idToken:null,entitlementToken:null,expiration:null,entitlementSource:null,isEntitled:null,adFree:null,entitlementLevel:null});case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n="".concat(a.sessionServer,"/api/session"),s("Updating server session: ",n),e.next=6,j().post(n,t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),s("Failed to update session server: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=t(o().mark((function e(){var t,n,r,i,a,c,u,l,f,d,p,h,m,v,w,g,y,b,x,k,E,S,T,_;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s("Inside getSession"),e.prev=1,l=C(),s("Session: __MNG_Session = ",l),f=JSON.parse(l),d=f.idToken,p=f.entitlementToken,h=f.expiration,m=f.entitlementSource,v=f.isEntitled,w=f.adFree,g=f.entitlementLevel,r=h,i=m,a=v,c=w,u=g,s("Session: check both tokens: ",t=d,n=p),void 0!==d&&void 0!==p&&null!==d&&null!==p){e.next=32;break}return s("Session: missing id or entitlements, try session server"),e.next=17,U();case 17:y=e.sent,b=y.idToken,x=y.entitlementToken,k=y.expiration,E=y.entitlementSource,S=y.isEntitled,T=y.adFree,_=y.entitlementLevel,t=b,n=x,r=k,i=E,a=S,c=T,u=_;case 32:e.next=37;break;case 34:e.prev=34,e.t0=e.catch(1),s("Failed to get session: ",e.t0);case 37:return s("Returning session: ",t,n),e.abrupt("return",{idToken:t,entitlementToken:n,expiration:r,entitlementSource:i,isEntitled:a,adFree:c,entitlementLevel:u});case 39:case"end":return e.stop()}}),e,null,[[1,34]])})));return function(){return e.apply(this,arguments)}}(),F=function(){var e=t(o().mark((function e(t){var n,r,i,a,c,u,l,f,d,p,h,m,v,w,g,y,b,x,k,E,S,T,_,L,A;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=C(),r=JSON.parse(n),i=r.idToken,a=void 0===i?null:i,c=r.entitlementToken,u=void 0===c?null:c,l=r.expiration,f=void 0===l?null:l,d=r.entitlementSource,p=void 0===d?null:d,h=r.isEntitled,m=void 0===h?null:h,v=r.adFree,w=void 0===v?null:v,g=r.entitlementLevel,y=void 0===g?null:g,b=t.idToken,x=t.entitlementToken,k=t.expiration,E=t.entitlementSource,S=t.isEntitled,T=t.adFree,_=t.entitlementLevel,L={idToken:null==b?a:b,entitlementToken:null==x?u:x,expiration:null==k?f:k,entitlementSource:null==E?p:E,isEntitled:null==S?m:S,adFree:null==T?w:T,entitlementLevel:null==_?y:_},s("Current session data: ",r),s("New session data: ",t),s("Updated session data:",L),A=JSON.stringify(L),R(A),n===A){e.next=14;break}return e.next=14,P(L);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),s("Unable to save session: ",e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=window.localStorage.getItem(v);return JSON.parse(e)},D=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.sessionManagementEnabled){e.next=5;break}return e.next=3,I();case 3:return t=e.sent,e.abrupt("return",t);case 5:return n=M(),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,x(m,t,{path:"/",domain:(r=void 0,r=b(),".".concat(r)),expires:365,secure:!0}),s("About to decode token before saving: ",t),n=E(t),!a.sessionManagementEnabled){e.next=9;break}return e.next=7,F({entitlementToken:t,expiration:n.session_exp,entitlementSource:n.entitlement_source,isEntitled:n.entitlement_entitled,adFree:n.entitlement_extras_adfree||!1,entitlementLevel:n.entitlement_level});case 7:e.next=10;break;case 9:window.localStorage.setItem(v,JSON.stringify({entitlementToken:t,expiration:n.session_exp,entitlementSource:n.entitlement_source,isEntitled:n.entitlement_entitled,adFree:n.entitlement_extras_adfree||!1,entitlementLevel:n.entitlement_level}));case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),s("Entitlements: Failed to save token: ",e.t0);case 15:case"end":return e.stop()}var r}),e,null,[[0,12]])})));return function(t){return e.apply(this,arguments)}}(),B=function(){var e=t(o().mark((function e(n){var r,i,c,u,l,f,d,p;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!1,!a.sessionManagementEnabled){e.next=8;break}return e.next=4,I();case 4:(i=e.sent).idToken!==w&&(c=E(i.idToken),r=void 0!==c&&c.email_verified),e.next=14;break;case 8:return e.next=10,A();case 10:u=e.sent,l=u.idToken,f=u.ssorCookie,""===l||f||(r=E(l).email_verified);case 14:if(s("Entitlements: refresh JWT start..."),n){e.next=17;break}return e.abrupt("return",new Error("No token to refresh"));case 17:return s("Entitlements refresh: entitlement token: ",n),s("Entitlements refresh: auth0 verified: ",r),d={jwt:n,verified:r},p="".concat(a.entitlementsEndpoint,"session/refresh"),e.abrupt("return",new Promise((function(e){var n,r;$.ajax({type:"POST",url:p,headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-Api-Key":a.entitlementsApiKey},data:JSON.stringify(d),success:(r=t(o().mark((function t(n){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("string"==typeof n.jwt){t.next=2;break}return t.abrupt("return",new Error("Entitlements API returned no JWT"));case 2:return s("Entitlements: Request successful: ",n),t.next=5,G(n.jwt);case 5:return t.abrupt("return",e(n.jwt));case 6:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)}),error:(n=t(o().mark((function e(t,n,r){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s("Entitlements: Request Failure: ",r),O(),!a.sessionManagementEnabled){e.next=5;break}return e.next=5,F({entitlementToken:null});case 5:return e.abrupt("return",new Error("Entitlements Refresh failure"));case 6:case"end":return e.stop()}}),e)}))),function(e,t,r){return n.apply(this,arguments)})})})));case 22:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),J=function(e){return new Promise((function(n,r){if(s("Entitlements: create token start..."),s("Entitlements: createToken payload with ",e),"object"!==i(e)&&"string"!=typeof e.sub)return r(new Error("No user info to create token"));var c,u,l=b();e.sub&&(u=!!e.ssor_id&&e.ssor_id,c=e.sub),e.ssor_id&&(u=e.ssor_id),e.ssor_id&&(l=function(e){if(!e.includes("trbdevcloud"))return e;var t=g().hostname.split(".")[1],n=t.split("-").length>2?"".concat(t.split("-")[0],"-").concat(t.split("-")[1]):t.split("-")[0];return"".concat(n,".com")}(l));var f,d={uuid:c,email:e.email,verified:e.email_verified,publication:l.replace(".local",".com"),source:!!e.ssor_id&&"TRIBUNE",ssorId:u},p="".concat(a.entitlementsEndpoint,"session/create");return s("Entitlements: create payload",d),$.ajax({type:"POST",url:p,headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-Api-Key":a.entitlementsApiKey},data:JSON.stringify(d),success:(f=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"==typeof t.jwt){e.next=2;break}return e.abrupt("return",r(new Error("Entitlements API returned no JWT")));case 2:return s("Entitlements: Token Created: ",t),e.next=5,G(t.jwt);case 5:return e.abrupt("return",n(t.jwt));case 6:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)}),error:function(e,t,n){s("Entitlements: Create Token Failure: ",t,n),r(new Error("Entitlements: Create Token Failure"))}})}))},q=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,D();case 3:if(t=e.sent,!((n=Date.now()/1e3) ").concat(t.expiration)),e.abrupt("return",B(t.entitlementToken));case 11:return e.prev=11,e.t0=e.catch(0),s("Entitlements: Local Storage: Error processing token: ",e.t0.message),e.abrupt("return",!1);case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}(),K=function(){var e=t(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=y(m),e.next=4,B(t);case 4:return e.abrupt("return",e.sent);case 7:return e.prev=7,e.t0=e.catch(0),s("Entitlements: Cookie: Error processing token: ",e.t0.message),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),z=function(e){s("Attempting to broadcast entitlements ready...",e);try{var t={token:e};if(e){s("About to decode token before broadcasting: ",e);var n=E(e);t=Object.assign(t,{isEntitled:n.entitlement_entitled,adfree:n.entitlement_extras_adfree||!1,subscriptionLevel:n.entitlement_level})}var r=new CustomEvent("entitlementsReady",{detail:t});window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.entitlementsReady=t,s("Dispatching entitlementsReady Event: ",r),window.dispatchEvent(r),s("Dispatched entitlementsReady event")}catch(e){var o={token:""};o=Object.assign(o,{isEntitled:"unknown",adfree:"unknown",subscriptionLevel:"unknown"});var i=new CustomEvent("entitlementsReady",{detail:o});window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.entitlementsReady=o,s("Dispatching entitlementsReady EMPTY Event: ",i),window.dispatchEvent(i),s("Dispatched entitlementsReady EMPTY event"),s("Error: ",e)}},H=function(){var e=t(o().mark((function e(t,n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=S(t,n),e.next=4,J(r);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),s("Entitlements error during oidc login callback: ",e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t,n){return e.apply(this,arguments)}}();window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.isUserAdFree=function(){var e=JSON.parse(window.localStorage.getItem(v));return null!=e&&(s("Ad Free Check: : ",e.adFree),e.adFree)},window.MNGAuthentication.isUserSubscriber=function(){var e=JSON.parse(window.localStorage.getItem(v));return null!=e&&(s("Subscriber Check: : ",e.isEntitled),e.isEntitled)};const W={init:function(){var e=t(o().mark((function e(){var t,n,r,i,c,u,l,f,d,p,h,m,v,w,g,y,b;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.entitlementsEnabled){e.next=92;break}return t=window.location,n=new URL(t.href),e.next=5,A();case 5:if(r=e.sent,i=r.idToken,c=r.ssorCookie,void 0!==window.MNGAuthentication&&Array.isArray(window.MNGAuthentication.oidcLoginCallbacks)&&window.MNGAuthentication.oidcLoginCallbacks.push(H),e.prev=9,!n.searchParams.has("newUser")){e.next=22;break}if("string"!=typeof i||""===i){e.next=21;break}return l=S(i,c),e.next=15,J(l);case 15:if(!(u=e.sent)){e.next=19;break}return s("Entitlements Init: Created new token for new subscriber"),e.abrupt("return",z(u));case 19:e.next=22;break;case 21:s("New subscription, no idToken.");case 22:e.next=27;break;case 24:e.prev=24,e.t0=e.catch(9),s("Not a new subscriber.");case 27:return e.prev=27,e.next=30,q();case 30:if(!((f=e.sent)instanceof Error)){e.next=33;break}throw f;case 33:f&&(u=f,s("Entitlements Init: Local Storage Token exists")),e.next=39;break;case 36:e.prev=36,e.t1=e.catch(27),s("Error during Local Storage Token check: ",e.t1);case 39:if(e.prev=39,u){e.next=47;break}return e.next=43,K();case 43:if(!((d=e.sent)instanceof Error)){e.next=46;break}throw d;case 46:d&&(u=d,s("Entitlements Init: Cookie Token exists"));case 47:e.next=52;break;case 49:e.prev=49,e.t2=e.catch(39),s("Error during Cookie Token check: ",e.t2);case 52:if(!u){e.next=75;break}if(!a.linaCheckOnArticles){e.next=74;break}return p=E(u),h=p.entitlement_entitled,m=p.iat,s("LINA check: isEntitled: ".concat(h,", token created at: ").concat(m)),e.next=58,L("Paywall_Level");case 58:if(v=e.sent,w="metered"===v||"premium"===v,!(a.linaCheckOnArticles&&!h&&w&&Date.now()/1e3-new Date(m)>50)){e.next=74;break}if(s("Checking entitlements again for LINA user."),""===i){e.next=73;break}return g=S(i,c),e.next=67,J(g);case 67:if(!(y=e.sent)){e.next=71;break}return s("Entitlements Init: Created new token for LINA user"),e.abrupt("return",z(y));case 71:e.next=74;break;case 73:s("LINA check, no idToken.");case 74:return e.abrupt("return",z(u));case 75:if(e.prev=75,"string"!=typeof i||""===i){e.next=86;break}return b=S(i,c),e.next=80,J(b);case 80:if(!(u=e.sent)){e.next=84;break}return s("Entitlements Init: Created new token"),e.abrupt("return",z(u));case 84:e.next=87;break;case 86:s("No OIDC ID Token. Not creating a new entitlements token.");case 87:e.next=92;break;case 89:e.prev=89,e.t3=e.catch(75),s("Unable to create token during initialize: ",e.t3);case 92:return e.abrupt("return",z(!1));case 93:case"end":return e.stop()}}),e,null,[[9,24],[27,36],[39,49],[75,89]])})));return function(){return e.apply(this,arguments)}}()};(function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W.init();case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()})()})();; (()=>{var e={553:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),i=new A(r||[]);return a._invoke=function(e,t,n){var r=d;return function(o,a){if(r===f)throw new Error("Generator is already running");if(r===m){if("throw"===o)throw a;return T()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=L(i,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?m:p,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=m,n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",m="completed",h={};function g(){}function w(){}function v(){}var y={};c(y,a,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(I([])));x&&x!==n&&r.call(x,a)&&(y=x);var E=v.prototype=g.prototype=Object.create(y);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,s){var c=l(e[o],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,s)}))}s(c.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function L(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},757:(e,t,n)=>{e.exports=n(553)},669:(e,t,n)=>{e.exports=n(609)},448:(e,t,n)=>{"use strict";var r=n(867),o=n(26),a=n(372),i=n(327),s=n(97),c=n(109),u=n(985),l=n(61),d=n(655),p=n(263);e.exports=function(e){return new Promise((function(t,n){var f,m=e.data,h=e.headers,g=e.responseType;function w(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}r.isFormData(m)&&delete h["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(y+":"+b)}var x=s(e.baseURL,e.url);function E(){if(v){var r="getAllResponseHeaders"in v?c(v.getAllResponseHeaders()):null,a={data:g&&"text"!==g&&"json"!==g?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:r,config:e,request:v};o((function(e){t(e),w()}),(function(e){n(e),w()}),a),v=null}}if(v.open(e.method.toUpperCase(),i(x,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=E:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(E)},v.onabort=function(){v&&(n(l("Request aborted",e,"ECONNABORTED",v)),v=null)},v.onerror=function(){n(l("Network Error",e,null,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},r.isStandardBrowserEnv()){var k=(e.withCredentials||u(x))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;k&&(h[e.xsrfHeaderName]=k)}"setRequestHeader"in v&&r.forEach(h,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete h[t]:v.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),g&&"json"!==g&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){v&&(n(!e||e&&e.type?new p("canceled"):e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),m||(m=null),v.send(m)}))}},609:(e,t,n)=>{"use strict";var r=n(867),o=n(849),a=n(321),i=n(185);var s=function e(t){var n=new a(t),s=o(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return e(i(t,n))},s}(n(655));s.Axios=a,s.Cancel=n(263),s.CancelToken=n(972),s.isCancel=n(502),s.VERSION=n(288).version,s.all=function(e){return Promise.all(e)},s.spread=n(713),s.isAxiosError=n(268),e.exports=s,e.exports.default=s},263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:(e,t,n)=>{"use strict";var r=n(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(867),o=n(327),a=n(782),i=n(572),s=n(185),c=n(875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new a,response:new a}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var l=[i,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(a),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var d=e;n.length;){var p=n.shift(),f=n.shift();try{d=p(d)}catch(e){f(e);break}}try{o=i(d)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:(e,t,n)=>{"use strict";var r=n(793),o=n(303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},61:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},572:(e,t,n)=>{"use strict";var r=n(867),o=n(527),a=n(502),i=n(655),s=n(263);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},185:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function i(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function c(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||a,o=t(e);r.isUndefined(o)&&t!==c||(n[e]=o)})),n}},26:(e,t,n)=>{"use strict";var r=n(61);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},527:(e,t,n)=>{"use strict";var r=n(867),o=n(655);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},655:(e,t,n)=>{"use strict";var r=n(867),o=n(16),a=n(481),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(448)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(i)})),e.exports=u},288:e=>{e.exports={version:"0.24.0"}},849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},109:(e,t,n)=>{"use strict";var r=n(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:(e,t,n)=>{"use strict";var r=n(288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,i){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!a[r]&&(a[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,i)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],i=t[a];if(i){var s=e[a],c=void 0===s||i(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:o}},867:(e,t,n)=>{"use strict";var r=n(849),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,a){var i=t.apply(n,r);function s(t){e(i,o,a,s,c,"next",t)}function c(t){e(i,o,a,s,c,"throw",t)}s(void 0)}))}}var r=n(757),o=n.n(r);const a={debug:!!window.authentication_config.debug,sessionManagementEnabled:!!window.authentication_config&&"1"===window.authentication_config.sessionManagementEnabled,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.entitlements_config?window.entitlements_config.entitlementsEndpoint:"",entitlementsApiKey:window.entitlements_config?window.entitlements_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.entitlements_config&&window.entitlements_config.linaCheckOnArticles,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled};const i=function(){if(a.debug){for(var e,t=arguments.length,n=new Array(t),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i};function p(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(d(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return d(t)}}function f(e){this.message=e}f.prototype=new Error,f.prototype.name="InvalidTokenError";const m=function(e,t){if("string"!=typeof e)throw new f("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(p(e.split(".")[n]))}catch(e){throw new f("Invalid token specified: "+e.message)}},h="auth0_sub",g="_sp_uid",w="c_mId",v="cs_mId",y="mng-entitlements",b="__MNG_Session",x="isAuthenticatedSSOR",E="c_isLoggedOut";var k=function(){var e=window.location.href;return new URL(e)},S=function(e){for(var t="".concat(e,"="),n=decodeURIComponent(document.cookie).split(";"),r=0;r0&&void 0!==arguments[0]&&arguments[0],t=k(),n=t.hostname,r=n;e&&"string"==typeof e&&(r=e);var o=r.split(".");return"".concat(o[o.length-2],".").concat(o[o.length-1])},N=function(){var e=C();return".".concat(e)},A=function(e,t,n){var r="".concat(e,"=").concat(t,";");void 0!==n?(i("Setting cookie with options: ",n),Object.entries(n).forEach((function(e){var t=u(e,2),n=t[0],o=t[1];if("expires"===n){var a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3),r+="expires=".concat(a.toUTCString(),";")}else r+="".concat(n,"=").concat(o,";")}))):r+="path=/;",document.cookie=r},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="".concat(e,"= ;expires= Thu, 01 Jan 1970 00:00:00 GMT;"),o=C(),a="www".concat(o),i=".www".concat(o),s=[o,a,i];n&&s.push(n),Object.entries(t).forEach((function(e){var t=u(e,2),n=t[0],o=t[1];r+="".concat(n,"=").concat(o,";")})),0===Object.keys(t).length&&(r+="path=/;"),document.cookie=r,s.forEach((function(e){document.cookie=r.concat("domain=",e,";")}))},T=function(){return k().host.replace("www.","").replace("develop.","").replace("preprod.","")},_=function(e){return m(e)},U=function(){return"complete"===document.readyState},O=function(){return new Promise((function(e,t){void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady?(i("Authentication already ready: ",window.MNGAuthentication.authenticationReady),e(window.MNGAuthentication.authenticationReady)):(i("Adding authenticationReady listener..."),window.addEventListener("authenticationReady",(function(n){try{var r=n.detail||{};i("Event: authentication ready: ",r),e(r)}catch(e){i(e),t(e)}}),!1))}))},M=function(){return new Promise((function(e,n){a.entitlementsEnabled?void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.entitlementsReady?(i("Entitlements already ready: ",window.MNGAuthentication.entitlementsReady),e(window.MNGAuthentication.entitlementsReady)):(i("Adding entitlementsReady listener..."),window.addEventListener("entitlementsReady",function(){var r=t(o().mark((function t(r){var a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{a=r.detail||{},i("Event: entitlements ready: ",a),e(a)}catch(e){i(e),n(e)}case 1:case"end":return t.stop()}}),t)})));return function(e){return r.apply(this,arguments)}}(),!1)):e(!1)}))},P=function(){i("Clearing entitlements...");try{I(y,{path:"/"})}catch(e){i("Failed to delete legacy cookie: ",e)}try{I(y,{path:"/",domain:C(),expires:365,secure:!0})}catch(e){i("Failed to delete entitlements cookie: ",e)}try{window.localStorage.removeItem(b)}catch(e){i("Failed to remove local storage: ",e)}},B=function(){I(h),I(g),I(w),I(v);var e=L();e&&(I(w,{},e),I(v,{},e)),P()},j=function(){var e=k();return!["local","develop","preprod","trbdev"].some((function(t){return e.origin.includes(t)}))},R=function(e){i("Removing storageObject : ",e),void 0!==window.localStorage.getItem(e)&&(window.localStorage.removeItem(e),i("Storage Object removed : ",e))},D=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)};var G="#primary-menu",q="#pushnav",F=".log-in-button",H=".subscribe-visibility",J=".log-out-button",z="dfm-digisubs-menu",W="dfm-digisubs-push-menu",K="mega-subscribe-button",X=function(){return document.querySelector(G)},Y=function(){return document.querySelector(q)},V=function(){return document.getElementById(z)},Z=function(){return document.getElementById(W)},Q=function(){return V()?V().querySelector(F):null},ee=function(){return Q()?Q().querySelector("a"):null},te=function(){return document.querySelectorAll(H)};function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function re(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var oe=function(e){try{window.dataLayer.push({event:e}),i("ANALYTICS: ".concat(e," event")),i("ANALYTICS: GA/ datalayer ",window.dataLayer)}catch(t){i("ANALYTICS: Failed to send ".concat(e," event: "),t)}};var ae,ie=n(669),se=n.n(ie),ce=function(){try{var e=localStorage.getItem(b);return"string"==typeof e?e:"{}"}catch(e){i("Unable to get session from local storage: ",e)}return"{}"},ue=function(e){try{i("Setting local storage session",e),localStorage.setItem(b,e)}catch(e){i("Unable to save session from local storage: ",e)}},le=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n="".concat(a.sessionServer,"/api/session"),i("Updating server session: ",n),e.next=6,se().post(n,t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),i("Failed to update session server: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),de=function(){var e=t(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t="".concat(a.sessionServer,"/api/session"),i("Deleting server session: ",t),e.next=6,se().delete(t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),i("Failed to delete server session: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),pe=function(){var e=t(o().mark((function e(t){var n,r,a,s,c,u,l,d,p,f,m,h,g,w,v,y,b,x,E,k,S,L,C,N,A;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=ce(),r=JSON.parse(n),a=r.idToken,s=void 0===a?null:a,c=r.entitlementToken,u=void 0===c?null:c,l=r.expiration,d=void 0===l?null:l,p=r.entitlementSource,f=void 0===p?null:p,m=r.isEntitled,h=void 0===m?null:m,g=r.adFree,w=void 0===g?null:g,v=r.entitlementLevel,y=void 0===v?null:v,b=t.idToken,x=t.entitlementToken,E=t.expiration,k=t.entitlementSource,S=t.isEntitled,L=t.adFree,C=t.entitlementLevel,N={idToken:null==b?s:b,entitlementToken:null==x?u:x,expiration:null==E?d:E,entitlementSource:null==k?f:k,isEntitled:null==S?h:S,adFree:null==L?w:L,entitlementLevel:null==C?y:C},i("Current session data: ",r),i("New session data: ",t),i("Updated session data:",N),A=JSON.stringify(N),ue(A),n===A){e.next=14;break}return e.next=14,le(N);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),i("Unable to save session: ",e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}(),fe=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Ending session..."),B(),e.next=4,de();case 4:localStorage.removeItem(b);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),me=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===ae){e.next=2;break}return e.abrupt("return",ae);case 2:return t=a.auth0Domain,n=a.auth0ClientId,e.next=5,createAuth0Client({domain:t,client_id:n,useRefreshTokens:!0,cacheLocation:"localstorage",audience:"access-extension"});case 5:return ae=e.sent,e.abrupt("return",ae);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.logoutCallbacks=[];var he=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,me();case 2:n=e.sent,i("Calling Auth0 logout..."),n.logout({returnTo:t});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ge=function(){var e=t(o().mark((function e(){var n,r,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Attempting to logout..."),!a.sessionManagementEnabled){e.next=6;break}return e.next=4,fe();case 4:e.next=7;break;case 6:B();case 7:return we(!0),e.prev=8,i("Cycling through logout callbacks..."),n=window.MNGAuthentication.logoutCallbacks.map((function(e){return e()})),e.next=13,Promise.all(n);case 13:i("Finished cycling through logout callbacks."),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(8),i("Failed to cycle through logout callbacks: ",e.t0);case 19:Object.keys(localStorage).filter((function(e){return e.includes("auth0")})).forEach((function(e){localStorage.removeItem(e),i("Removed Auth0 storage object...")})),R("hhsl"),R("userNewsLetterData"),r=k(),s=window.location.origin;try{r.searchParams.get("returnURL")&&(c=decodeURIComponent(r.searchParams.get("returnURL")),s=c)}catch(e){i(e),s=window.location.origin}return s=new URL(s),e.next=29,new Promise((function(e){var t=setTimeout((function(){"undefined"!=typeof Connext?(i("Connext actually did load..."),clearTimeout(t),e(!0)):(i("Connext did not load in time. Resolving false..."),clearTimeout(t),e(!1))}),6e3);"undefined"!=typeof Connext?(i("Connext already ready."),clearTimeout(t),e(!0)):(i("Listening for Connext Ready event..."),document.addEventListener("onFinish",(function(){clearTimeout(t),i("Connext loaded!"),e(!0)})))}));case 29:if(!e.sent){e.next=59;break}if(u=s,s.origin!==window.location.origin&&(u=new URL(window.location.origin)).searchParams.append("returnAfterLogout",s),window.history.replaceState({additionalInformation:"Updated the URL to prevent another login cycle"},"Home",u),!j()){e.next=40;break}return i("About to call Connext Logout..."),e.next=38,Connext.Logout();case 38:e.next=57;break;case 40:if("Logged In"!==("undefined"==typeof CnnXt?(i("Connext was not loaded."),!1):Connext.Storage.GetUserState())){e.next=54;break}if(i("Connext user state is logged in, setting timeout..."),setTimeout(t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Connext took too long to logout, calling auth0 logout..."),e.next=3,he(s);case 3:case"end":return e.stop()}}),e)}))),8e3),"function"!=typeof Connext._logout){e.next=49;break}return i("About to call Connext _logout..."),e.next=47,Connext._logout();case 47:e.next=52;break;case 49:return i("About to call Connext Logout..."),e.next=52,Connext.Logout();case 52:e.next=57;break;case 54:return i("Connext user state is logged out, not calling it, going to auth0 logout."),e.next=57,he(s);case 57:e.next=62;break;case 59:return i("Connext Logout was NOT called"),e.next=62,he(s);case 62:case"end":return e.stop()}}),e,null,[[8,16]])})));return function(){return e.apply(this,arguments)}}(),we=function(e){A(E,e,{domain:N(),path:"/",expires:365,secure:!0});var t=L();t&&A(E,e,{domain:t,path:"/",expires:365,secure:!0})},ve=function(){var e=0;for(var t in localStorage){var n=2*localStorage[t].length/1024/1024;!Number.isNaN(n)&&localStorage.hasOwnProperty(t)&&(e+=n)}return e},ye=function(){var e=t(o().mark((function e(t,n,r,s){var c,u,l,d,p,f,m,h,g,w,v,y,b;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Attempting to login..."),ve()>4.5&&localStorage.clear(),window.MNGAuthentication.preAuthGTMEvents.forEach((function(e){return oe(e)})),i("Cycled through preauth GTM events."),s&&(c=[],u=window.localStorage.getItem("callbackEvents"),l=JSON.parse(u),c=l&&l.length>0?re(new Set([].concat(re(s),re(l)))):s,window.localStorage.setItem("callbackEvents",JSON.stringify(c))),d=null,e.next=7,me();case 7:if(p=e.sent,f=k(),m=f.origin,h=new URL("".concat(m,"/callback")),g={},f.searchParams.get("regwall")&&(f.searchParams.get("returnUrl")&&(w=f.searchParams.get("returnUrl")),f.searchParams.get("auth_redirect")&&(w=f.searchParams.get("auth_redirect"))),f.pathname.startsWith("/login")||f.pathname.startsWith("/callback")?f.searchParams.get("returnUrl")&&h.searchParams.set("auth_redirect",f.searchParams.get("returnUrl")):h.searchParams.set("auth_redirect",f.toString()),w&&"regwall"!==t&&h.searchParams.set("auth_redirect",w),"true"===f.searchParams.get("close-after-finish")&&h.searchParams.set("close-after-finish","true"),"true"!==f.searchParams.get("ssl")){e.next=23;break}if(!a.sessionManagementEnabled){e.next=22;break}return e.next=20,fe();case 20:e.next=23;break;case 22:B();case 23:return null!==(d=f.searchParams.get("login-with"))?g.connection=d:n&&(g.connection=n),v="none",t&&"regwall"===t&&(h.searchParams.set("regwall","true"),v="signUp",i("Logging in with regwall")),t&&(h.searchParams.set("loginsource",t),i("Logging in with ".concat(t))),r&&(g.login_hint=r),g.redirect_uri=h.toString(),g.initialScreen=v,"googleonetap"!==t&&(g.prompt="select_account"),null!==(y=f.searchParams.get("ampRegiWall"))&&(b=window.location.hostname,g.ampRegiWall=y,g.sourceDomain=b.replace("www.","").replace("preprod.","").replace("develop.",""),g.initialScreen="signUp",g.preferenceId=f.searchParams.get("prefId")),e.next=36,p.loginWithRedirect(g);case 36:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}();window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.oidcLoginCallbacks=[];var be=function(){var e=t(o().mark((function e(){var t,n,r,a,s,c,u,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O();case 2:if(t=e.sent,(n=t.idToken)!==x){e.next=6;break}return e.abrupt("return",{authenticated:!0});case 6:if(""===n){e.next=18;break}return e.prev=7,r=_(n),a=r.email,s=r.picture,c=r.sub,(u=c.split("|")).pop(),l=u.join("|"),e.abrupt("return",{authenticated:!0,email:a,picture:s,userId:c,connectionSource:l});case 15:e.prev=15,e.t0=e.catch(7),i("Unable to parse idToken: ",n," Error: ",e.t0);case 18:return e.abrupt("return",{authenticated:!1});case 19:case"end":return e.stop()}}),e,null,[[7,15]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.login=ye,window.MNGAuthentication.logout=ge,window.MNGAuthentication.getUserInfo=be;function xe(e,t){for(var n=0;n2?"".concat(t.split("-")[0],"-").concat(t.split("-")[1]):t.split("-")[0];return"".concat(n,".com")}(u));var l,d={uuid:s,email:e.email,verified:e.email_verified,publication:u.replace(".local",".com"),source:!!e.ssor_id&&"TRIBUNE",ssorId:c},p="".concat(a.entitlementsEndpoint,"session/create");return i("Entitlements: create payload",d),$.ajax({type:"POST",url:p,headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-Api-Key":a.entitlementsApiKey},data:JSON.stringify(d),success:(l=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"==typeof t.jwt){e.next=2;break}return e.abrupt("return",r(new Error("Entitlements API returned no JWT")));case 2:return i("Entitlements: Token Created: ",t),e.next=5,Ee(t.jwt);case 5:return e.abrupt("return",n(t.jwt));case 6:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)}),error:function(e,t,n){i("Entitlements: Create Token Failure: ",t,n),r(new Error("Entitlements: Create Token Failure"))}})}))};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.isUserAdFree=function(){var e=JSON.parse(window.localStorage.getItem(b));return null!=e&&(i("Ad Free Check: : ",e.adFree),e.adFree)},window.MNGAuthentication.isUserSubscriber=function(){var e=JSON.parse(window.localStorage.getItem(b));return null!=e&&(i("Subscriber Check: : ",e.isEntitled),e.isEntitled)};var Se=function(e,t){var n=e.toLowerCase(),r="";return["@medianewsgroup.com","@tribpub.com","@activeone.co"].forEach((function(e){t&&t.endsWith(e)&&(r="corporate")})),!!n.includes("employee")&&{employeeAccess:!0,accessGroup:r}},Le=function(e){return new Promise((function(n){i("Entitlements: get UUID from email start...");var r,s,c={email:e},u="".concat(a.entitlementsEndpoint,"auth0/getDefaultUserConnection");return $.ajax({type:"POST",url:u,headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-Api-Key":a.entitlementsApiKey},data:JSON.stringify(c),success:(s=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Entitlements: Request successful: ",t),e.abrupt("return",n(t));case 2:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)}),error:(r=t(o().mark((function e(t,r,a){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i("Entitlements: uuid request Failure: ",a),n(!1);case 2:case"end":return e.stop()}}),e)}))),function(e,t,n){return r.apply(this,arguments)})})}))},Ce=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.source=t,this.email=n,this.employeeId=r,this.spoofContent=document.createElement("p"),this.spoofBanner=document.createElement("div")}var n,r,s,c,u,l;return n=e,r=[{key:"clearSpoofedUser",value:(l=t(o().mark((function t(){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return document.getElementById("spoof-banner").remove(),this.userSpoofCheckbox.checked=!1,e.deleteLocalStorageSpoofUser(),t.next=5,ke({sub:this.employeeId,email:this.email,email_verified:!0});case 5:if(n=t.sent,!a.sessionManagementEnabled){t.next=11;break}return t.next=9,de();case 9:return t.next=11,pe({idToken:this.idToken,entitlementToken:n});case 11:window.location.reload();case 12:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"handleUserSpoofAction",value:(u=t(o().mark((function t(n){var r,s,c,u,l;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i("employee tools: handling spoof"),t.next=3,O();case 3:if(r=t.sent,s=r.idToken,!n.target.checked){t.next=42;break}if(c=window.prompt("Enter the email of the user you want to spoof:")){t.next=10;break}return n.target.checked=!1,t.abrupt("return");case 10:return this.userSpoofCheckbox.checked=!0,this.addSpoofBannerToPage("Fetching entitlements for ".concat(c," ..."),"greenyellow"),t.prev=12,t.next=15,Le(c);case 15:if((u=t.sent)&&"string"==typeof u.uuid){t.next=21;break}return this.spoofBanner.style.backgroundColor="red",this.spoofContent.textContent="User could not be found with that address, check for typos.",this.userSpoofCheckbox.checked=!1,t.abrupt("return");case 21:return t.next=23,ke({sub:"".concat(u.provider,"|").concat(u.uuid),email:c,email_verified:!0});case 23:if(l=t.sent,!a.sessionManagementEnabled){t.next=30;break}return t.next=27,de();case 27:return t.next=29,pe({idToken:s,entitlementToken:l});case 29:e.deleteLocalStorageManualExpiration();case 30:window.localStorage.setItem("spoof-user",c),window.location.reload(),t.next=40;break;case 34:t.prev=34,t.t0=t.catch(12),i("Error fetching user spoof entitlements",t.t0),this.spoofBanner.style.backgroundColor="red",this.spoofContent.textContent="Error fetching user entitlements",this.userSpoofCheckbox.checked=!1;case 40:t.next=45;break;case 42:return e.deleteLocalStorageManualExpiration(),t.next=45,this.clearSpoofedUser();case 45:case"end":return t.stop()}}),t,this,[[12,34]])}))),function(e){return u.apply(this,arguments)})},{key:"addEventListeners",value:function(){document.getElementById("user-spoof-control").addEventListener("click",this.handleUserSpoofAction.bind(this)),document.getElementById("expiration-control").addEventListener("change",(function(t){var n=document.getElementById("datepicker-wrapper");!0===t.currentTarget.checked?n.classList.contains("show-picker")||n.classList.add("show-picker"):(n.classList.contains("show-picker")&&n.classList.remove("show-picker"),window.localStorage.getItem("manual-expiration")&&(window.localStorage.removeItem("manual-expiration"),clearInterval(e.interval),document.getElementById("expiration-pop-up").remove()))}))}},{key:"addSpoofBannerToPage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"deeppink";i("employee tools: add spoof banner");var n=document.getElementById("page").querySelector("header");this.spoofBanner.style.backgroundColor=t,this.spoofBanner.id="spoof-banner",this.spoofContent.textContent=e,this.spoofBanner.append(this.spoofContent),n.prepend(this.spoofBanner)}},{key:"init",value:(c=t(o().mark((function t(){var n,r,a,s,c,u,l,d,p,f,m,h,g,w,v,y,b,x,E,k,S,L,C,N,A;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(window.MNGAuthentication.logoutCallbacks.push(e.deleteLocalStorageSpoofUser),n=window.localStorage.getItem("spoof-user"),r=window.localStorage.getItem("manual-expiration"),a=Se(this.source,this.email),i("employee tools: validate employee:",a),this.email&&this.employeeId&&(n||!this.source||a.employeeAccess&&"corporate"===a.accessGroup)&&(this.source||n)){t.next=7;break}return t.abrupt("return");case 7:(s=document.createElement("div")).id="employee-debugger",s.classList="employee-debugger-close",(c=document.createElement("div")).id="employee-debugger-button",c.innerHTML='\n\t\t\t\n\t\t',(u=document.createElement("div")).id="employee-debugger-content",u.innerHTML="\n\t\t\t

MNG Debugger

\n\t\t",(l=document.createElement("div")).id="employee-debugger-toggles",(d=document.createElement("div")).id="employee-spoof-wrapper",(p=document.createElement("label")).textContent="Spoof a user",this.userSpoofCheckbox=document.createElement("input"),this.userSpoofCheckbox.type="checkbox",this.userSpoofCheckbox.id="user-spoof-control",f="You are currently entitled as the user 🤫 ".concat(n," 🤫"),m=document.querySelectorAll(".logged-in-source"),(h=document.createElement("div")).id="employee-datepicker-wrapper",(g=document.createElement("label")).textContent="Set expiration",this.datePickerCheckbox=document.createElement("input"),this.datePickerCheckbox.type="checkbox",this.datePickerCheckbox.id="expiration-control",(w=document.createElement("div")).id="datepicker-wrapper",(v=document.createElement("input")).id="expiration-picker",v.type="datetime-local",(y=document.createElement("button")).id="apply-exp-btn",y.className="expiration-btn",(b=document.createElement("button")).id="reset-exp-btn",b.className="expiration-btn",(x=y.appendChild(document.createElement("span"))).className="tooltiptext",x.textContent="Apply date",(E=b.appendChild(document.createElement("span"))).className="tooltiptext",E.textContent="Reset to original",document.body.append(s),document.getElementById("employee-debugger").append(c,u),document.getElementById("employee-debugger-content").append(l),document.getElementById("employee-debugger-toggles").append(d,h),document.getElementById("employee-spoof-wrapper").append(p,this.userSpoofCheckbox),document.getElementById("employee-datepicker-wrapper").append(g,this.datePickerCheckbox,w),document.getElementById("datepicker-wrapper").append(v,y,b),document.getElementById("employee-debugger").append(c,u),k=JSON.parse(localStorage.getItem("__MNG_Session")),S=_(k.entitlementToken),L=new Date(1e3*k.expiration),C=new Date(1e3*S.session_exp),v.value=L.toISOString().replace(/.\d+Z$/g,""),(N=document.createElement("div")).style.padding="5px 0px 0px 10px",N.innerHTML='\n\t\t

Entitlements JWT

\n\t\t',Object.keys(S).forEach((function(e){var t=document.createElement("div");t.className="list-content";var n=document.createElement("p");n.className="collapsible-list",n.innerHTML="\n\t\t\t".concat(e,'\n\t\t\t+\n\t\t\t\n\t\t\t');var r=n.firstChild.nextElementSibling;r.style.display="inline";var o=n.lastChild.previousElementSibling,a=document.createElement("small");a.className="obj-value",a.innerHTML='⤷ ').concat(S[e],""),t.append(n,a),N.append(t),n.addEventListener("click",(function(){var e=n.nextElementSibling;"block"===e.style.display?(e.style.display="none",r.style.display="inline",o.style.display="none"):(e.style.display="block",o.style.display="inline",r.style.display="none")})),a.addEventListener("click",(function(){var t=document.getElementById("".concat(e,"_value")).innerHTML;navigator.clipboard&&navigator.clipboard.writeText(t)}))})),(A=document.createElement("div")).style.padding="5px 0px 0px 10px",A.innerHTML='\n\t\t\t\t

Connext answer

\n\t\t\t\t',document.addEventListener("onInit",(function(){if("undefined"==typeof Connext){var e=document.createElement("p");e.className="connext-error-message",e.innerHTML="Something went wrong, reload may solve the issue.",A.append(e)}else{var t=Connext,n={};n.conversation=t.Storage.GetCurrentConversation().Name,n.userState=t.Storage.GetUserState(),n.campaign=t.Storage.GetLocalConfiguration().Campaign.Name,n.meter=t.Storage.GetLocalConfiguration().DynamicMeter.Name,Object.keys(n).forEach((function(e){var t=document.createElement("div");t.className="list-content";var r=document.createElement("p");r.className="collapsible-list",r.innerHTML="\n\t\t\t\t".concat(e,'\n\t\t\t\t+\n\t\t\t\t\n\t\t\t\t');var o=r.firstChild.nextElementSibling;o.style.display="inline";var a=r.lastChild.previousElementSibling,i=document.createElement("small");i.className="obj-value",i.innerHTML='⤷ ').concat(n[e],""),t.append(r,i),A.append(t),r.addEventListener("click",(function(){var e=r.nextElementSibling;"block"===e.style.display?(e.style.display="none",o.style.display="inline",a.style.display="none"):(e.style.display="block",a.style.display="inline",o.style.display="none")})),i.addEventListener("click",(function(){var t=document.getElementById("".concat(e,"_value")).innerHTML;navigator.clipboard&&navigator.clipboard.writeText(t)}))}))}})),document.getElementById("employee-debugger-content").append(l,N,A),document.getElementById("employee-debugger-toggles").append(d),document.getElementById("employee-spoof-wrapper").append(p,this.userSpoofCheckbox),document.getElementById("employee-debugger-button").addEventListener("click",(function(){console.log("clicked debugger");var e=document.getElementById("employee-debugger");e.classList.toggle("employee-debugger-close"),e.classList.contains("employee-debugger-close")?e.style.top="50%":e.style.top="20%"})),!n&&this.source&&this.source.toLowerCase().includes("employee")&&re(m).forEach((function(e){var t=e;t.textContent="Subscriber - Employee",t.style.color="blue"})),n&&(this.addSpoofBannerToPage(f),this.userSpoofCheckbox.checked=!0,re(m).forEach((function(e){var t=e;t.textContent="Subscriber - Employee (spoofing)",t.style.color="blue"}))),document.getElementById("apply-exp-btn").addEventListener("click",(function(){var t,n=null===(t=new Date(v.value))||void 0===t?void 0:t.getTime(),r=Math.floor(n/1e3);k.expiration=r,localStorage.setItem("__MNG_Session",JSON.stringify(k)),window.localStorage.setItem("manual-expiration",!0),e.interval&&clearInterval(e.interval),e.timeLeftPopUp(k.expiration)})),document.getElementById("reset-exp-btn").addEventListener("click",(function(){v.value=C.toISOString().replace(/.\d+Z$/g,"")})),this.addEventListeners(),r&&(this.datePickerCheckbox.click(),e.timeLeftPopUp(k.expiration));case 82:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})}],s=[{key:"deleteLocalStorageSpoofUser",value:function(){window.localStorage.removeItem("spoof-user"),localStorage.getItem("userNewsLetterData")&&window.localStorage.removeItem("userNewsLetterData"),i("Removed spoofed-user storage object.")}},{key:"timeLeftPopUp",value:function(e){var t=document.getElementById("expiration-pop-up");if(t)t.classList="",document.getElementById("time-left-text").textContent="Calculating time...";else{var n=document.createElement("div");n.id="expiration-pop-up";var r=n.appendChild(document.createElement("p"));r.id="time-left-text",r.textContent="Calculating time...",document.getElementById("employee-debugger").prepend(n)}var o=new Date(1e3*e).toLocaleString(),a=new Date(o).getTime();this.interval=setInterval((function(){var e=(new Date).getTime(),n=a-e,r=Math.floor(Math.abs(n/864e5))||0,o=Math.floor(Math.abs(n%864e5)/36e5)||0,i=Math.floor(Math.abs(n%36e5)/6e4)||0,s=Math.floor(Math.abs(n%6e4)/1e3);document.getElementById("time-left-text").textContent="Token expires in: ".concat(r,"d ").concat(o,"h ").concat(i,"m ").concat(s,"s 🕛"),n<0&&(document.getElementById("time-left-text").textContent="Token expired by: ".concat(r,"d ").concat(o,"h ").concat(i,"m ").concat(s,"s 🕛"),t.classList.contains("expiredToken")||(t.classList="expiredToken"))}),1e3)}},{key:"deleteLocalStorageManualExpiration",value:function(){window.localStorage.getItem("manual-expiration")&&(window.localStorage.removeItem("manual-expiration"),clearInterval(this.interval),document.getElementById("expiration-pop-up").remove())}}],r&&xe(n.prototype,r),s&&xe(n,s),e}(),Ne=function(){var e=t(o().mark((function e(n,r){var a,s,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Employee Tools: employeeAds: "),a=Se(n,r),i("employee tools: validate employee:",a),"corporate"===a.accessGroup&&a.employeeAccess){e.next=5;break}return e.abrupt("return",!1);case 5:return e.next=7,new Promise((function(e){if(U())e();else{i("UIHandler: Employee Debugger: ","Waiting for the digisubs debugger toolbox to load...");var n=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:document.getElementById("employee-debugger-content")&&(clearInterval(n),e(!0));case 1:case"end":return t.stop()}}),t)}))),200)}}));case 7:return(s=document.createElement("div")).id="employee-debugger-adfree",s.innerHTML='\n\t\t\n\t\t\n\t\t

(page will reload)

\n\t',document.getElementById("employee-debugger-toggles").append(s),(void 0!==(c=localStorage.getItem("hhsl"))&&"access"===c||"undefined"!=typeof MNGAuthentication&&"function"==typeof MNGAuthentication.isUserAdFree&&MNGAuthentication.isUserAdFree())&&(document.getElementById("employee-adfree-toggle").checked=!0,window.MNGAuthentication.isUserAdFree=!0),document.getElementById("employee-adfree-toggle").addEventListener("click",(function(e){i("employee tools: employee ad toggle clicked"),e.target.checked?(i("Employee tools: employee ads: turn off"),localStorage.setItem("hhsl","access"),window.MNGAuthentication.isUserAdFree=!0,setTimeout((function(){window.location.reload()}),500)):(i("Employee tools: employee ads: turn on"),localStorage.removeItem("hhsl"),setTimeout((function(){window.location.reload()}),500))})),e.abrupt("return",!0);case 15:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();var Ae,Ie,Te,_e,Ue,Oe=[],Me=T();Me=Me.replace("local","com");var Pe="".concat(a.entitlementsEndpoint,"newsletters"),Be=function(e){var t=new Date,n=Math.round(t.getTime()/1e3)-86400;return new Date(e)>=new Date(1e3*n).getTime()},je=function(){var e=t(o().mark((function e(t){var n,r,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Pe,"get"===t.method&&(n="".concat(n,"?email=").concat(t.dataToSend.email,"&domain=").concat(t.dataToSend.domain)),e.prev=2,e.next=5,se()({method:t.method,url:n,headers:{"X-Api-Key":a.entitlementsApiKey},data:t.dataToSend});case 5:r=e.sent,"get"===t.method&&((Oe=r.data.responseData).sort((function(e,t){return e.title>t.title?1:-1})),"limited"===Ie?(s=Oe.filter((function(e){return!e.subscriberOnly})),localStorage.setItem("userNewsLetterData",JSON.stringify({expoDate:new Date,newsLetterData:s}))):localStorage.setItem("userNewsLetterData",JSON.stringify({expoDate:new Date,newsLetterData:Oe})),Fe()),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),i("newsletter: ",e.t0);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}(),Re=function(){var e,t,n=navigator.userAgent,r=/^((?!chrome|android).)*safari/i.test(n),o=/Chrome/.test(n);return r?"calc(100vh - 8.5rem)":o?"calc(100vh - ".concat((e=window.innerHeight,(t=(window.screen.height-e)/16)>0?t:0),"rem)"):"calc(100vh - 64px)"},De=function(e){e.stopPropagation();var t={},n=e.target,r=e.target.classList.contains("dropDownNewsLetter")?".slideOutNewsLetter":".dropDownNewsLetter",o=parseInt(n.getAttribute("data-id"),10),a=n.checked;document.querySelector("".concat(r,'[data-id="').concat(o,'"]')).checked=a,Oe.find((function(e){return e.id===o})).isSubscribed=a,t.method=a?"post":"delete",t.dataToSend={email:Ae,domain:Me,preferenceId:o},qe(t)},Ge=function(e){e.stopPropagation();var t=e.target;if(t.matches("span")||t.matches("label")){var n,r=t.closest("div"),o=r.querySelector(".newsletter-icon"),a="block"===(n=r.classList.contains("show-digisubs-push")?document.querySelector("#newsLetterItem-push"):document.querySelector("#newsLetterContent-dropdown")).style.display,i=document.querySelector(".wrapper-nav-subs.pushnav.pushnav-right"),s=/iPad|iPhone|iPod/.test(navigator.userAgent),c=/Android/i.test(navigator.userAgent);a?(o.classList.remove("icon-arrow-down"),o.classList.add("icon-arrow-right"),n.style.display="none",""!==i.style.height&&(i.style.height="")):(o.classList.remove("icon-arrow-right"),o.classList.add("icon-arrow-down"),n.style.display="block",s&&window.innerHeight\n\t\tinfo\n\t\t\n\t\t\n\t\t\n\t'),u="url(data:image/svg+xml;base64,".concat(c,")");s.style.background=u;var l=document.createElement("p"),d=document.createElement("a");d.setAttribute("href","https://myaccount.".concat(Me)),d.setAttribute("id","myAccountLink"),d.textContent="MyAccount",l.appendChild(document.createTextNode("Manage your newsletters here or visit ")),l.appendChild(d),l.appendChild(document.createTextNode(" for more information")),i.append(s),i.append(l);var p=i.cloneNode(!0);o.append(i),a.append(p);var f,m,h,g=(f={},Oe.forEach((function(e){var t=e.category[0].Title;e.isSubscribed&&"Media News Group"!==t&&"MediaNews Group"!==t?f["My Newsletters:"]?f["My Newsletters:"].push(e):f["My Newsletters:"]=[e]:f[t]?f[t].push(e):f[t]=[e]})),f),w=(m=g,"My Newsletters:"===(h=Object.keys(m).sort((function(e,t){return"My Newsletters:"===e?-1:"My Newsletters:"===t?1:e.localeCompare(t)})))[0]?h.splice(1,0,"".concat(Ue," Newsletters:")):h=["".concat(Ue," Newsletters:")].concat(re(h)),h);g["".concat(Ue," Newsletters:")]=[],w.forEach((function(e){if("Media News Group"!==e&&"MediaNews Group"!==e&&"MediaNewsGroup"!==e&&"Not Active"!==e){var t=document.createElement("li");t.classList.add("titleContainer");var n=document.createElement("li");n.classList.add("titleContainer");var r=document.createElement("label");r.classList.add("newsletterCategoryTitle"),r.textContent=e,"My Newsletters:"!==e&&e!=="".concat(Ue," Newsletters:")||r.classList.add("newsLetterTitleBold");var i=r.cloneNode(!0);t.append(r),n.append(i),o.append(t),a.append(n),g[e].forEach((function(e){var t=document.createElement("li");t.classList.add("dropdown-item-newsletter");var n=document.createElement("li");n.classList.add("show-digisubs-push","newsLetter-container-push");var r=document.createElement("input");r.classList.add("newsLetterSubscriberToggle"),r.type="checkbox",r.name="newsLetter_".concat(e.title),r.setAttribute("data-id",e.id),r.checked=e.isSubscribed,r.style.cursor="pointer",r.addEventListener("click",De),_e&&(r.disabled=!0);var i=document.createElement("label");i.textContent=e.title,i.setAttribute("for","newsLetter_".concat(e.title));var s=r.cloneNode(),c=i.cloneNode(!0);s.addEventListener("click",De),r.classList.add("dropDownNewsLetter"),s.classList.add("slideOutNewsLetter"),t.append(r,i),n.append(s,c),o.append(t),a.append(n)}))}})),o.style.display="none",a.style.display="none"};const He=function(e,t,n,r){if(Ae=e,Ie=t,Ue=r,_e=n){R("userNewsLetterData");for(var o=document.getElementById("newsLetterContent-dropdown"),a=document.getElementById("newsLetterItem-push");o.firstChild;)o.firstChild.remove();for(;a.firstChild;)a.firstChild.remove()}if(i("host for newsletter prefs",Me),localStorage.getItem("userNewsLetterData")){var s=JSON.parse(localStorage.getItem("userNewsLetterData"));Te=s.expoDate,Be(Te)?(Oe=s.newsLetterData,Fe()):je({method:"get",dataToSend:{email:Ae,domain:Me}})}else je({method:"get",dataToSend:{email:Ae,domain:Me}})};var Je=function(){var e=X()?X().querySelector(J):null,t=X();null!==e&&t.removeChild(e)};const ze=function(){var e=t(o().mark((function e(n){var r,s,c,u,l,d,p,f,m,h,g,w,v,y,b,x,E,k,S,L,C,N,A,I,T,_,O,M,P,B,j,R,G,q,H,J,z,W,K,$;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.email,s=n.picture,c=n.connectionSource,u=n.entitlementSource,l=n.entitlementLevel,d=n.serviceCode,p=n.isEedition,f=n.accountHref,m=n.userId,h="",g=" | Logged in with ",w=[],v=r,void 0!==r&&"undefined"!==r||(v="Logged In"),e.prev=6,e.t0=c,e.next="google-oauth2"===e.t0?10:"facebook"===e.t0?12:"apple"===e.t0?14:16;break;case 10:return g+="Google",e.abrupt("break",18);case 12:return g+="Facebook",e.abrupt("break",18);case 14:return g+="Apple",e.abrupt("break",18);case 16:return g="",e.abrupt("break",18);case 18:e.t1=l,e.next="limited"===e.t1?21:"subscriber"===e.t1?23:"premium"===e.t1?25:27;break;case 21:return h="Limited Access",e.abrupt("break",29);case 23:return h="Subscriber",e.abrupt("break",29);case 25:return h="Premium Ad-Free Access",e.abrupt("break",29);case 27:return h="Anonymous",e.abrupt("break",29);case 29:for(p&&d&&d.includes("P")&&(h="Limited Subscription - e-Edition access"),Je(),(y=Q()).removeChild(y.firstChild),(b=document.createElement("a")).id="anchorProfileDropDown",b.className="nav-link dropdown-toggle",b.setAttribute("aria-label","Account menu dropdown"),b.style.cursor="pointer",b.setAttribute("tabindex","0"),b.setAttribute("aria-expanded","false"),x=document.createElement("img"),E=document.getElementById("pushnav-icon"),x.className="rounded-circle",x.alt="User's profile image",E.className="rounded-circle",x.src=s,E.src=s,s||(x.src="https://ui-static-assets-prod.mng-digisubs-prod.com/img/no-icon.png",E.src="https://ui-static-assets-prod.mng-digisubs-prod.com/img/no-icon.png"),(k=document.createElement("span")).className="icon-arrow-down",k.id="icon-caret",k.setAttribute("aria-hidden","true"),(S=document.createElement("div")).id="account-content",S.className="dropdown-menu",y.append(b,S),L="",window.dataLayer.forEach((function(e){Object.prototype.hasOwnProperty.call(e,"SiteName")&&(L=e.SiteName)})),(C=document.createElement("a")).className="dropdown-item dropdown-profile account-link",C.text=v,(N=document.createElement("p")).className="dropdown-item logged-in-source",N.appendChild(document.createTextNode("".concat(""!==L?"".concat(L," - "):"").concat(h).concat(g))),(A=document.createElement("a")).className="dropdown-item account-link account-settings",A.text="Account Settings",(I=document.createElement("a")).className="dropdown-item",I.text="Contact Us",I.href="contact-us",(T=document.createElement("a")).className="dropdown-item log-out-button",T.text="Log out",(_=document.createElement("div")).id="marketing-content",_.className="dropdown-item marketing-slot-div",O=window,M=O.location,P=new URL(M),T.href="".concat(P.origin,"/logout"),(B=document.createElement("ul")).className="newsLetterContent dropdown-item",B.id="newsLetterContent-dropdown",y.id="profileDropDown",y.className="nav-item dropdown auth-visible show",b.append(x,k),document.getElementById("account-content").append(C,N,A,I,T,_,B),document.getElementById("push-auth-source").textContent="".concat(""!==L?"".concat(L," - "):"").concat(h).concat(g),document.getElementById("push-email-link").textContent=v,document.getElementById("push-account-content").style.display="block",document.getElementById("blank-icon-user").style.display="none",i("Employee tools: start tools here",u,r,m),!1===(j=u)&&(j="none"),(R=new Ce(j,r,m)).init(),Ne(j,r),a.newslettersEnabled&&l?(G=v,q=!1,R.userSpoofCheckbox&&(q=R.userSpoofCheckbox.checked),localStorage.getItem("spoof-user")&&(G=localStorage.getItem("spoof-user")),He(G,l,q,L)):B.style.display="none",H=function(){var e=document.getElementById("icon-caret"),t=e.classList.contains("icon-arrow-up");t||(e.className="icon-arrow-up",b.setAttribute("aria-expanded","true")),t&&(e.className="icon-arrow-down",b.setAttribute("aria-expanded","false"))},document.getElementById("profileDropDown").addEventListener("click",(function(){document.getElementById("account-content").classList.toggle("show"),H()})),document.getElementById("anchorProfileDropDown").addEventListener("keydown",(function(e){"Enter"===e.key&&(document.getElementById("account-content").classList.toggle("show"),H())})),document.addEventListener("click",(function(e){b.contains(e.target)||(document.getElementById("account-content").classList.remove("show"),b.setAttribute("aria-expanded","false"),k.className="icon-arrow-up")})),w=document.getElementsByClassName("account-link"),J=0;J0?new URL("https://membership.".concat(n)):new URL("https://myaccount.".concat(n))},Xe=function(){var e=t(o().mark((function e(t){var n,r,a,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.entitlementSource,r=t.accountHref,a="My Account",void 0!==window.MNGPaywall&&"Piano"===n&&(a="Account"),(i=ee()).textContent=a,i.setAttribute("href",r);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ye=function(e){try{void 0!==window.MNGAuthentication&&("keydown"===e.type&&"Enter"===e.key||"click"===e.type)&&(e.preventDefault(),window.MNGAuthentication.logout())}catch(e){i(e)}},Ve=function(e){i("UIHandler: ","engage overrides showing block: ",e);var t=document.createElement("style"),n=".".concat(e,"{display:inline-block !important;}");t.textContent=".engageLogoutLink, .engageLoginLink {display:none !important;}"+n,document.getElementsByTagName("head")[0].appendChild(t)},Ze=function(){i("UIHandler: ","show logout buttons"),Ve("engageLogoutLink"),document.querySelectorAll(J).forEach((function(e){var t=e;t.style.visibility="visible",t.style.display="block",t.addEventListener("click",Ye),t.addEventListener("keydown",Ye)}))},Qe=function(){i("UIHandler: ","show login buttons"),Ve("engageLoginLink"),document.querySelectorAll(F).forEach((function(e){var t=e;t.style.visibility="visible",t.style.display="block",t.querySelector("a").textContent="Log in";var n=new URL(t.querySelector("a").href),r=new URLSearchParams(n);r.append("returnUrl",k()),t.querySelector("a").setAttribute("href","".concat(n,"?").concat(r))}))},et=function(){var e=t(o().mark((function e(){var t,n,r,s,c,u,l,d,p,f,m,h,g,y,b,x;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("UIHandler: ","setup"),e.next=3,be();case 3:return t=e.sent,n=t.authenticated,r=t.email,s=t.picture,c=t.connectionSource,u=t.userId,e.next=11,We();case 11:if(l=e.sent,d=l.userIsEntitled,p=l.entitlementSource,f=l.entitlementLevel,m=l.serviceCode,h=l.isEedition,g=$e({siteUrl:T()}),!(n||S(w)||S(v))){e.next=29;break}if(!a.dropdownEnabled){e.next=24;break}return e.next=22,ze({email:r,picture:s,connectionSource:c,entitlementSource:p,entitlementLevel:f,serviceCode:m,isEedition:h,accountHref:g,userId:u});case 22:e.next=26;break;case 24:return e.next=26,Xe({entitlementSource:p,siteUrl:T(),accountHref:g});case 26:Ze(),e.next=30;break;case 29:Qe();case 30:y=document.getElementById(K),d?(te().forEach((function(e){e.style.display="none"})),y&&(y.style.display="none")):(te().forEach((function(e){var t=e;t.style.display="block",Ke(t)})),y&&(y.style.display="flex",b=k(),(x=new URL(y.getAttribute("href"))).searchParams.set("returnUrl",encodeURIComponent(b.href)),y.setAttribute("href",x.href)));case 32:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),tt=function(){var e=Q();e&&(e.style.display="block",e.style.visibility="visible");var t=ee();t&&(t.textContent="Loading...")},nt=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return tt(),e.next=3,et();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),rt=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){if(U())e();else{i("UIHandler: ","Waiting for the log-in-button class to load...");var n=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:document.getElementsByClassName("log-in-button").length>1&&(clearInterval(n),e(!0));case 1:case"end":return t.stop()}}),t)}))),200)}}));case 2:return e.next=4,nt();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:rt();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()})()})();;