You are on page 1of 39

(function(){'use strict';class aa{constructor(){}getElement(){}init(){}resized()

{}whenComplete(){}shouldFadeBody(){}hasLoadingIndicator(){}};function ba(a,b,c,d)
{return a.acceptResult().then(e=>{if(e.origin!=b||c&&!e.originVerified||d&&!
e.secureChannel)throw Error("channel mismatch");return e.data})};function ca(a)
{if(/swg.debug=1/.test(self.location.hash)){const
b=Array.prototype.slice.call(arguments,0);b.unshift("[Subscriptions]");l.apply(l,b)
}}function l(a){console.log.apply(console,arguments)}function n(a)
{console.warn.apply(console,arguments)}
function q(a,b,c){let d;if(!a){const h=(b||"Assertion failed").split("%s");var
e=h.shift();let k=e;const m=[];""!=e&&m.push(e);for(e=2;e<arguments.length;e++)
{const p=arguments[e];p&&p.tagName&&(d=p);const v=h.shift();m.push(p);var
f=v.trim();""!=f&&m.push(f);f=k;var g=(g=p)&&1==g.nodeType?g.tagName.toLowerCase()+
(g.id?"#"+g.id:""):g;k=f+(g+v)}e=Error(k);e.fromAssert=!
0;e.associatedElement=d;e.messageArray=m;throw e;}};function da(a,b){if(!a)return
null;const c=a.length||0;if(0<c)for(let d=0;d<c;d++){const
e=a[d];if(b(e,d,a))return e}return null};const
ea={"-":"+",_:"/"},fa={"+":"-","/":"_","=":""};function ha(a){const b=new
Uint8Array(a.length);for(let c=0;c<a.length;c++){const
d=a.charCodeAt(c);q(255>=d,"Characters must be in range [0,255]");b[c]=d}return
b}function ia(a){const b=Array(a.length);for(let c=0;c<a.length;c+
+)b[c]=String.fromCharCode(a[c]);return b.join("")}function ja(a){if("undefined"!
==typeof TextDecoder)return(new TextDecoder("utf-8")).decode(a);const b=ia(new
Uint8Array(a));return decodeURIComponent(escape(b))}
function ka(a){return"undefined"!==typeof TextEncoder?(new TextEncoder("utf-
8")).encode(a):ha(unescape(encodeURIComponent(a)))}function la(a){const
b=atob(a.replace(/[-_]/g,c=>ea[c]));return ha(b)}function ma(a){a=ia(a);return
btoa(a).replace(/[+/=]/g,b=>fa[b])};function na(){var a=Date.now().toString(16);let
b=a.substring(a.length-8).toUpperCase()+"-",c=0;a=new Uint8Array(23);var
d=self.msCrypto?
self.msCrypto:self.crypto;if(d&&d.getRandomValues)for(d.getRandomValues(a),d=a.leng
th-1;-1<d;d--)a[d]%=16;else for(d=a.length-1;-
1<d;d--)a[d]=Math.floor(16*Math.random());for(d=9;36>d;d++)switch(d){case 13:case
18:case 23:b+="-";break;case 14:b+="4";break;case 19:b+="0123456789ABCDEF"[a[c+
+]&3|8];break;default:b+="0123456789ABCDEF"[a[c++]]}return b}
function oa(a){let b;const c=null==(b=self.crypto||self.msCrypto)?void
0:b.subtle;return c?c.digest("SHA-512",ka(a)).then(d=>{const e=[],f=new
DataView(d);for(let g=0;g<f.byteLength;g+=4){const
h=f.getUint32(g).toString(16);e.push(("00000000"+h).slice(-8))}return e.join("")}):
(n("Swgjs only works on secure (HTTPS or localhost) pages."),Promise.reject("Swgjs
only works on secure (HTTPS or localhost) pages."))};let pa;
const qa="Webkit webkit Moz moz ms O o".split(" "),ra={"align-
content":"normal",animation:"none","align-items":"normal","align-
self":"auto","alignment-baseline":"auto","backface-
visibility":"hidden","background-clip":"border-box","background-
image":"none","baseline-shift":"0","block-size":"auto",border:"none","border-
collapse":"separate",bottom:"0","box-sizing":"border-box","break-
after":"auto","break-before":"auto","break-inside":"auto","buffered-
rendering":"auto","caption-side":"top","caret-color":"rgb(51, 51,
51)",clear:"none",
color:"rgb(51, 51, 51)","color-rendering":"auto","column-count":"auto","column-
fill":"balance","column-gap":"normal","column-rule-color":"rgb(51, 51,
51)","column-rule-style":"none","column-rule-width":"0","column-
span":"none","column-width":"auto",contain:"none","counter-
increment":"none","counter-
reset":"none",cursor:"auto",direction:"inherit",display:"block","empty-
cells":"show",filter:"none",flex:"none","flex-flow":"row
nowrap","float":"none","flood-color":"rgb(0, 0, 0)","flood-
opacity":"1",font:"none",
"font-size":"medium","font-family":"",height:"auto",hyphens:"manual","image-
rendering":"auto","inline-size":"",isolation:"auto","justify-
content":"normal","justify-items":"normal","justify-self":"auto","letter-
spacing":"normal","lighting-color":"rgb(255, 255, 255)","line-break":"auto","line-
height":"normal","margin-bottom":"0",mask:"none","max-block-size":"none","max-
height":"none","max-inline-size":"none","max-width":"none","min-block-
size":"none","min-height":"0","min-inline-size":"0","min-width":"0",
"mix-blend-mode":"normal","object-fit":"fill","offset-distance":"none","offset-
path":"none","offset-rotate":"auto
0deg",opacity:"1",order:"0",orphans:"2",outline:"none","overflow-
anchor":"auto","overflow-
wrap":"normal",overflow:"visible",padding:"0",page:"",perspective:"none","pointer-
events":"auto",position:"static",quotes:"",resize:"none",right:"0","scroll-
behavior":"auto","tab-size":"8","table-layout":"auto","text-align":"start","text-
align-last":"auto","text-anchor":"start","text-combine-upright":"none",
"text-decoration":"none","text-indent":"0","text-orientation":"mixed","text-
overflow":"clip","text-rendering":"auto","text-shadow":"none","text-size-
adjust":"auto","text-transform":"none","text-underline-
position":"auto",top:"auto","touch-action":"auto",transform:"none",transition:"none
0s ease 0s","unicode-bidi":"normal","user-select":"auto","vector-
effect":"none","vertical-align":"baseline",visibility:"visible","white-
space":"normal",widows:"2","word-break":"normal","word-spacing":"0","word-
wrap":"normal",
"writing-mode":"horizontal-tb",zoom:"1","z-index":"auto"};function sa(a,b,c)
{if(2>b.length?0:0==b.lastIndexOf("--",0))return b;pa||(pa=Object.create(null));let
d=pa[b];if(!d||c){d=b;if(void 0===a[b]){var e=b.charAt(0).toUpperCase()
+b.slice(1);a:{for(let g=0;g<qa.length;g++){const h=qa[g]+e;if(void 0!==a[h])
{e=h;break a}}e=""}const f=e;void 0!==a[f]&&(d=f)}c||(pa[b]=d)}return d}function
r(a,b){for(const c in b)a.style.setProperty(sa(b,c),b[c].toString(),"important")}
function ta(a,b,c){(b=sa(a.style,b,void 0))&&(a.style[b]=c)}function ua(a,b)
{for(const c in b)ta(a,c,b[c])}function va(a){const b={};
["height"].forEach(c=>{b[c]=null});ua(a,b)};function t(a,b,c)
{b=a.createElement(b);for(const d in c)"style"==d?
ua(b,c[d]):b.setAttribute(d,c[d]);return b}function wa(a,b){const
c=t(a.getWin().document,"style",
{type:"text/css"});c.textContent=b;a.getHead().appendChild(c)}function xa(a){const
b=a.navigator;return/Edge/i.test(b&&b.userAgent)};/*

Copyright 2017 The Web Activities Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");


you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software


distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
function u(a){return a&&"object"==typeof a?"AbortError"===a.name:!1}function
ya(a,b){b="AbortError"+(b?": "+b:"");let c=null;if("function"==typeof
a.DOMException){const d=a.DOMException;try{c=new d(b,"AbortError")}catch(e){}}c||
(c=Error(b),c.name="AbortError",c.code=20);return c}var
za=class{constructor(a,b,c,d,e,f){this.code=a;this.data="ok"==a?
b:null;this.mode=c;this.origin=d;this.originVerified=e;this.secureChannel=f;this.ok
="ok"==a;this.error="failed"==a?Error(String(b)||""):null}};let Aa;
function Ba(a){Aa||(Aa=document.createElement("a"));Aa.href=a;return Aa}function
Ca(a){if(a.origin)return a.origin;const b=a.protocol;let
c=a.host;"https:"==b&&c.indexOf(":443")==c.length-4?
c=c.replace(":443",""):"http:"==b&&c.indexOf(":80")==c.length-
3&&(c=c.replace(":80",""));return b+"//"+c}function Da(a){const
b=a.indexOf("#");return-1==b?a:a.substring(0,b)}
function Ea(a){return a?(/^[?#]/.test(a)?
a.slice(1):a).split("&").reduce((b,c)=>{var
d=c.split("=");c=decodeURIComponent(d[0]||"");d=decodeURIComponent(d[1]||"");c&&(b[
c]=d);return b},{}):{}}function Fa(a,b){return a+(-1==a.indexOf("#")?"#":"&")
+encodeURIComponent("__WA__")+"="+encodeURIComponent(b)}
function Ga(a){const
b={requestId:a.requestId,returnUrl:a.returnUrl,args:a.args};void 0!
==a.origin&&(b.origin=a.origin);void 0!
==a.originVerified&&(b.originVerified=a.originVerified);return
JSON.stringify(b)}function Ha(a,b,c){b.ok?c(b):(a=b.error||
ya(a),a.activityResult=b,c(Promise.reject(a)))}function Ia(a)
{a=a.navigator;return/Trident|MSIE|IEMobile/i.test(a&&a.userAgent)}function Ja(a)
{a=a.navigator;return/Edge/i.test(a&&a.userAgent)}function Ka(a)
{setTimeout(()=>{throw a;})}
function La(a){a.ea&&!a.Rc&&(a.Rc="function"==typeof a.Qc?a.Qc():a.Qc);return
a.Rc}function Ma(a,b){a.v&&w(a.v);a.v=b;a.v.onmessage=c=>{var d=c.data;const
e=d&&d.cmd;d=d&&d.payload||null;e&&a.Ba(e,d,c)}}function Na(a,b){a.ba||
(a.ba={});let c=a.ba[b];if(!c){let d;const e=new
Promise(f=>{d=f});c={port1:null,port2:null,resolver:d,promise:e};a.ba[b]=c}return
c}
class Oa{constructor(a,b,c){this.g=a;this.Qc=b;this.O=c;this.fe=!
0;this.Rc=null;this.Zc=!
1;this.ba=this.lc=this.ea=this.v=null;this.cd=this.Nd.bind(this)}connect(a)
{if(this.ea)throw Error("already
connected");this.ea=a;this.g.addEventListener("message",this.cd)}disconnect()
{if(this.ea&&(this.ea=null,this.v&&(w(this.v),this.v=null),this.g.removeEventListen
er("message",this.cd),this.ba)){for(const a in this.ba){const
b=this.ba[a];b.port1&&w(b.port1);b.port2&&w(b.port2)}this.ba=null}}isConnected()
{return null!=
this.O}getTarget(){const a=La(this);if(!a)throw Error("not connected");return
a}getTargetOrigin(){if(null==this.O)throw Error("not connected");return
this.O}sendConnectCommand(){const a=Ia(this.g)||
Ja(this.g);this.sendCommand("connect",{acceptsChannel:a})}sendStartCommand(a){let
b=null;this.Zc&&"function"==typeof this.g.MessageChannel&&(b=new
this.g.MessageChannel);b?(this.sendCommand("start",a,
[b.port2]),Ma(this,b.port1)):this.sendCommand("start",a)}sendCommand(a,b,c){const
d={sentinel:"__ACTIVITIES__",
cmd:a,payload:b||null};if(this.v)this.v.postMessage(d,c||void 0);else{const
e=this.getTarget(),f="connect"==a?null!=this.O?
this.O:"*":this.getTargetOrigin();e.postMessage(d,f,c||void 0)}}customMessage(a)
{this.sendCommand("msg",a)}onCustomMessage(a){this.lc=a}startChannel(a)
{a=a||"";const b=Na(this,a);if(!b.port1){const c=new
this.g.MessageChannel;b.port1=c.port1;b.port2=c.port2;b.resolver(b.port1)}b.port2&&
(this.sendCommand("cnset",{name:a},[b.port2]),b.port2=null);return
b.promise}askChannel(a){a=
a||"";const b=Na(this,a);b.port1||this.sendCommand("cnget",{name:a});return
b.promise}Nd(a){if(!this.fe||La(this)==a.source){var
b=a.data;if(b&&"__ACTIVITIES__"==b.sentinel){var c=b.cmd;if(!
this.v||"connect"==c||"start"==c){var d=a.origin;b=b.payload||
null;null==this.O&&"start"==c&&(this.O=d);null==this.O&&a.source&&La(this)==a.sourc
e&&(this.O=d);d==this.O&&this.Ba(c,b,a)}}}}Ba(a,b,c){"connect"==a?
(this.v&&(w(this.v),this.v=null),this.Zc=b&&b.acceptsChannel||!
1,this.ea(a,b)):"start"==a?((c=c.ports&&
c.ports[0])&&Ma(this,c),this.ea(a,b)):"msg"==a?null!=this.lc&&null!
=b&&this.lc(b):"cnget"==a?this.startChannel(b.name):"cnset"==a?
(a=c.ports[0],b=Na(this,b.name),b.port1=a,b.resolver(a)):this.ea(a,b)}}function
w(a){try{a.close()}catch(b){}}
var Pa=class{constructor(a,b,c){this.s=a;this.ja=b;this.U=c||
null;this.g=this.s.ownerDocument.defaultView;this.O=Ca(Ba(b));this.Lb=!
1;this.Ka=null;this.Kb=new Promise(d=>{this.Ka=d});this.sb=null;this.rb=new
Promise(d=>{this.sb=d});this.S=null;this.vb=new
Promise(d=>{this.S=d});this.ub=this.nc=null;this.A=new Oa(this.g,
()=>this.s.contentWindow,this.O)}getMode(){return"iframe"}connect(){var
a=this.s;if("isConnected"in a)a=a.isConnected;else{var
b=a.ownerDocument&&a.ownerDocument.documentElement;a=
b&&b.contains(a)||!1}if(!a)throw Error("iframe must be in
DOM");this.A.connect(this.Ba.bind(this));this.s.src=this.ja;return
this.Kb}disconnect(){this.Lb=!1;this.A.disconnect()}acceptResult(){return
this.vb}getTargetWin(){return this.s.contentWindow||null}message(a)
{this.A.customMessage(a)}onMessage(a){this.A.onCustomMessage(a)}messageChannel(a)
{return this.A.askChannel(a)}whenReady(){return this.rb}onResizeRequest(a)
{this.nc=a;Promise.resolve().then(()=>{null!=this.ub&&a(this.ub)})}resized()
{this.Lb&&
this.A.sendCommand("resized",{height:this.s.offsetHeight})}Ba(a,b){"connect"==a?
(this.Lb=!0,this.A.sendStartCommand(this.U),this.Ka()):"result"==a?
this.S&&(a=b.code,b=new za(a,"failed"==a?
Error(b.data||""):b.data,"iframe",this.A.getTargetOrigin(),!0,!
0),Ha(this.g,b,this.S),this.S=null,this.A.sendCommand("close"),this.disconnect()):"
ready"==a?
this.sb&&(this.sb(),this.sb=null):"resize"==a&&(this.ub=b.height,this.nc&&this.nc(t
his.ub))}};
function Qa(a){const b=Ra(a);let c=a.ja;if(!a.B.skipRequestInUrl){const
f=a.B.returnUrl||
Da(a.g.location.href),g=Ga({requestId:a.ee,returnUrl:f,args:a.U});c=Fa(c,g)}let
d,e=a.rd;"_top"!=e&&Ia(a.g)&&(e="_top");try{d=a.g.open(c,e,b)}catch(f){}if(!
d&&"_top"!=e&&!a.B.disableRedirectFallback){e="_top";try{d=a.g.open(c,e)}catch(f)
{}}d?(a.ia=d,"_top"!=e&&Sa(a)):Ta(a,Error("failed to open window"));return
a.vb.catch(()=>{})}
function Ra(a){var b=a.g.screen;const c=b.availWidth||b.width,d=b.availHeight||
b.height,e=a.g==a.g.top,f=Ja(a.g),g=Math.max(c-(e&&a.g.outerWidth>a.g.innerWidth?
Math.min(100,a.g.outerWidth-a.g.innerWidth):f?100:0),.5*c),h=Math.max(d-
(e&&a.g.outerHeight>a.g.innerHeight?Math.min(100,a.g.outerHeight-
a.g.innerHeight):f?100:0),.5*d);var
k=Math.floor(Math.min(600,.9*g)),m=Math.floor(Math.min(600,.9*h));a.B.width&&(k=Mat
h.min(a.B.width,g));a.B.height&&(m=Math.min(a.B.height,h));a=Math.floor((b.width-
k)/2);
b=Math.floor((b.height-
m)/2);k={height:m,width:k,resizable:"yes",scrollbars:"yes"};f||
(k.left=a,k.top=b);m="";for(const p in k)m&&(m+=","),m+=`${p}=${k[p]}`;return
m}function Sa(a){a.ra=a.g.setInterval(()=>{Ua(a,!0)},500);a.A=new
Oa(a.g,a.ia,null);a.A.connect(a.Ba.bind(a))}function Ta(a,b)
{a.S&&a.S(Promise.reject(b));a.disconnect()}function Ua(a,b){if(!a.ia||
a.ia.closed)a.ra&&(a.g.clearInterval(a.ra),a.ra=null),a.g.setTimeout(()=>{try{Va(a,
"canceled",null)}catch(c){Ta(a,c)}},b?3E3:0)}
function Va(a,b,c){if(a.S){const d=a.A.isConnected();b=new za(b,c,"popup",d?
a.A.getTargetOrigin():Ca(Ba(a.ja)),d,d);Ha(a.g,b,a.S);a.S=null}a.A&&a.A.sendCommand
("close");a.disconnect()}
var Wa=class{constructor(a,b,c,d,e,f){if(!d||"_blank"!=d&&"_top"!
=d&&"_"==d[0])throw Error('The only allowed targets are "_blank", "_top" and name
targets');this.g=a;this.ee=b;this.ja=c;this.rd=d;this.U=e||null;this.B=f||
{};this.Ka=null;this.Kb=new Promise(g=>{this.Ka=g});this.S=null;this.vb=new
Promise(g=>{this.S=g});this.A=this.ra=this.ia=null}getMode()
{return"_top"==this.rd?"redirect":"popup"}open(){return Qa(this)}whenConnected()
{return this.Kb}disconnect(){this.ra&&(this.g.clearInterval(this.ra),
this.ra=null);this.A&&(this.A.disconnect(),this.A=null);if(this.ia)
{try{this.ia.close()}catch(a){}this.ia=null}this.S=null}getTargetWin(){return
this.ia}acceptResult(){return this.vb}message(a)
{this.A.customMessage(a)}onMessage(a){this.A.onCustomMessage(a)}messageChannel(a)
{return this.A.askChannel(a)}Ba(a,b){"connect"==a?
(this.A.sendStartCommand(this.U),this.Ka()):"result"==a?
(a=b.code,Va(this,a,"failed"==a?
Error(b.data||""):b.data)):"check"==a&&this.g.setTimeout(()=>Ua(this),200)}};
class Xa{constructor(a,b,c,d,e)
{this.g=a;this.Dd=b;this.Id=c;this.O=d;this.je=e}getMode()
{return"redirect"}acceptResult(){const a=new
za(this.Dd,this.Id,"redirect",this.O,this.je,!1);return new
Promise(b=>{Ha(this.g,a,b)})}}function Ya(a,b,c,d,e,f){const g=new
Wa(a.g,b,c,d,e,f);g.open().then(()=>{Za(a,b,g)});return g}function $a(a,b)
{Promise.resolve().then(()=>{b(a)})}function Za(a,b,c){const
d=a.zc[b];d&&d.forEach(e=>{$a(c,e)});a.N[b]=c}
var ab=class{constructor(a)
{this.version="1.24";this.g=a;this.hd=a.location.hash;this.zc={};this.N={};this.wd=
null;this.ce=new Promise(b=>{this.wd=b})}openIframe(a,b,c){const d=new
Pa(a,b,c);return d.connect().then(()=>d)}open(a,b,c,d,e)
{return{targetWin:Ya(this,a,b,c,d,e).getTargetWin()}}openWithMessaging(a,b,c,d,e)
{const f=Ya(this,a,b,c,d,e);return f.whenConnected().then(()=>f)}onResult(a,b){let
c=this.zc[a];c||(c=[],this.zc[a]=c);c.push(b);let d=this.N[a];if(!d&&this.hd)
{try{var e=this.g,f=Ea(this.hd).__WA_RES__;
if(f){var g=JSON.parse(f);if(g&&g.requestId==a){var h=e.location.hash;if(h){var
k=encodeURIComponent("__WA_RES__")+"=";f=-1;do if(f=h.indexOf(k,f),-1!=f){const
A=0<f?h.substring(f-1,f):"";if(""==A||"?"==A||"#"==A||"&"==A){let
C=h.indexOf("&",f+1);-1==C&&(C=h.length);h=h.substring(0,f)+h.substring(C+1)}else
f++}while(-1!=f&&f<h.length)}var m=h;m=m||"";if(m!
=e.location.hash&&e.history&&e.history.replaceState)try{e.history.replaceState(e.hi
story.state,"",m)}catch(A){}var p=g.code,v=g.data,x=g.origin,
D=e.document.referrer&&Ca(Ba(e.document.referrer));d=new Xa(e,p,v,x,x==D)}else
d=null}else d=null}catch(A){Ka(A),this.wd(A)}d&&(this.N[a]=d)}
(a=d)&&$a(a,b)}onRedirectError(a){this.ce.then(a)}};function bb(a)
{setTimeout(()=>{throw a;})};const cb={frameborder:"0",scrolling:"no"};function
db(a,b,c){a.v=b;a.sd(b);a.v.onResizeRequest(d=>{c.resizeView(a,d)});return
a.v.whenReady()}
class y extends aa{constructor(a,b,c,d,e=!1,f=!1)
{super();this.g=a;this.j=this.g.document;this.s=t(this.j,"iframe",cb);this.m=b;this
.Xa=c;this.U=d||{};this.he=e;this.Qd=f;this.sd=this.v=null;this.ob=new
Promise(g=>{this.sd=g})}getElement(){return this.s}init(a){return
this.m.openIframe(this.s,this.Xa,this.U).then(b=>db(this,b,a))}shouldFadeBody()
{return this.he}hasLoadingIndicator(){return this.Qd}on(a,b)
{this.ob.then(c=>{c.on(a,b)})}execute(a)
{this.ob.then(b=>{b.execute(a)})}acceptResult(){return this.ob.then(a=>
a.acceptResult())}acceptResultAndVerify(a,b,c){return
this.ob.then(d=>ba(d,a,b,c))}whenComplete(){return this.acceptResult()}onCancel(a)
{this.acceptResult().catch(b=>{u(b)&&a();throw b;})}resized()
{this.v&&this.v.resized()}};const
eb={UNKNOWN:0,IMPRESSION_PAYWALL:1,IMPRESSION_AD:2,IMPRESSION_OFFERS:3,IMPRESSION_S
UBSCRIBE_BUTTON:4,IMPRESSION_SMARTBOX:5,IMPRESSION_SWG_BUTTON:6,IMPRESSION_CLICK_TO
_SHOW_OFFERS:7,IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED:8,IMPRESSION_S
UBSCRIPTION_COMPLETE:9,IMPRESSION_ACCOUNT_CHANGED:10,IMPRESSION_PAGE_LOAD:11,IMPRES
SION_LINK:12,IMPRESSION_SAVE_SUBSCR_TO_GOOGLE:13,IMPRESSION_GOOGLE_UPDATED:14,IMPRE
SSION_SHOW_OFFERS_SMARTBOX:15,IMPRESSION_SHOW_OFFERS_SWG_BUTTON:16,IMPRESSION_SELEC
T_OFFER_SMARTBOX:17,
IMPRESSION_SELECT_OFFER_SWG_BUTTON:18,IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON:19,I
MPRESSION_SELECT_CONTRIBUTION_SWG_BUTTON:20,IMPRESSION_METER_TOAST:21,IMPRESSION_RE
GWALL:22,IMPRESSION_SHOWCASE_REGWALL:23,IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT:24,
IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT:25,IMPRESSION_CONTRIBUTION_OFFERS:26,IMPRES
SION_TWG_COUNTER:27,IMPRESSION_TWG_SITE_SUPPORTER_WALL:28,IMPRESSION_TWG_PUBLICATIO
N:29,IMPRESSION_TWG_STATIC_BUTTON:30,IMPRESSION_TWG_DYNAMIC_BUTTON:31,IMPRESSION_TW
G_STICKER_SELECTION_SCREEN:32,
IMPRESSION_TWG_PUBLICATION_NOT_SET_UP:33,IMPRESSION_REGWALL_OPT_IN:34,IMPRESSION_NE
WSLETTER_OPT_IN:35,ACTION_SUBSCRIBE:1E3,ACTION_PAYMENT_COMPLETE:1001,ACTION_ACCOUNT
_CREATED:1002,ACTION_ACCOUNT_ACKNOWLEDGED:1003,ACTION_SUBSCRIPTIONS_LANDING_PAGE:10
04,ACTION_PAYMENT_FLOW_STARTED:1005,ACTION_OFFER_SELECTED:1006,ACTION_SWG_BUTTON_CL
ICK:1007,ACTION_VIEW_OFFERS:1008,ACTION_ALREADY_SUBSCRIBED:1009,ACTION_NEW_DEFERRED
_ACCOUNT:1010,ACTION_LINK_CONTINUE:1011,ACTION_LINK_CANCEL:1012,ACTION_GOOGLE_UPDAT
ED_CLOSE:1013,
ACTION_USER_CANCELED_PAYFLOW:1014,ACTION_SAVE_SUBSCR_TO_GOOGLE_CONTINUE:1015,ACTION
_SAVE_SUBSCR_TO_GOOGLE_CANCEL:1016,ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK:1017,ACTION_
SWG_BUTTON_SELECT_OFFER_CLICK:1018,ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK:1019,
ACTION_SWG_BUTTON_SELECT_CONTRIBUTION_CLICK:1020,ACTION_USER_CONSENT_DEFERRED_ACCOU
NT:1021,ACTION_USER_DENY_DEFERRED_ACCOUNT:1022,ACTION_DEFERRED_ACCOUNT_REDIRECT:102
3,ACTION_GET_ENTITLEMENTS:1024,ACTION_METER_TOAST_SUBSCRIBE_CLICK:1025,ACTION_METER
_TOAST_EXPANDED:1026,
ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION:1027,ACTION_METER_TOAST_CLOSED_BY_
SWIPE_DOWN:1028,ACTION_METER_TOAST_CLOSED_BY_X_CLICKED:1029,ACTION_SWG_SUBSCRIPTION
_MINI_PROMPT_CLICK:1030,ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK:1031,ACTION_SWG_S
UBSCRIPTION_MINI_PROMPT_CLOSE:1032,ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE:1033,A
CTION_CONTRIBUTION_OFFER_SELECTED:1034,ACTION_SHOWCASE_REGWALL_GSI_CLICK:1035,ACTIO
N_SHOWCASE_REGWALL_EXISTING_ACCOUNT_CLICK:1036,ACTION_SUBSCRIPTION_OFFERS_CLOSED:10
37,
ACTION_CONTRIBUTION_OFFERS_CLOSED:1038,ACTION_TWG_STATIC_CTA_CLICK:1039,ACTION_TWG_
DYNAMIC_CTA_CLICK:1040,ACTION_TWG_SITE_LEVEL_SUPPORTER_WALL_CTA_CLICK:1041,ACTION_T
WG_DIALOG_SUPPORTER_WALL_CTA_CLICK:1042,ACTION_TWG_COUNTER_CLICK:1043,ACTION_TWG_SI
TE_SUPPORTER_WALL_ALL_THANKS_CLICK:1044,ACTION_TWG_PAID_STICKER_SELECTED_SCREEN_CLO
SE_CLICK:1045,ACTION_TWG_PAID_STICKER_SELECTION_CLICK:1046,ACTION_TWG_FREE_STICKER_
SELECTION_CLICK:1047,ACTION_TWG_MINI_SUPPORTER_WALL_CLICK:1048,ACTION_TWG_CREATOR_B
ENEFIT_CLICK:1049,
ACTION_TWG_FREE_TRANSACTION_START_NEXT_BUTTON_CLICK:1050,ACTION_TWG_PAID_TRANSACTIO
N_START_NEXT_BUTTON_CLICK:1051,ACTION_TWG_STICKER_SELECTION_SCREEN_CLOSE_CLICK:1052
,ACTION_TWG_ARTICLE_LEVEL_SUPPORTER_WALL_CTA_CLICK:1053,ACTION_REGWALL_OPT_IN_BUTTO
N_CLICK:1054,ACTION_REGWALL_ALREADY_OPTED_IN_CLICK:1055,ACTION_NEWSLETTER_OPT_IN_BU
TTON_CLICK:1056,ACTION_NEWSLETTER_ALREADY_OPTED_IN_CLICK:1057,EVENT_PAYMENT_FAILED:
2E3,EVENT_REGWALL_OPT_IN_FAILED:2001,EVENT_NEWSLETTER_OPT_IN_FAILED:2002,EVENT_CUST
OM:3E3,
EVENT_CONFIRM_TX_ID:3001,EVENT_CHANGED_TX_ID:3002,EVENT_GPAY_NO_TX_ID:3003,EVENT_GP
AY_CANNOT_CONFIRM_TX_ID:3004,EVENT_GOOGLE_UPDATED:3005,EVENT_NEW_TX_ID:3006,EVENT_U
NLOCKED_BY_SUBSCRIPTION:3007,EVENT_UNLOCKED_BY_METER:3008,EVENT_NO_ENTITLEMENTS:300
9,EVENT_HAS_METERING_ENTITLEMENTS:3010,EVENT_OFFERED_METER:3011,EVENT_UNLOCKED_FREE
_PAGE:3012,EVENT_INELIGIBLE_PAYWALL:3013,EVENT_UNLOCKED_FOR_CRAWLER:3014,EVENT_TWG_
COUNTER_VIEW:3015,EVENT_TWG_SITE_SUPPORTER_WALL_VIEW:3016,EVENT_TWG_STATIC_BUTTON_V
IEW:3017,
EVENT_TWG_DYNAMIC_BUTTON_VIEW:3018,EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PRIVAT
E:3019,EVENT_TWG_POST_TRANSACTION_SETTING_PRIVATE:3020,EVENT_TWG_PRE_TRANSACTION_PR
IVACY_SETTING_PUBLIC:3021,EVENT_TWG_POST_TRANSACTION_SETTING_PUBLIC:3022,EVENT_REGW
ALL_OPTED_IN:3023,EVENT_NEWSLETTER_OPTED_IN:3024,EVENT_SUBSCRIPTION_STATE:4E3},fb={
UNKNOWN_CLIENT:0,SWG_CLIENT:1,AMP_CLIENT:2,PROPENSITY_CLIENT:3,SWG_SERVER:4,PUBLISH
ER_CLIENT:5,SHOWCASE_CLIENT:6};
class gb{constructor(a=[],b=!0){const c=b?1:0;this.P=null==a[c]?
null:a[c]}getComplete(){return this.P}setComplete(a){this.P=a}toArray(a=!0){const
b=[this.P];a&&b.unshift(this.label());return b}label()
{return"AccountCreationRequest"}}class hb{constructor(a=[],b=!0){b=b?
1:0;this.Ab=null==a[b]?null:a[b]}getAction(){return this.Ab}setAction(a)
{this.Ab=a}toArray(a=!0){const b=[this.Ab];a&&b.unshift(this.label());return
b}label(){return"ActionRequest"}}
class ib{constructor(a=[],b=!0){b=b?1:0;this.Nc=null==a[b]?
null:a[b];this.cc=null==a[1+b]?null:a[1+b]}getSubscriberOrMember(){return
this.Nc}setSubscriberOrMember(a){this.Nc=a}getLinkRequested(){return
this.cc}setLinkRequested(a){this.cc=a}toArray(a=!0){const
b=[this.Nc,this.cc];a&&b.unshift(this.label());return b}label()
{return"AlreadySubscribedResponse"}}
class jb{constructor(a=[],b=!0){const c=b?1:0;this.Pb=null==a[c]?
null:a[c];this.Sc=null==a[1+c]?null:a[1+c];this.yc=null==a[2+c]?
null:a[2+c];this.Yc=null==a[3+c]?null:a[3+c];this.Wc=null==a[4+c]?
null:a[4+c];this.Xc=null==a[5+c]?null:a[5+c];this.I=null==a[6+c]?
null:a[6+c];this.wc=null==a[7+c]?null:a[7+c];this.Pa=a[8+c]||
[];this.Hb=null==a[9+c]?null:a[9+c];this.ja=null==a[10+c]?
null:a[10+c];this.cb=null==a[11+c]||void 0==a[11+c]?null:new
kb(a[11+c],b)}getEmbedderOrigin(){return this.Pb}setEmbedderOrigin(a){this.Pb=
a}getTransactionId(){return this.Sc}setTransactionId(a)
{this.Sc=a}getReferringOrigin(){return this.yc}setReferringOrigin(a)
{this.yc=a}getUtmSource(){return this.Yc}setUtmSource(a){this.Yc=a}getUtmCampaign()
{return this.Wc}setUtmCampaign(a){this.Wc=a}getUtmMedium(){return
this.Xc}setUtmMedium(a){this.Xc=a}getSku(){return this.I}setSku(a)
{this.I=a}getReadyToPay(){return this.wc}setReadyToPay(a){this.wc=a}getLabelList()
{return this.Pa}setLabelList(a){this.Pa=a}getClientVersion(){return
this.Hb}setClientVersion(a){this.Hb=
a}getUrl(){return this.ja}setUrl(a){this.ja=a}getClientTimestamp(){return
this.cb}setClientTimestamp(a){this.cb=a}toArray(a=!0){const
b=[this.Pb,this.Sc,this.yc,this.Yc,this.Wc,this.Xc,this.I,this.wc,this.Pa,this.Hb,t
his.ja,this.cb?this.cb.toArray(a):[]];a&&b.unshift(this.label());return b}label()
{return"AnalyticsContext"}}
class lb{constructor(a=[],b=!0){b=b?1:0;this.Tb=null==a[b]?
null:a[b];this.Zb=null==a[1+b]?null:a[1+b]}getEventOriginator(){return
this.Tb}setEventOriginator(a){this.Tb=a}getIsFromUserAction(){return
this.Zb}setIsFromUserAction(a){this.Zb=a}toArray(a=!0){const
b=[this.Tb,this.Zb];a&&b.unshift(this.label());return b}label()
{return"AnalyticsEventMeta"}}
class mb{constructor(a=[],b=!0){const c=b?1:0;this.F=null==a[c]||void 0==a[c]?
null:new jb(a[c],b);this.oa=null==a[1+c]?null:a[1+c];this.jb=null==a[2+c]||void
0==a[2+c]?null:new lb(a[2+c],b);this.lb=null==a[3+c]||void 0==a[3+c]?null:new
z(a[3+c],b)}getContext(){return this.F}setContext(a){this.F=a}getEvent(){return
this.oa}setEvent(a){this.oa=a}getMeta(){return this.jb}setMeta(a)
{this.jb=a}getParams(){return this.lb}setParams(a){this.lb=a}toArray(a=!0){const
b=[this.F?this.F.toArray(a):[],this.oa,
this.jb?this.jb.toArray(a):[],this.lb?this.lb.toArray(a):
[]];a&&b.unshift(this.label());return b}label(){return"AnalyticsRequest"}}class
nb{constructor(a=[],b=!0){b=b?1:0;this.oa=null==a[b]?null:a[b]}getEvent(){return
this.oa}setEvent(a){this.oa=a}toArray(a=!0){const
b=[this.oa];a&&b.unshift(this.label());return b}label()
{return"AudienceActivityClientLogsRequest"}}
class ob{constructor(a=[],b=!0){b=b?1:0;this.ta=null==a[b]?
null:a[b];this.Kc=null==a[1+b]?null:a[1+b]}getJwt(){return this.ta}setJwt(a)
{this.ta=a}getSource(){return this.Kc}setSource(a){this.Kc=a}toArray(a=!0){const
b=[this.ta,this.Kc];a&&b.unshift(this.label());return b}label()
{return"EntitlementJwt"}}
class pb{constructor(a=[],b=!0){const c=b?1:0;this.zb=null==a[c]||void 0==a[c]?
null:new ob(a[c],b);this.bb=null==a[1+c]||void 0==a[1+c]?null:new
kb(a[1+c],b);this.Rb=null==a[2+c]?null:a[2+c];this.Qb=null==a[3+c]?
null:a[3+c];this.wa=null==a[4+c]?null:a[4+c];this.sa=null==a[5+c]?
null:a[5+c]}getUsedEntitlement(){return this.zb}setUsedEntitlement(a)
{this.zb=a}getClientEventTime(){return this.bb}setClientEventTime(a)
{this.bb=a}getEntitlementSource(){return this.Rb}setEntitlementSource(a)
{this.Rb=a}getEntitlementResult(){return this.Qb}setEntitlementResult(a){this.Qb=
a}getToken(){return this.wa}setToken(a){this.wa=a}getIsUserRegistered(){return
this.sa}setIsUserRegistered(a){this.sa=a}toArray(a=!0){const b=[this.zb?
this.zb.toArray(a):[],this.bb?this.bb.toArray(a):
[],this.Rb,this.Qb,this.wa,this.sa];a&&b.unshift(this.label());return b}label()
{return"EntitlementsRequest"}}
class qb{constructor(a=[],b=!0){b=b?1:0;this.ta=null==a[b]?
null:a[b];this.Pc=null==a[1+b]?null:a[1+b]}getJwt(){return this.ta}setJwt(a)
{this.ta=a}getSwgUserToken(){return this.Pc}setSwgUserToken(a)
{this.Pc=a}toArray(a=!0){const
b=[this.ta,this.Pc];a&&b.unshift(this.label());return b}label()
{return"EntitlementsResponse"}}
class z{constructor(a=[],b=!0){b=b?1:0;this.Jc=null==a[b]?
null:a[b];this.Wb=null==a[1+b]?null:a[1+b];this.Xb=null==a[2+b]?
null:a[2+b];this.I=null==a[3+b]?null:a[3+b];this.kc=null==a[4+b]?
null:a[4+b];this.sa=null==a[5+b]?null:a[5+b];this.Oc=null==a[6+b]?
null:a[6+b]}getSmartboxMessage(){return this.Jc}setSmartboxMessage(a)
{this.Jc=a}getGpayTransactionId(){return this.Wb}setGpayTransactionId(a)
{this.Wb=a}getHadLogged(){return this.Xb}setHadLogged(a){this.Xb=a}getSku(){return
this.I}setSku(a){this.I=
a}getOldTransactionId(){return this.kc}setOldTransactionId(a)
{this.kc=a}getIsUserRegistered(){return this.sa}setIsUserRegistered(a)
{this.sa=a}getSubscriptionFlow(){return this.Oc}setSubscriptionFlow(a)
{this.Oc=a}toArray(a=!0){const
b=[this.Jc,this.Wb,this.Xb,this.I,this.kc,this.sa,this.Oc];a&&b.unshift(this.label(
));return b}label(){return"EventParams"}}
class rb{constructor(a=[],b=!0){b=b?1:0;this.P=null==a[b]?
null:a[b];this.Sb=null==a[1+b]?null:a[1+b]}getComplete(){return
this.P}setComplete(a){this.P=a}getError(){return this.Sb}setError(a)
{this.Sb=a}toArray(a=!0){const b=[this.P,this.Sb];a&&b.unshift(this.label());return
b}label(){return"FinishedLoggingResponse"}}
class sb{constructor(a=[],b=!0){b=b?1:0;this.Db=null==a[b]?
null:a[b];this.wa=null==a[1+b]?null:a[1+b]}getAuthCode(){return
this.Db}setAuthCode(a){this.Db=a}getToken(){return this.wa}setToken(a)
{this.wa=a}toArray(a=!0){const
b=[this.Db,this.wa];a&&b.unshift(this.label());return b}label()
{return"LinkSaveTokenRequest"}}
class tb{constructor(a=[],b=!0){b=b?1:0;this.Bc=null==a[b]?null:a[b]}getRequested()
{return this.Bc}setRequested(a){this.Bc=a}toArray(a=!0){const
b=[this.Bc];a&&b.unshift(this.label());return b}label()
{return"LinkingInfoResponse"}}class ub{constructor(a=[],b=!0){b=b?
1:0;this.Vc=null==a[b]?null:a[b]}getUrlPath(){return this.Vc}setUrlPath(a)
{this.Vc=a}toArray(a=!0){const b=[this.Vc];a&&b.unshift(this.label());return
b}label(){return"OpenDialogRequest"}}
class vb{constructor(a=[],b=!0){b=b?1:0;this.I=null==a[b]?
null:a[b];this.jc=null==a[1+b]?null:a[1+b];this.pc=null==a[2+b]?
null:a[2+b];this.sc=null==a[3+b]?null:a[3+b];this.ic=null==a[4+b]?
null:a[4+b];this.Mb=null==a[5+b]?null:a[5+b];this.Cb=null==a[6+b]?
null:a[6+b]}getSku(){return this.I}setSku(a){this.I=a}getOldSku(){return
this.jc}setOldSku(a){this.jc=a}getOneTime(){return this.pc}setOneTime(a)
{this.pc=a}getPlayOffer(){return this.sc}setPlayOffer(a)
{this.sc=a}getOldPlayOffer(){return this.ic}setOldPlayOffer(a){this.ic=
a}getCustomMessage(){return this.Mb}setCustomMessage(a){this.Mb=a}getAnonymous()
{return this.Cb}setAnonymous(a){this.Cb=a}toArray(a=!0){const
b=[this.I,this.jc,this.pc,this.sc,this.ic,this.Mb,this.Cb];a&&b.unshift(this.label(
));return b}label(){return"SkuSelectedResponse"}}class wb{constructor(a=[],b=!0)
{b=b?1:0;this.Yb=null==a[b]?null:a[b]}getIsClicked(){return this.Yb}setIsClicked(a)
{this.Yb=a}toArray(a=!0){const b=[this.Yb];a&&b.unshift(this.label());return
b}label(){return"SmartBoxMessage"}}
class xb{constructor(a=[],b=!0){b=b?1:0;this.Mc=null==a[b]?null:a[b]}getSubscribe()
{return this.Mc}setSubscribe(a){this.Mc=a}toArray(a=!0){const
b=[this.Mc];a&&b.unshift(this.label());return b}label(){return"SubscribeResponse"}}
class kb{constructor(a=[],b=!0){b=b?1:0;this.Fc=null==a[b]?
null:a[b];this.fc=null==a[1+b]?null:a[1+b]}getSeconds(){return
this.Fc}setSeconds(a){this.Fc=a}getNanos(){return this.fc}setNanos(a)
{this.fc=a}toArray(a=!0){const
b=[this.Fc,this.fc];a&&b.unshift(this.label());return b}label(){return"Timestamp"}}
class yb{constructor(a=[],b=!0){b=b?1:0;this.za=null==a[b]?null:a[b]}getClose()
{return this.za}setClose(a){this.za=a}toArray(a=!0){const
b=[this.za];a&&b.unshift(this.label());return b}label()
{return"ToastCloseRequest"}}class zb{constructor(a=[],b=!0){b=b?
1:0;this.hc=null==a[b]?null:a[b]}getNative(){return this.hc}setNative(a)
{this.hc=a}toArray(a=!0){const b=[this.hc];a&&b.unshift(this.label());return
b}label(){return"ViewSubscriptionsResponse"}}
const
Ab={AccountCreationRequest:gb,ActionRequest:hb,AlreadySubscribedResponse:ib,Analyti
csContext:jb,AnalyticsEventMeta:lb,AnalyticsRequest:mb,AudienceActivityClientLogsRe
quest:nb,EntitlementJwt:ob,EntitlementsRequest:pb,EntitlementsResponse:qb,EventPara
ms:z,FinishedLoggingResponse:rb,LinkSaveTokenRequest:sb,LinkingInfoResponse:tb,Open
DialogRequest:ub,SkuSelectedResponse:vb,SmartBoxMessage:wb,SubscribeResponse:xb,Tim
estamp:kb,ToastCloseRequest:yb,ViewSubscriptionsResponse:zb};function Bb(a){return
JSON.parse(a)}function Cb(a,b){try{return Bb(a)}catch(c){b&&b(c)}}function Db(a,b)
{const c=Cb(a);return c&&c[b]||null};function Eb(a){function b(){throw
Error(`Invalid token: "${a}"`);}const c=a.split(".");3!=c.length&&b();const
d=la(c[0]),e=la(c[1]);return{header:Cb(ja(d),b),payload:Cb(ja(e),b),verifiable:`$
{c[0]}.${c[1]}`,sig:c[2]}}class Fb{constructor(){}decode(a){return
Eb(a).payload}};class Gb{constructor(a,b,c,d,e,f,g,h)
{this.service=a;this.raw=b;this.entitlements=c;this.isReadyToPay=g||!
1;this.decryptedDocumentKey=h||null;this.vc=d;this.$c=e;this.fd=f}clone(){return
new Gb(this.service,this.raw,this.entitlements.map(a=>a.clone()),this.vc,this.
$c,this.fd,this.isReadyToPay,this.decryptedDocumentKey)}json()
{return{service:this.service,entitlements:this.entitlements.map(a=>a.json()),isRead
yToPay:this.isReadyToPay}}enablesThisWithCacheableEntitlements(){const
a=this.getEntitlementForThis();
return!!a&&"google:metering"!==a.source&&"GOOGLE_DEV_MODE_TOKEN"!
==a.subscriptionToken}enablesThisWithGoogleMetering(){const
a=this.getEntitlementForThis();return!!
a&&"google:metering"===a.source}enablesThis(a){return
this.enables(this.vc,a)}enablesAny(a){for(let b=0;b<this.entitlements.length;b+
+)if(0<this.entitlements[b].products.length&&(!a||
a==this.entitlements[b].source))return!0;return!1}enables(a,b){return a?!!
this.getEntitlementFor(a,b):!1}getEntitlementForThis(a){return
this.getEntitlementFor(this.vc,
a)}getEntitlementFor(a,b){if(!a)return n("SwG needs this article to define a
product ID (e.g. example.com:premium). Articles can define a product ID using
JSON+LD. SwG can check entitlements after this article defines a product
ID."),null;const c=this.entitlements.filter(f=>f.enables(a)&&(!b||
b===f.source)),d=da(c,f=>"google:metering"!
==f.source),e=da(c,f=>"google:metering"===f.source);return d||e||
null}getEntitlementForSource(a){if(0<this.entitlements.length)for(let
b=0;b<this.entitlements.length;b++)if(this.entitlements[b].subscriptionToken&&
a==this.entitlements[b].source)return this.entitlements[b];return null}ack(){this.
$c(this)}consume(a){this.fd(this,a)}}function Hb(a){return(Array.isArray(a)?a:
[a]).map(b=>{b||(b={});return new Ib(b.source||"",b.products||
[],b.subscriptionToken)})}
class Ib{constructor(a,b,c)
{this.source=a;this.products=b;this.subscriptionToken=c}clone(){return new
Ib(this.source,this.products.slice(0),this.subscriptionToken)}json()
{return{source:this.source,products:this.products,subscriptionToken:this.subscripti
onToken}}enables(a){if(!a)return!1;const b=a.indexOf(":");if(-1!=b){const
c=a.substring(0,b+1);if(c+"*"==a&&1<=this.products.filter(d=>d.substring(0,b+1)==c)
.length)return ca("enabled with wildcard productId"),!
0;if(this.products.includes(c+"*"))return ca("enabled with wildcard entitlement"),
!0}return this.products.includes(a)}getSku(){if("google"!==this.source)return
null;const a=Db(this.subscriptionToken,"productId")||null;a||n("Unable to retrieve
SKU from SwG subscription token");return a}};class Jb{constructor(a,b)
{this.idToken=a;this.data=b;this.id=b.sub;this.email=b.email;this.emailVerified=b.e
mail_verified;this.name=b.name;this.givenName=b.given_name;this.familyName=b.family
_name;this.pictureUrl=b.picture}clone(){return new
Jb(this.idToken,this.data)}json()
{return{id:this.id,email:this.email,emailVerified:this.emailVerified,name:this.name
,givenName:this.givenName,familyName:this.familyName,pictureUrl:this.pictureUrl}}};
class Kb{constructor(a,b,c,d,e,f,g=null,h=null,k=null,m=null)
{this.raw=a;this.purchaseData=b;this.userData=c;this.entitlements=d;this.productTyp
e=e;this.Ia=f;this.oldSku=g;this.swgUserToken=h;this.paymentRecurrence=k;this.reque
stMetadata=m}clone(){return new
Kb(this.raw,this.purchaseData,this.userData,this.entitlements,this.productType,this
.Ia,this.oldSku,this.swgUserToken)}json()
{return{purchaseData:this.purchaseData.json(),userData:this.userData?
this.userData.json():null,entitlements:this.entitlements?
this.entitlements.json():null,oldSku:this.oldSku,productType:this.productType,swgUs
erToken:this.swgUserToken}}complete(){return this.Ia()}}class Lb{constructor(a,b)
{this.data=this.raw=a;this.signature=b}clone(){return new
Lb(this.raw,this.signature)}json()
{return{data:this.raw,signature:this.signature}}};class Mb{constructor(a,b,c,d)
{this.entitlements=a;this.userData=b;this.purchaseDataList=c;this.purchaseData=c[0]
;this.Ia=d}clone(){return new
Mb(this.entitlements,this.userData,this.purchaseDataList,this.Ia)}json()
{return{entitlements:this.entitlements.json(),userData:this.userData.json(),purchas
eDataList:this.purchaseDataList.map(a=>a.json()),purchaseData:this.purchaseData.jso
n()}}complete(){return this.Ia()}};const
Nb={UNKNOWN:"unknown",NON_SUBSCRIBER:"non_subscriber",SUBSCRIBER:"subscriber",PAST_
SUBSCRIBER:"past_subscriber"},Ob={IMPRESSION_PAYWALL:"paywall",IMPRESSION_AD:"ad_sh
own",IMPRESSION_OFFERS:"offers_shown",ACTION_SUBSCRIPTIONS_LANDING_PAGE:"subscripti
ons_landing_page",ACTION_OFFER_SELECTED:"offer_selected",ACTION_PAYMENT_FLOW_STARTE
D:"payment_flow_start",ACTION_PAYMENT_COMPLETED:"payment_complete",EVENT_CUSTOM:"cu
stom"};const Pb={GENERAL:"general",PAYWALL:"paywall"};const Qb=/(^|\.)google\.
(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/;let Rb,Sb;
function B(a){Rb||(Rb=self.document.createElement("a"),Sb=self.UrlCache||
(self.UrlCache=Object.create(null)));const b=Sb[a];if(b)return b;var
c=Rb;c.href=a;const
d={href:c.href,protocol:c.protocol,host:c.host,hostname:c.hostname,port:"0"==c.port
?"":c.port,pathname:c.pathname,search:c.search,hash:c.hash,origin:""};d.origin=c.or
igin&&"null"!=c.origin?c.origin:"data:"!=d.protocol&&d.host?
d.protocol+"//"+d.host:d.href;return Sb[a]=d}
function E(a){return a?(/^[?#]/.test(a)?
a.slice(1):a).split("&").reduce((b,c)=>{c=c.split("=");try{const
d=decodeURIComponent(c[0]||""),e=decodeURIComponent(c[1]||"");d&&(b[d]=e)}catch(d)
{n(`SwG could not parse a URL query param: ${c[0]}`)}return b},{}):{}}function
F(a,b,c){const d=a.indexOf("?"),e=a.indexOf("#");let f="";-1!
=e&&(f=a.substring(e),a=a.substring(0,e));-1==d?a+="?":d<a.length-
1&&(a+="&");a+=encodeURIComponent(b)+"="+encodeURIComponent(c);return a+f}
function Tb(a)
{return(a=a.getRootNode().querySelector("link[rel='canonical']"))&&a.href||""}const
Ub=B(self.window.location.href),Vb=B(self.document.referrer);function Wb(a){a=a||
Ub;return"https"===a.protocol||"https:"===a.protocol};const
Xb={zero:0,nocache:1,hr1:36E5,hr12:432E5},Yb={"default":
{frontEnd:"https://news.google.com",payEnv:"PRODUCTION",playEnv:"PROD",feCache:"hr1
"},prod:
{frontEnd:"https://news.google.com",payEnv:"PRODUCTION",playEnv:"PROD",feCache:Xb.h
r1},autopush:{frontEnd:"https://subscribe-
autopush.sandbox.google.com",payEnv:"PRODUCTION",playEnv:"AUTOPUSH",feCache:Xb.noca
che},qual:{frontEnd:"https://subscribe-
qual.sandbox.google.com",payEnv:"SANDBOX",playEnv:"STAGING",feCache:Xb.hr1}};
function G(){const a=E(self.location.hash)["swg.mode"];return a&&Yb[a]?
Yb[a]:Yb["default"]}function H(a){return`${G().frontEnd}/swg/_/api/v1`+a}function
I(a,b={},c=!1,d=""){const e=d?c?`swg/${d}`:`${d}/swg`:"swg";a=F(`${G().frontEnd}/$
{e}/_/ui/v1${a}`,"_",Zb());const f=E(self.location.hash)["swg.boqjsmode"];void 0!
==f&&(a=F(a,"jsmode",f));for(const g in b)a=F(a,g,b[g]);return a}function J(a)
{return Object.assign(a,{_client:"SwG 0.1.22.197"})}
function Zb(){var a=G().feCache;let b=Xb[a];null==b&&(b=1);if(0===b)return"_";const
c=Date.now();return String(1>=b?c:Math.floor(c/b))};const
$b={IMMEDIATE_WITH_TIME_PRORATION:1},ac={AUTO:1,ONE_TIME:2};function K(a,b=null)
{return new z([,,,,a,,,b])}
class L{constructor(a,b,c="SUBSCRIPTION")
{this.h=a;this.rc=a.payClient();this.R=a.pageConfig();this.o=a.dialogManager();this
.ha=b;this.ud=c;this.Y=a.analytics();this.u=a.eventManager();this.D=a.clientConfigM
anager()}start(){return this.D.getClientConfig().then(a=>{var
b=a.paySwgVersion;const
c={skuId:this.ha.skuId,publicationId:this.R.getPublicationId()};b&&(c.swgVersion=b)
;if(this.ha.oldSku){c.oldSku=this.ha.oldSku;var
d=this.ha.replaceSkuProrationMode;c.replaceSkuProrationMode=d?$b[d]:
$b.IMMEDIATE_WITH_TIME_PRORATION;
this.Y.setSku(c.oldSku)}this.ha.oneTime&&(c.paymentRecurrence=ac.ONE_TIME);this.ha.
metadata&&(c.metadata=this.ha.metadata);d="UI_CONTRIBUTION"==this.ud?"contribute":"
subscribe";this.h.callbacks().triggerFlowStarted(d,this.ha);this.u.logSwgEvent(1005
,!0,K(c.skuId));bc=!0;this.rc.start({apiVersion:1,allowedPaymentMethods:
["CARD"],environment:G().payEnv,playEnvironment:G().playEnv,swg:c,i:
{startTimeMs:Date.now(),productType:this.ud}},
{forceRedirect:"redirect"==this.h.config().windowOpenMode,forceDisableNative:"2"==
b});Promise.resolve()})}}
function cc(a){const
b=a.eventManager();a.payClient().onResponse(c=>{a.entitlementsManager().blockNextNo
tification();const d=new
dc(a),e=ec(a,c,d.complete.bind(d));a.callbacks().triggerPaymentResponse(e);return
e.then(f=>{const g=Db(f.purchaseData.raw,"productId")||
null;a.analytics().setSku(g||"");b.logSwgEvent(1001,!
0,K(g||"","UI_CONTRIBUTION"==f.productType?"contribute":"subscribe"));d.start(f)},f
=>{if(u(f))f="UI_CONTRIBUTION"==f.productType?"contribute":"subscribe",a.callbacks(
).triggerFlowCanceled(f),a.eventManager().logSwgEvent(1014,
!0);else throw a.eventManager().logSwgEvent(2E3,!1),a.jserror().error("Pay
failed",f),f;})})}
class dc{constructor(a)
{this.g=a.win();this.h=a;this.m=a.activities();this.o=a.dialogManager();this.rb=thi
s.X=null;this.Y=a.analytics();this.u=a.eventManager();this.D=a.clientConfigManager(
);this.I=null}start(a){this.I=Db(a.purchaseData.raw,"productId")||
null;this.u.logSwgEvent(10,!0,K(this.I||""));this.h.entitlementsManager().reset(!
0);const
b={publicationId:this.h.pageConfig().getPublicationId(),productType:a.productType,i
sSubscriptionUpdate:!!a.oldSku,isOneTime:!!a.paymentRecurrence};a.userData&&
a.entitlements?
(b.idToken=a.userData.idToken,this.h.entitlementsManager().pushNextEntitlements(a.e
ntitlements.raw),a.swgUserToken&&this.h.storage().set("USER_TOKEN",a.swgUserToken,!
0)):b.loginHint=a.userData&&a.userData.email;const
c={};if("VIRTUAL_GIFT"===b.productType){Object.assign(c,
{productType:b.productType,publicationId:b.publicationId,offerId:this.I,origin:B(th
is.g.location.href).origin});a.requestMetadata&&(c.canonicalUrl=a.requestMetadata.c
ontentId,c.isAnonymous=a.requestMetadata.anonymous);
a.swgUserToken&&(b.swgUserToken=a.swgUserToken);const
e=Db(a.purchaseData.raw,"orderId")||
null;e&&(b.orderId=e)}this.D.shouldForceLangInIframes()&&(c.hl=this.D.getLanguage()
);const d=I("/payconfirmiframe",c);return
this.X=this.D.getClientConfig().then(e=>{b.useUpdatedConfirmUi=e.useUpdatedOfferFlo
ws;b.skipAccountCreationScreen=e.skipAccountCreationScreen;return new
y(this.g,this.m,d,J(b),!
0)}).then(e=>{e.on(qb,this.Md.bind(this));e.acceptResult().then(()=>{this.o.complet
eView(e)});this.rb=this.o.openView(e);
return e})}Md(a){const
b=a.getJwt();b&&this.h.entitlementsManager().pushNextEntitlements(b)}complete()
{this.u.logSwgEvent(1002,!
0,K(this.I||""));this.h.entitlementsManager().unblockNextNotification();return
Promise.all([this.X,this.rb,this.D.getClientConfig()]).then(a=>{const
b=a[0],c=a[2];if(!c.skipAccountCreationScreen){const d=new gb;d.setComplete(!
0);b.execute(d)}return
b.acceptResult().catch(()=>{}).then(()=>{c.skipAccountCreationScreen||
this.u.logSwgEvent(1003,!
0,K(this.I||""));this.h.entitlementsManager().setToastShown(!0)})})}}
var bc=!1;
function ec(a,b,c){const d=!bc;bc=!1;return b.then(e=>{let f=void
0;if("object"===typeof e&&e.googleTransactionId){const
A=a.analytics().getTransactionId(),C=e.googleTransactionId;if(d)
{a.analytics().setTransactionId(C);var g=3004}else A===C?g=3001:(f=new
z,f.setGpayTransactionId(C),g=3002)}else f=new z,f.setHadLogged(!
d),g=3003;a.eventManager().logSwgEvent(g,!0,f);var h=g=null,k="SUBSCRIPTION";let
m=null,p=null,v=null;e&&("string"==typeof e?h=e:("swgCallbackData"in e?
g=e.swgCallbackData:"integratorClientCallbackData"in
e&&(h=e.integratorClientCallbackData),"paymentRequest"in
e&&(k=e.paymentRequest.swg||
{},m=k.oldSku,p=k.paymentRecurrence,v=k.metadata,k=(e.paymentRequest.i||
{}).productType||"SUBSCRIPTION")));h&&!
g&&(h=atob(h))&&(g=Bb(h).swgCallbackData);if(!g)throw Error("unexpected payment
response");e=h=JSON.stringify(g);h=new
Lb(g.purchaseData,g.purchaseDataSignature);var x=g.idToken;if(x){var D=(new
Fb).decode(x);D=new Jb(x,D)}else D=null;x=g;x=x.signedEntitlements?
a.entitlementsManager().parseEntitlements(x):
null;return new Kb(e,h,D,x,k,c,m,g.swgUserToken,p,v)})};class fc{constructor(a,b)
{this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.u=a.ev
entManager();this.D=a.clientConfigManager();this.l=null;let c;const d=null!
=(c=null==b?void 0:b.isClosable)?c:!
1,e=a.activities().addDefaultArguments({showNative:a.callbacks().hasSubscribeReques
tCallback(),productType:"SUBSCRIPTION",list:b&&b.list||"default",skus:b&&b.skus||
null,isClosable:d});if(b&&b.oldSku){e.oldSku=b.oldSku;q(e.skus,"Need a sku list if
old sku is provided!");let f=e.skus;
const g=e.oldSku;f=f.filter(h=>h!==g);q(0<f.length,"Sku list only contained offer
user already has");e.skus=f}if(e.skus&&1===e.skus.length&&(a=e.skus[0],b=e.oldSku))
{const f=new vb;f.setSku(a);f.setOldSku(b);this.wb(f);return}this.ie=e.skus||
["*"];this.dd=this.D.getClientConfig();this.X=this.dd.then(f=>this.Ic(f)?new
y(this.g,this.m,this.Vb(f),e,!0):null)}wb(a){const b=a.getSku();if(b){const
c={skuId:b};if(a=a.getOldSku())c.oldSku=a,this.h.analytics().setSku(a);this.u.logSw
gEvent(1006,!0,new z([,
,,,b]));(new L(this.h,c)).start()}}Oa(a)
{a.getSubscriberOrMember()&&(this.u.logSwgEvent(1009,!
0),this.h.callbacks().triggerLoginRequest({linkRequested:!!
a.getLinkRequested()}))}Lc(a)
{a.getNative()&&this.h.callbacks().triggerSubscribeRequest()}start(){return this.X?
this.X.then(a=>{if(!a)return
Promise.resolve();this.h.callbacks().triggerFlowStarted("showOffers",
{skus:this.ie,source:"SwG"});a.onCancel(()=>{this.h.callbacks().triggerFlowCanceled
("showOffers")});a.on(vb,this.wb.bind(this));a.on(ib,this.Oa.bind(this));
a.on(zb,this.Lc.bind(this));this.l=a;return this.dd.then(b=>{if(this.l)return
this.o.openView(this.l,!1,b.useUpdatedOfferFlows?{desktopConfig:
{isCenterPositioned:!0,supportsWideScreen:!0}}:{})})}):Promise.resolve()}Ic(a){let
b;return!1!==(null==(b=a.uiPredicates)?void 0:b.canDisplayAutoPrompt)}Vb(a){return
a.useUpdatedOfferFlows?this.D.shouldForceLangInIframes()?
I("/subscriptionoffersiframe",
{hl:this.D.getLanguage()}):I("/subscriptionoffersiframe"):I("/offersiframe")}showNo
EntitlementFoundToast(){this.l&&
this.l.execute(new qb)}}
class gc{constructor(a,b)
{this.h=a;this.B=b;this.m=a.activities();this.o=a.dialogManager();this.u=a.eventMan
ager();this.l=new
y(a.win(),this.m,I("/optionsiframe"),J({publicationId:a.pageConfig().getPublication
Id(),productId:a.pageConfig().getProductId(),list:b&&b.list||"default",skus:b&&b.sk
us||null,isClosable:!0}),!1)}start()
{this.h.callbacks().triggerFlowStarted("showSubscribeOption");this.l.onCancel(()=>{
this.h.callbacks().triggerFlowCanceled("showSubscribeOption")});this.l.on(xb,this.p
d.bind(this));
this.l.acceptResult().then(a=>{a=a.data;const b=new
xb;a.subscribe&&b.setSubscribe(!
0);this.pd(b)},a=>{this.o.completeView(this.l);throw
a;});this.u.logSwgEvent(7);return this.o.openView(this.l)}pd(a)
{a.getSubscribe()&&(a=this.B||{},void 0==a.isClosable&&(a.isClosable=!
0),this.u.logSwgEvent(1008,!0),(new fc(this.h,a)).start())}}
class hc{constructor(a,b={})
{this.h=a;this.B=b;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();th
is.u=a.eventManager();this.l=new
y(this.g,this.m,I("/abbrvofferiframe"),J({publicationId:a.pageConfig().getPublicati
onId(),productId:a.pageConfig().getProductId(),showNative:a.callbacks().hasSubscrib
eRequestCallback(),list:b&&b.list||"default",skus:b&&b.skus||null,isClosable:!0}),!
1)}Oa(a){a.getSubscriberOrMember()&&(this.u.logSwgEvent(1009,!
0),this.h.callbacks().triggerLoginRequest({linkRequested:!!
a.getLinkRequested()}))}start()
{this.h.callbacks().triggerFlowStarted("showAbbrvOffer");
this.l.onCancel(()=>{this.h.callbacks().triggerFlowCanceled("showAbbrvOffer")});thi
s.l.on(ib,this.Oa.bind(this));this.l.acceptResult().then(a=>{a.data.viewOffers?
(a=this.B||{},void 0==a.isClosable&&(a.isClosable=!0),this.u.logSwgEvent(1008,!0),
(new
fc(this.h,a)).start()):a.data["native"]&&(this.h.callbacks().triggerSubscribeReques
t(),this.o.completeView(this.l))});this.u.logSwgEvent(8);return
this.o.openView(this.l)}};class ic{constructor(a){this.v=a}acceptResult(){return
this.v.acceptResult()}}
class jc{constructor(a,b,c,d){this.aa=new Pa(a,b,d);this.Fb={};this.h=c}whenReady()
{return this.aa.whenReady()}connect(){return
this.aa.connect().then(()=>{this.aa.onMessage(a=>{if(a=a&&a.RESPONSE){var
b=this.Fb[a[0]];if(b){a:{var c=a?a[0]:null;if(c&&(c=Ab[c])){a=new c(a);break
a}throw Error("Deserialization failed for
"+a);}b(a)}}});if(this.h&&this.h.eventManager())this.on(mb,a=>{this.h.eventManager(
).logEvent({eventType:a.getEvent(),eventOriginator:4,isFromUserAction:a.getMeta().g
etIsFromUserAction(),
additionalParameters:a.getParams()})})})}disconnect()
{this.aa.disconnect()}getMode(){return this.aa.getMode()}acceptResult(){return
this.aa.acceptResult()}onResizeRequest(a){return
this.aa.onResizeRequest(a)}execute(a)
{this.aa.message({REQUEST:a.toArray()})}on(a,b){let c=null;try{c=(new
a).label()}catch(d){c=null}if(!c)throw Error("Invalid data
type");if(this.Fb[c])throw Error("Invalid type or duplicate callback for
",c);this.Fb[c]=b}resized(){this.aa.resized()}}
function kc(a,b,c,d){const e=new jc(b,c,a.h,d);return e.connect().then(()=>e)}
class lc{constructor(a){this.h=a;this.m=new ab(a.win())}addDefaultArguments(a){var
b=this.h;const c=b.pageConfig();b=b.analytics().getContext();return
Object.assign({analyticsContext:b.toArray(),publicationId:c.getPublicationId(),prod
uctId:c.getProductId(),_client:"SwG 0.1.22.197",supportsEventManager:!0},a||
{})}openIframe(a,b,c,d=!1){d&&(c=this.addDefaultArguments(c));return
kc(this,a,b,c)}open(a,b,c,d,e,f=!1){f&&(d=this.addDefaultArguments(d));return
this.m.open(a,b,c,d,e)}onResult(a,
b){this.m.onResult(a,c=>{b(new ic(c))})}onRedirectError(a)
{this.m.onRedirectError(a)}getOriginalWebActivityPorts(){return this.m}};function
M(a){return"[object Object]"===Object.prototype.toString.call(a)}function N(a,b)
{for(const c in a)if(a[c]===b)return!0;return!1}function O(a)
{return"boolean"===typeof a};function mc(a,b){return"Event has an invalid
"+a+"("+b+")"}
function nc(a){if(!M(a))throw Error("Event must be a valid object");if(!
N(eb,a.eventType))throw Error(mc("eventType",a.eventType));if(!
N(fb,a.eventOriginator))throw Error(mc("eventOriginator",a.eventOriginator));if(!
M(a.additionalParameters)&&null!=a.additionalParameters)throw
Error(mc("additionalParameters",a.additionalParameters));if(null!
=a.isFromUserAction&&!O(a.isFromUserAction))throw
Error(mc("isFromUserAction",a.isFromUserAction));}
class oc{constructor(a){this.dc=[];this.Ub=[];this.
$b=null;this.jd=a}registerEventListener(a){if("function"!==typeof a)throw
Error("Event manager listeners must be a
function");this.dc.push(a)}registerEventFilterer(a){if("function"!==typeof a)throw
Error("Event manager filterers must be a function");this.Ub.push(a)}logEvent(a)
{nc(a);this.$b=this.jd.then(()=>{for(var b=0;b<this.Ub.length;b+
+)try{if(1===this.Ub[b](a))return Promise.resolve()}catch(c)
{l(c)}for(b=0;b<this.dc.length;b++)try{this.dc[b](a)}catch(c){l(c)}return
Promise.resolve()})}logSwgEvent(a,
b=!1,c=null)
{this.logEvent({eventType:a,eventOriginator:1,isFromUserAction:b,additionalParamete
rs:c})}getReadyPromise(){return this.jd}};let pc=null;
function qc(a){if(!pc){pc={};let b="replace-subscription,update-google-transaction-
id,smartbox,pay-client-redirect";try{const c=E(a.location.hash)
["swg.experiments"];c&&(b+=","+c)}catch(c)
{bb(c)}b.split(",").forEach(c=>{if(c=c.trim())try{var d=c;c=pc;let g,h,k=!1;var
e=d.indexOf(":");-1==e?(g=d,h=100,k=!1):
(g=d.substring(0,e).trim(),d=d.substring(e+1),"c"==d.substring(d.length-1)&&(k=!
0,d=d.substring(0,d.length-1)),h=parseInt(d,10));if(isNaN(h))throw Error("invalid
fraction");let m;if(99<h)m=!0;else if(1>h)m=!1;else if(a.sessionStorage)
{k=k&&20>=h;try{e="subscribe.google.com:e:"+
g+":"+h+(k?"c":"");var f=a.sessionStorage.getItem(e);f="e"==f?"e":"c"==f?"c":null;!
f&&100*a.Math.random()<=h*(k?
2:1)&&(f=(k?.5>=a.Math.random():1)?"e":"c",a.sessionStorage.setItem(e,f));m=!!
f;"c"==f&&(g="c-"+g)}catch(p){m=!1,bb(p)}}else m=!1;c[g]=m}catch(g){bb(g)}})}return
pc}function P(a,b){return qc(a)[b]||!1}function rc(a){a=qc(a);const b=[];for(const
c in a)a[c]&&b.push(c);return b};function sc(){var a=Date.now();return new
kb([Math.floor(a/1E3),a%1E3*1E6],!1)};const
tc={opacity:"0",position:"absolute",top:"-10px",left:"-
10px",height:"1px",width:"1px"};function uc(a){const b=new rb;b.setComplete(!
1);b.setError(a);return b}
function vc(a){const b=a.F;P(a.j.getWin(),"update-google-transaction-id")?
b.setTransactionId(na()
+".swg"):b.setTransactionId(na());b.setReferringOrigin(B(a.j.getWin().document.refe
rrer).origin);b.setClientVersion("SwG 0.1.22.197");b.setUrl(Tb(a.j));const
c=E(a.j.getWin().location.search),d=c.utm_campaign,e=c.utm_medium;a=c.utm_source;d&
&b.setUtmCampaign(d);e&&b.setUtmMedium(e);a&&b.setUtmSource(a)}
class wc{constructor(a,b)
{this.G=b;this.j=a.doc();this.h=a;this.m=a.activities();this.s=t(this.j.getWin().do
cument,"iframe",
{});r(this.s,tc);this.j.getBody().appendChild(this.getElement());this.gd=!
1;this.F=new jb;vc(this);this.
$b=this.Gc=null;this.u=a.eventManager();this.u.registerEventListener(this.Na.bind(t
his));this.yb=0;this.qb=this.ib=null;this.ec=!
1;this.Ya=null;this.Kd=()=>sc()}setTransactionId(a){const
b=this.F.getTransactionId();this.F.setTransactionId(a);if(null!=b&&b!=a){const
c=new z;
c.setOldTransactionId(b);this.u.logSwgEvent(3006,!0,c)}}getTransactionId(){return
this.F.getTransactionId()}getSku(){return this.F.getSku()}setSku(a)
{this.F.setSku(a)}setUrl(a){this.F.setUrl(a)}addLabels(a){if(a&&0<a.length){const
b=[].concat(this.F.getLabelList());a.forEach(c=>{-
1==b.indexOf(c)&&b.push(c)});this.F.setLabelList(b)}}getElement(){return
this.s}start(){this.Gc||
(this.addLabels(rc(this.j.getWin())),this.Gc=this.m.openIframe(this.s,I("/serviceif
rame"),null,!0).then(a=>{a.on(rb,this.Bb.bind(this));
return a.whenReady().then(()=>{this.addLabels(rc(this.j.getWin()));return
a})},a=>{this.ec=!0;this.Bb(uc("Could not connect ["+a+"]"))}));return
this.Gc}setReadyToPay(a){this.F.setReadyToPay(a)}close()
{this.j.getBody().removeChild(this.getElement())}getContext(){return this.F}Na(a)
{4E3!==a.eventType&&6!==a.eventOriginator&&(3!==a.eventOriginator&&5!
==a.eventOriginator&&2!==a.eventOriginator||!
0===this.h.config().enableSwgAnalytics||
11===a.eventType&&2===a.eventOriginator)&&(this.yb++,this.$b=this.start().then(b=>
{const c=new lb;c.setEventOriginator(a.eventOriginator);c.setIsFromUserAction(!!
a.isFromUserAction);this.F.setClientTimestamp(this.Kd());const d=new
mb;d.setEvent(a.eventType);d.setContext(this.F);d.setMeta(c);a.additionalParameters
instanceof
z&&d.setParams(a.additionalParameters);b.execute(d);P(this.j.getWin(),"logging-
beacon")&&(b=encodeURIComponent(this.h.pageConfig().getPublicationId()),b=H("/publi
cation/"+b+"/clientlogs"),this.G.sendBeacon(b,d))}))}Bb(a){const
b=a&&a.getComplete()||!1;a=a&&
a.getError()||"Unknown logging Error";const c="AnalyticsService timed out waiting
for a response"===a;b||l("Error when logging: "+a);this.yb--;c||(this.gd=!0);null!
==this.ib&&(0===this.yb||this.ec||c)&&(null!
==this.Ya&&(clearTimeout(this.Ya),this.Ya=null),this.ib(b),this.ib=this.qb=null)}ge
tLoggingPromise(){if(0===this.yb||this.ec)return Promise.resolve(!
0);if(null===this.qb){this.qb=new Promise(b=>{this.ib=b});const
a=this.Bb.bind(this);this.Ya=setTimeout(()=>{this.Ya=null;a(uc("AnalyticsService
timed out waiting for a response"))},
this.gd?200:500)}return this.qb}};var xc={en:"Subscribe with Google",ar:"Google
\u0627\u0634\u062a\u0631\u0643\u00a0\u0645\u0639",de:"Abonnieren mit Google","en-
au":"Subscribe with Google","en-ca":"Subscribe with Google","en-gb":"Subscribe with
Google","en-us":"Subscribe with Google",es:"Suscr\u00edbete con Google","es-
419":"Suscr\u00edbete con Google","es-latam":"Suscr\u00edbete con Google","es-
latn":"Suscr\u00edbete con Google",fr:"S'abonner avec Google","fr-ca":"S'abonner
avec Google",hi:"Google \u0915\u0947 \u095b\u0930\u093f\u092f\u0947
\u0938\u0926\u0938\u094d\u092f\u0924\u093e",
id:"Berlangganan dengan Google",it:"Abbonati con Google",jp:"Google
\u3067\u8cfc\u8aad",ko:"Google \uc744 \ud1b5\ud55c\uad6c\ub3c5",ms:"Langgan dengan
Google",nl:"Abonneren via Google",no:"Abonner med Google",pl:"Subskrybuj z
Google",pt:"Subscrever com o Google","pt-br":"Assine com o
Google",ru:"\u041f\u043e\u0434\u043f\u0438c\u043a\u0430
\u0447\u0435\u0440\u0435\u0437 Google",se:"Prenumerera med
Google",th:"\u0e2a\u0e21\u0e31\u0e04\u0e23\u0e1f\u0e32\u0e19 Google",tr:"Google ile
Abone Ol",uk:"\u041f\u0456\u0434\u043f\u0438\u0441\u0430\u0442\u0438\u0441\u044f
\u0447\u0435\u0440\u0435\u0437 Google",
"zh-cn":"\u901a\u8fc7 Google \u8ba2\u9605","zh-hk":"\u900f\u904e Google
\u8a02\u95b1","zh-tw":"\u900f\u904e Google \u8a02\u95b1"},yc={en:"Contribute with
Google",ar:"\u0627\u0644\u0645\u0633\u0627\u0647\u0645\u0629
\u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 Google",de:"Mit Google
beitragen","en-au":"Contribute with Google","en-ca":"Contribute with Google","en-
gb":"Contribute with Google","en-us":"Contribute with Google",es:"\tContribuye con
Google","es-419":"Contribuir con Google","es-latam":"Contribuir con Google",
"es-latn":"Contribuye con Google",fr:"Contribuer avec Google","fr-ca":"Contribuer
avec Google",hi:"Google \u0916\u093e\u0924\u0947 \u0915\u0940 \u092e\u0926\u0926
\u0938\u0947 \u092f\u094b\u0917\u0926\u093e\u0928
\u0915\u0930\u0947\u0902",id:"Berkontribusi dengan Google",it:"Contribuisci con
Google",jp:"Google \u3067\u5bc4\u4ed8",ko:"Google\uc744 \ud1b5\ud574
\ucc38\uc5ec\ud558\uae30",ms:"Sumbangkan dengan Google",nl:"Bijdragen met
Google",no:"Bidra med Google",pl:"Wesprzyj publikacj\u0119 przez Google",
pt:"Contribuir com o Google","pt-br":"Contribua com o
Google",ru:"\u0412\u043d\u0435\u0441\u0442\u0438
\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0447\u0435\u0440\u0435\u0437
Google",se:"Bidra med
Google",th:"\u0e21\u0e35\u0e2a\u0e48\u0e27\u0e19\u0e23\u0e48\u0e27\u0e21\u0e1c\u0e4
8\u0e32\u0e19 Google",tr:"Google ile Katk\u0131da
Bulun",uk:"\u0417\u0440\u043e\u0431\u0438\u0442\u0438
\u0432\u043d\u0435\u0441\u043e\u043a \u0447\u0435\u0440\u0435\u0437 Google","zh-
cn":"\u901a\u8fc7 Google \u6350\u8d60",
"zh-hk":"\u900f\u904e Google \u63d0\u4f9b\u5167\u5bb9","zh-tw":"\u900f\u904e Google
\u6350\u6b3e"};const zc={frameborder:"0",scrolling:"no"};
class Ac{constructor(a,b,c,d)
{this.h=a;this.g=a.win();this.j=this.g.document;this.m=a.activities();this.s=t(this
.j,"iframe",zc);this.Bd=b;this.B=c;this.T=d;this.Xa=I("/smartboxiframe");const
e={productId:this.h.pageConfig().getProductId(),publicationId:this.h.pageConfig().g
etPublicationId(),theme:this.B&&this.B.theme||"light",lang:this.B&&this.B.lang||"en
"},f=this.B&&this.B.messageTextColor;f&&(e.messageTextColor=f);this.U=J(e)}Pd(a)
{if(a&&a.getIsClicked()){if(!this.T)throw Error("No callback!");this.T()}}start()
{r(this.s,
{opacity:1,position:"absolute",top:0,bottom:0,left:0,height:"100%",right:0,width:"1
00%"});this.Bd.appendChild(this.s);const
a=this.m.addDefaultArguments(this.U);this.m.openIframe(this.s,this.Xa,a).then(b=>{b
.on(wb,this.Pd.bind(this))});return this.s}};function Bc(a,b){const
c=a.en;if("object"!==typeof a||!b)return c;let d="string"===typeof b?b:b.lang?
b.lang:b.ownerDocument&&b.ownerDocument.documentElement.lang?
b.ownerDocument.documentElement.lang:"en";d=d.toLowerCase();d=d.replace(/_/g,"-");c
onst e=d.split("-");for(;e.length;){const f=e.join("-");if(f in a)return
a[f];e.pop()}return c};function Cc(a,b,c,d,e){const f=Dc(d),g=("function"==typeof
d?d:null)||e,h=k=>{Ec(a,c,!0);"function"===typeof
g&&g(k)};b.addEventListener("click",h);return{options:f,clickFun:h}}function
Ec(a,b,c){a.Gd.then(d=>{d.eventManager().logSwgEvent(b,c)})}function Dc(a)
{a=a&&"function"!=typeof a?a:{theme:"light"};const b=a.theme;"light"!==b&&"dark"!
==b&&(a.theme="light");return a}
class Fc{constructor(a,b){this.j=a;this.Gd=b}init(){const
a=this.j.getHead();a&&(a.querySelector('link[href="https://news.google.com/swg/js/v
1/swg-button.css"]')||a.appendChild(t(this.j.getWin().document,"link",
{rel:"stylesheet",type:"text/css",href:"https://news.google.com/swg/js/v1/swg-
button.css"})))}create(a,b){const c=t(this.j.getWin().document,"button",{});return
this.attach(c,a,b)}attach(a,b,c)
{b=Cc(this,a,1007,b,c).options;a.classList.add(`swg-button-$
{b.theme}`);a.setAttribute("role","button");b.lang&&a.setAttribute("lang",b.lang);a
.setAttribute("title",
Bc(xc,a)||"");Ec(this,6);return a}attachSubscribeButton(a,b,c)
{b=Cc(this,a,1017,b,c).options;c=b.theme;a.classList.add(`swg-button-v2-$
{c}`);a.setAttribute("role","button");b.lang&&a.setAttribute("lang",b.lang);b.enabl
e||a.setAttribute("disabled","disabled");a.innerHTML='<div class="swg-button-v2-
icon-
$theme$"></div>$textContent$'.replace("$theme$",c).replace("$textContent$",Bc(xc,a)
||"");Ec(this,16);return a}attachContributeButton(a,b,c)
{b=Cc(this,a,1019,b,c).options;c=b.theme;a.classList.add(`swg-button-v2-${c}`);
a.setAttribute("role","button");b.lang&&a.setAttribute("lang",b.lang);b.enable||
a.setAttribute("disabled","disabled");a.innerHTML='<div class="swg-button-v2-icon-
$theme$"></div>$textContent$'.replace("$theme$",c).replace("$textContent$",Bc(yc,a)
||"");Ec(this,19);return a}attachButtonsWithAttribute(a,b,c,d){b.forEach(e=>{const
f=this.j.getRootNode().querySelectorAll(`[${a}="${e}"]`);for(let g=0;g<f.length;g+
+)"subscription"===e?
this.attachSubscribeButton(f[g],c,d[e]):"contribution"===e&&this.attachContributeBu
tton(f[g],
c,d[e])})}attachSmartButton(a,b,c,d){c=Cc(this,b,1007,c,d);b.classList.add("swg-
smart-button");return(new Ac(a,b,c.options,c.clickFun)).start()}};function Q(a,b,c)
{a.C[b]&&n("[swg.js]: You have registered multiple callbacks for the same
response.");a.C[b]=c;b in a.N&&Gc(a,b,c,a.N[b])}function R(a,b,c){a.N[b]=c;const
d=a.C[b];d&&Gc(a,b,d,c);return!!d}function Gc(a,b,c,d)
{Promise.resolve().then(()=>{c(d);b in a.N&&delete a.N[b]})}
class Hc{constructor(){this.C={};this.N={};this.
$d=null}setOnEntitlementsResponse(a){Q(this,1,a)}triggerEntitlementsResponse(a)
{return R(this,1,a.then(b=>b.clone()))}hasEntitlementsResponsePending(){return!!
this.N[1]}setOnLoginRequest(a){Q(this,4,a)}triggerLoginRequest(a){return
R(this,4,a)}setOnLinkProgress(a){Q(this,5,a)}triggerLinkProgress(){return
R(this,5,!0)}resetLinkProgress(){5 in this.N&&delete this.N[5]}setOnLinkComplete(a)
{Q(this,6,a)}triggerLinkComplete(){return R(this,6,!0)}hasLinkCompletePending()
{return!!this.N[6]}setOnSubscribeRequest(a){Q(this,
2,a)}triggerSubscribeRequest(){return R(this,2,!0)}hasSubscribeRequestCallback()
{return!!this.C[2]}setOnSubscribeResponse(a){n("[swg.js:setOnSubscribeResponse]:
This method has been deprecated, please switch usages to
'setOnPaymentResponse'");Q(this,3,a)}setOnContributionResponse(a)
{n("[swg.js:setOnContributionResponse]: This method has been deprecated, please
switch usages to 'setOnPaymentResponse'");Q(this,3,a)}setOnPaymentResponse(a)
{Q(this,3,a)}triggerPaymentResponse(a){this.$d=a.then(b=>{R(this,
3,Promise.resolve(b.clone()))},b=>{if(!u(b))throw b;});return!!
this.C[3]}hasPaymentResponsePending(){return!!this.N[3]}setOnFlowStarted(a)
{Q(this,7,a)}triggerFlowStarted(a,b={}){return R(this,7,
{flow:a,data:b})}setOnFlowCanceled(a){Q(this,8,a)}triggerFlowCanceled(a,b={})
{return R(this,8,{flow:a,data:b})}};class Ic{constructor(a,b)
{this.displayName=a;this.avatarUrl=b}};class Jc{constructor(a,b,c,d,e)
{this.maxImpressionsPerWeek=a;this.clientDisplayTrigger=new
Kc(b);this.explicitDismissalConfig=new Lc(c,d,e)}}class Kc{constructor(a)
{this.displayDelaySeconds=a}}class Lc{constructor(a,b,c)
{this.backoffSeconds=a;this.maxDismissalsPerWeek=b;this.maxDismissalsResultingHideS
econds=c}}class Mc{constructor(a,b)
{this.canDisplayAutoPrompt=a;this.canDisplayButton=b}};class
Nc{constructor({attributionParams:a,autoPromptConfig:b,paySwgVersion:c,uiPredicates
:d,usePrefixedHostPath:e,useUpdatedOfferFlows:f,skipAccountCreationScreen:g}={})
{this.autoPromptConfig=b;this.paySwgVersion=c;this.usePrefixedHostPath=e||!
1;this.useUpdatedOfferFlows=f||!1;this.skipAccountCreationScreen=g||!
1;this.uiPredicates=d;this.attributionParams=a}};function Oc(a,b){const
c=b.paySwgVersion,d=b.autoPromptConfig;let e=void 0;if(d){var f;let m,p,v;e=new
Jc(d.maxImpressionsPerWeek,null==(f=d.clientDisplayTrigger)?void
0:f.displayDelaySeconds,null==(m=d.explicitDismissalConfig)?void
0:m.backoffSeconds,null==(p=d.explicitDismissalConfig)?void
0:p.maxDismissalsPerWeek,null==(v=d.explicitDismissalConfig)?void
0:v.maxDismissalsResultingHideSeconds)}const g=b.uiPredicates;f=void 0;g&&(f=new
Mc(g.canDisplayAutoPrompt,g.canDisplayButton));const h=b.attributionParams;
let k;h&&(k=new Ic(h.displayName,h.avatarUrl));return new
Nc({autoPromptConfig:e,paySwgVersion:c,usePrefixedHostPath:b.usePrefixedHostPath,us
eUpdatedOfferFlows:b.useUpdatedOfferFlows,skipAccountCreationScreen:a.ya.skipAccoun
tCreationScreen,uiPredicates:f,attributionParams:k})}
class Pc{constructor(a,b)
{this.ya={};this.L=a;this.G=b;this.M=null}fetchClientConfig(){if(!this.L)throw
Error("fetchClientConfig requires publicationId");this.M||(this.M=this.qa());return
this.M}getClientConfig(){return this.M||Promise.resolve(new
Nc)}getAutoPromptConfig(){this.M||this.fetchClientConfig();return
this.M.then(a=>a.autoPromptConfig)}getLanguage(){return
this.ya.lang||"en"}getTheme(){return
this.ya.theme||"light"}shouldForceLangInIframes(){return!!
this.ya.forceLangInIframes&&!!this.ya.lang}shouldEnableButton()
{if(this.ya.disableButton)return Promise.resolve(!1);
this.M||this.fetchClientConfig();return this.M.then(a=>{let
b;return(null==(b=a.uiPredicates)?0:b.canDisplayButton)?!0:!1})}qa(){const
a=H("/publication/"+encodeURIComponent(this.L)+"/clientconfiguration");return
this.G.fetchCredentialedJson(a).then(b=>{b.errorMessages&&0<b.errorMessages.length&
&b.errorMessages.forEach(c=>{n("SwG ClientConfigManager: "+c)});return
Oc(this,b)})}};class Qc{constructor(a,b)
{this.h=a;this.B=b;this.g=a.win();this.D=a.clientConfigManager();this.m=a.activitie
s();this.o=a.dialogManager();this.l=null;let c;const d=null!=(c=null==b?void
0:b.isClosable)?c:!0;this.X=this.D.getClientConfig().then(e=>this.Ic(e)?new
y(this.g,this.m,this.Vb(e),J({productId:a.pageConfig().getProductId(),publicationId
:a.pageConfig().getPublicationId(),productType:"UI_CONTRIBUTION",list:b&&b.list||"d
efault",skus:b&&b.skus||null,isClosable:d,supportsEventManager:!0}),!0):null)}Oa(a)
{a.getSubscriberOrMember()&&
this.h.callbacks().triggerLoginRequest({linkRequested:!!
a.getLinkRequested()})}wb(a){const b=a.getSku(),c=a.getOneTime();if(b){const
d={skuId:b};c&&(d.oneTime=c);(new L(this.h,d,"UI_CONTRIBUTION")).start()}}start()
{return this.X.then(a=>{if(!a)return
Promise.resolve();this.h.callbacks().triggerFlowStarted("showContributionOptions");
a.onCancel(()=>{this.h.callbacks().triggerFlowCanceled("showContributionOptions")})
;a.on(ib,this.Oa.bind(this));a.on(vb,this.wb.bind(this));this.l=a;return
this.o.openView(this.l)})}Ic(a){let b;
return!1!==(null==(b=a.uiPredicates)?void 0:b.canDisplayAutoPrompt)}Vb(a){return
a.useUpdatedOfferFlows?this.D.shouldForceLangInIframes()?
I("/contributionoffersiframe",
{hl:this.D.getLanguage()}):I("/contributionoffersiframe"):I("/contributionsiframe")
}showNoEntitlementFoundToast(){this.l&&this.l.execute(new qb)}};function Rc(a,b)
{a.h.entitlementsManager().blockNextNotification();const c=b.entitlements;var
d=b.idToken;const
e=b.productType,f=a.h.entitlementsManager().parseEntitlements({signedEntitlements:c
});d=new Jb(d,(new Fb).decode(d));b=b.purchaseDataList?
b.purchaseDataList.map(k=>new Lb(k.data,k.signature)):[new
Lb(b.purchaseData.data,b.purchaseData.signature)];const g=new dc(a.h);var
h=g.complete.bind(g);h=new Mb(f,d,b,h);a.h.eventManager().logSwgEvent(1010,!
0);g.start(new Kb("",b[0],d,f,e,()=>Promise.resolve()));
return h}
class Sc{constructor(a,b)
{this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.fa=thi
s.l=null;this.B=Object.assign({entitlements:null,consent:!0},b||{})}start(){const
a=this.B.entitlements;if(!a||!a.getEntitlementForSource("google"))throw Error('No
entitlements with "google"
source');this.h.callbacks().triggerFlowStarted("completeDeferredAccountCreation");t
his.l=new
y(this.g,this.m,I("/recoveriframe"),J({publicationId:this.h.pageConfig().getPublica
tionId(),productId:this.h.pageConfig().getProductId(),entitlements:a&&
a.raw||null,consent:this.B.consent}),!0);this.fa=this.o.openView(this.l);return
this.l.acceptResult().then(b=>Rc(this,b.data),b=>{u(b)?
this.h.callbacks().triggerFlowCanceled("completeDeferredAccountCreation"):this.o.co
mpleteView(this.l);throw b;})}};const
Tc={frameborder:0,scrolling:"no",src:"about:blank"};
class Uc{constructor(a,b={}){const
c=Object.assign({},Tc,b);this.s=t(a,"iframe",c);r(this.s,ra);this.tb=new
Promise(d=>{this.s.onload=d})}whenReady(){return this.tb}getElement(){return
this.s}getDocument(){const a=this.getElement().contentDocument||
this.getElement().contentWindow&&this.getElement().contentWindow.document;if(!
a)throw Error("not loaded");return a}getBody(){return
this.getDocument().body}isConnected(){var a=this.getElement();if("isConnected"in
a)a=a.isConnected;else{var b=a.ownerDocument&&
a.ownerDocument.documentElement;a=b&&b.contains(a)||!1}return a}};function S(a,b,c)
{const d=a.ownerDocument.defaultView,e=a.style.transition||"";return(new
Promise(f=>{d.setTimeout(()=>{d.setTimeout(f,c);const g=`${c}ms ${"ease-
out"}`;r(a,Object.assign({transition:`transform ${g}, opacity $
{g}`},b))})})).then(()=>{r(a,{transition:e})})};class Vc{constructor(a,b)
{this.j=a;this.W=this.j.getWin().document.createElement("swg-popup-
background");r(this.W,{"z-index":b,display:"none","pointer-
events":"none",position:"fixed",top:0,right:0,bottom:0,left:0,"background-
color":"rgba(32, 33, 36, .6)"})}getElement(){return this.W}isAttached(){return!!
this.W.parentNode}attach(){this.j.getBody().appendChild(this.W)}destroy()
{this.j.getBody().removeChild(this.W)}show(a=!0){r(this.W,
{display:"block",opacity:a?0:1});if(a)return S(this.W,{opacity:1},
300)}hide(a=!0){if(a)return S(this.W,{opacity:0},300).then(()=>{r(this.W,
{display:"none"})});r(this.W,{display:"none"})}};function Wc(a){const
b=a.nd,c=t(a.j,"swg-loading-animate",{});b.appendChild(c);const d=t(a.j,"swg-
loading-image",{});c.appendChild(d)}
class Xc{constructor(a,b={}){this.j=a;this.Ca=t(this.j,"swg-loading-container",
{});b.additionalClasses&&b.additionalClasses.forEach(c=>{this.Ca.classList.add(c)})
;this.nd=t(this.j,"swg-loading",
{});this.Ca.appendChild(this.nd);this.Ca.style.setProperty("display","none","import
ant");Wc(this)}getElement(){return this.Ca}show()
{this.Ca.style.removeProperty("display")}hide()
{this.Ca.style.setProperty("display","none","important")}};function Yc(a){const
b=a.readyState;return"loading"!=b&&"uninitialized"!=b}function Zc(a,b)
{if(Yc(a))b(a);else{var c=!1,d=()=>{Yc(a)&&!c&&(b(a),c=!
0,a.removeEventListener("readystatechange",d))};a.addEventListener("readystatechang
e",d)}}function $c(a){return new Promise(b=>{Zc(a,b)})};class ad{constructor(a)
{const b=!!a.document;this.g=b?a:a.defaultView;this.j=b?a.document:a}getWin()
{return this.g}getRootNode(){return this.j}getRootElement(){return
this.j.documentElement}getHead(){return this.j.head}getBody(){return
this.j.body}isReady(){return Yc(this.j)}whenReady(){return
$c(this.j)}addToFixedLayer(){return Promise.resolve()}}function bd(a){return
9===a.nodeType||a.document?new ad(a):a};const cd={"min-
height":"50px",border:"none",display:"block",position:"fixed","z-
index":2147483647,"box-sizing":"border-
box"},dd={position:"absolute",top:"0",left:"0",right:"0",bottom:"0",opacity:0,heigh
t:0,"max-height":"100%","max-width":"100%","min-height":"100%","min-
width":"100%",width:0};
function ed(a){a.la(()=>{r(a.getElement(),
{transform:"translateY(100%)",opactiy:1,visibility:"visible"});return
S(a.getElement(),
{transform:T(a),opacity:1,visibility:"visible"},300).then(()=>{a.getElement().focus
()})});a.hb=!1}
function fd(a){const
b=a.s.getBody(),c=a.s.getDocument();wa(bd(c),"body{margin:0;padding:0}swg-
container,swg-loading,swg-loading-animate,swg-loading-image{display:block}swg-
loading-container{-ms-flex-align:center!important;-ms-flex-pack:center!
important;align-items:center!important;bottom:0!important;display:-ms-flexbox!
important;display:flex!important;height:100%!important;justify-content:center!
important;margin-top:5px!important;min-height:148px!important;width:100%!
important;z-index:2147483647!important}@media (min-height:630px),(min-width:630px)
{swg-loading-container{background-color:#fff!important;border-top-left-radius:8px!
important;border-top-right-radius:8px!important;box-shadow:0 1px 1px
rgba(60,64,67,.3),0 1px 4px 1px rgba(60,64,67,.15)!important;margin-left:auto!
important;margin-right:auto!important;width:560px!important}swg-loading-
container.centered-on-desktop{border-radius:8px!important;height:120px!
important;min-height:120px!important}}swg-loading{animation:mspin-rotate 1568.63ms
linear infinite;height:36px;overflow:hidden;width:36px;z-index:2147483647!
important}swg-loading-animate{animation:mspin-revrot 5332ms steps(4) infinite}swg-
loading-image{animation:swg-loading-film 5332ms steps(324) infinite;background-
image:url(https://news.google.com/swg/js/v1/loader.svg);background-
size:100%;height:36px;width:11664px}@keyframes swg-loading-film{0%
{transform:translateX(0)}to{transform:translateX(-11664px)}}@keyframes mspin-
rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes mspin-
revrot{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}\n/*#
sourceURL=/./src/ui/ui.css*/\n");const d=
[];a.isPositionCenterOnDesktop()&&d.push("centered-on-desktop");a.Qa=new Xc(c,
{additionalClasses:d});b.appendChild(a.Qa.getElement());a.fb=t(c,"swg-container",
{});b.appendChild(a.fb);gd(a);a.tc&&(a.gb=()=>{gd(a)},a.Nb.addListener(a.gb))}funct
ion gd(a){var b=a.getElement();a=U(a)?{top:"50%",bottom:0,transform:T(a)}:
{top:"auto",bottom:0,transform:T(a)};r(b,a)}function U(a){return
a.tc&&a.Nb.matches}function hd(a)
{a.j.getRootElement().style.removeProperty("padding-bottom")}
function T(a){return U(a)?"translateY(-50%)":"translateY(0px)"}
class id{constructor(a,b={}){this.j=a;const c=b.desktopConfig||{},d=`swg-dialog $
{c.supportsWideScreen?"swg-wide-dialog":""}`,e=b.iframeCssClassOverride||
d;this.s=new Uc(a.getWin().document,{"class":e});this.da=new Vc(a,2147483646);const
f=Object.assign({},cd,{});r(this.s.getElement(),f);ua(this.s.getElement(),
{});this.ma=this.Fa=this.fb=this.Qa=null;this.bd=0;this.hb=!
1;this.pb=null;this.od=void 0!==b.maxAllowedHeightRatio?
b.maxAllowedHeightRatio:.9;this.tc=!!
c.isCenterPositioned;this.Nb=this.j.getWin().matchMedia("(min-width: 641px)");
this.gb=null}open(a=!1){const b=this.s;if(b.isConnected())throw Error("already
opened");this.j.getBody().appendChild(b.getElement());this.da.attach();a?
(r(b.getElement(),{visibility:"hidden",opacity:0}),this.hb=a):ed(this);return
b.whenReady().then(()=>{fd(this);return this})}openInContainer(a){const
b=this.s;if(b.isConnected())throw Error("already
opened");a.appendChild(b.getElement());return
b.whenReady().then(()=>{fd(this);return this})}close(a=!0){let b;if(a){const
c=U(this)?{opacity:0}:{transform:"translateY(100%)"};
b=this.la(()=>{this.da.hide(!0);return S(this.getElement(),c,300)})}else
b=Promise.resolve();return b.then(()=>{const
c=this.s.getElement();c.parentNode.removeChild(c);hd(this);this.da.destroy();this.g
b&&this.Nb.removeListener(this.gb)})}getContainer(){if(!this.fb)throw Error("not
opened yet");return this.fb}getIframe(){return this.s}getElement(){return
this.s.getElement()}getLoadingView(){return this.Qa}getMaxAllowedHeightRatio()
{return this.od}isPositionCenterOnDesktop(){return this.tc}getCurrentView(){return
this.Fa}openView(a){r(a.getElement(),
dd);this.Fa&&this.Fa.hasLoadingIndicator()?this.pb=this.Fa:
(this.getContainer().textContent="",this.Qa.show());this.Fa=a;this.getContainer().a
ppendChild(a.getElement());a.shouldFadeBody()&&!this.hb&&this.da.show(!0);return
a.init(this).then(()=>{r(a.getElement(),
{opacity:1});this.hb&&(a.shouldFadeBody()&&this.da.show(!0),ed(this));if(this.pb)
{var
b=this.pb.getElement();b.parentElement&&b.parentElement.removeChild(b);this.pb=null
}else this.Qa.hide()})}resizeView(a,b,c=!0){if(this.Fa!=a)return null;
const d=Math.min(b,this.j.getWin().innerHeight*this.od),e=++this.bd,f=()=>e!
==this.bd;if(c){const g=this.getElement().offsetHeight;c=d>=g?
this.la(()=>{if(f())return Promise.resolve();const h={height:`${d}px`};U(this)||
(h.transform=`translateY(${d-g}px)`);r(this.getElement(),h);return
S(this.getElement(),{transform:T(this)},300)}):this.la(()=>(f()?
Promise.resolve():S(this.getElement(),{transform:U(this)?T(this):`translateY(${g-
d}px)`},300)).then(()=>{f()||r(this.getElement(),{height:`$
{d}px`,transform:T(this)})}))}else r(this.getElement(),
{height:`${d}px`}),c=Promise.resolve();return c.then(()=>{if(!f())
{if(U(this))hd(this);else{var g=b+20,h=this.j.getRootElement();r(h,{"padding-
bottom":`${g}px`})}a.resized()}})}la(a){return this.ma=(this.ma||
Promise.resolve()).then(()=>a(),()=>{}).then(()=>{this.ma=null})}};class
jd{constructor(a){this.j=a;this.fa=this.ca=null;this.ua=new
Vc(a,2147483647);this.mb=null;this.ua.getElement().addEventListener("click",
()=>{if(this.mb)try{this.mb.focus()}catch(b){}})}openDialog(a=!1,b={}){this.fa||
(this.ca=new id(this.j,b),this.fa=this.ca.open(a));return this.fa}openView(a,b=!
1,c={}){this.handleCancellations(a);return
this.openDialog(b,c).then(d=>d.openView(a))}handleCancellations(a){return
a.whenComplete().catch(b=>{u(b)&&this.completeView(a);throw b;})}completeView(a)
{setTimeout(()=>
{this.ca&&this.ca.getCurrentView()==a&&this.za()},100)}completeAll()
{this.ca&&this.za();this.ua.isAttached()&&this.ua.destroy()}getDialog(){return
this.ca}za(){this.ca.close();this.fa=this.ca=null}popupOpened(a){this.mb=a||
null;this.ua.isAttached()||this.ua.attach();this.ua.show()}popupClosed()
{this.mb=null;try{this.ua.hide()}catch(a){}}};function kd(a){const
b=a.g.matchMedia("(max-width: 640px), (max-height:
640px)"),c=a.o.getDialog().getElement();b.matches&&r(c,{"box-shadow":"rgba(60, 64,
67, 0.3) 0px -2px 5px, rgba(60, 64, 67, 0.15) 0px -5px
5px"});b.addListener(d=>{d.matches?r(c,{"box-shadow":"rgba(60, 64, 67, 0.3) 0px
-2px 5px, rgba(60, 64, 67, 0.15) 0px -5px 5px"}):r(c,{"box-shadow":""})})}
function ld(a){a.g.matchMedia("(min-width: 640px) and (min-height:
640px)").matches&&(a=a.o.getDialog().getLoadingView().getElement(),r(a,
{width:"420px",margin:"auto"}))}function md(a){return!!
a.g.navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i)}
class nd{constructor(a)
{this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();const
b=this.m.addDefaultArguments({isClosable:!
0,hasSubscriptionCallback:a.callbacks().hasSubscribeRequestCallback()});this.l=new
y(this.g,this.m,I("/metertoastiframe"),b,!1);this.Sa=null;this.Ra=!
1;this.va=()=>{const c=new yb;c.setClose(!
0);this.l.execute(c);this.removeCloseEventListener();this.h.eventManager().logSwgEv
ent(1027,!0);this.Sa&&!this.Ra&&(this.Ra=!0,this.Sa())};this.Ec=null}start()
{this.h.callbacks().triggerFlowStarted("showMeterToast");
this.l.on(zb,this.Lc.bind(this));this.h.callbacks().hasSubscribeRequestCallback()||
n("[swg.js]: `setOnNativeSubscribeRequest` has not been set before starting the
metering flow, so users will not be able to subscribe from the metering dialog
directly. Please call `setOnNativeSubscribeRequest` with a subscription flow
callback before starting
metering.");this.o.handleCancellations(this.l).catch(a=>{this.Sa&&!
this.Ra&&(this.Ra=!0,this.Sa());if(!u(a))throw console.error("[swg.js]: Error
occurred during meter toast handling: "+
a),a;});return this.o.openDialog().then(a=>{kd(this);ld(this);return
a.openView(this.l).then(()=>{this.g.addEventListener("click",this.va);this.g.addEve
ntListener("touchstart",this.va);this.g.addEventListener("mousedown",this.va);if(md
(this))ta(this.g.document.body,"overflow","hidden");else{let b,c;this.Ec=()=>{b=b||
this.g.pageYOffset;this.g.clearTimeout(c);c=this.g.setTimeout(()=>{100<Math.abs(thi
s.g.pageYOffset-
b)&&this.va()},100)};this.g.addEventListener("scroll",this.Ec)}this.h.eventManager(
).logSwgEvent(21);
this.h.eventManager().logSwgEvent(3011)})})}setOnConsumeCallback(a)
{this.Sa=a}removeCloseEventListener()
{this.g.removeEventListener("click",this.va);this.g.removeEventListener("touchstart
",this.va);this.g.removeEventListener("mousedown",this.va);md(this)?
ta(this.g.document.body,"overflow","visible"):this.g.removeEventListener("scroll",t
his.Ec)}Lc(a){a.getNative()&&(this.removeCloseEventListener(),this.Ra=!
0,this.h.callbacks().triggerSubscribeRequest())}};const
od={height:0},pd={frameborder:"0",scrolling:"no","class":"swg-toast"};function
qd(a){return
a.m.openIframe(a.s,a.Xa,a.U).then(b=>b.whenReady()).then(()=>{va(a.s);a.la(()=>{r(a
.s,{transform:"translateY(100%)",opactiy:1,visibility:"visible"});return S(a.s,
{transform:"translateY(0)",opacity:1,visibility:"visible"},400)});a.j.getWin().setT
imeout(()=>{a.close()},8E3)})}
class rd{constructor(a,b,c)
{this.j=a.doc();this.m=a.activities();this.Xa=b;this.U=c||
{};this.ma=null;this.s=t(this.j.getWin().document,"iframe",pd);r(this.s,od);this.tb
=new Promise(d=>{this.s.onload=d})}getElement(){return this.s}open()
{this.j.getBody().appendChild(this.s);return qd(this)}la(a){return
this.ma=(this.ma||
Promise.resolve()).then(()=>a()).catch(()=>{}).then(()=>{this.ma=null})}close()
{return
this.la(()=>{this.j.getWin().setTimeout(()=>{this.j.getBody().removeChild(this.s);r
eturn Promise.resolve()},
500);return S(this.s,
{transform:"translateY(100%)",opacity:1,visibility:"visible"},400)})}};const
sd={["paywall"]:1,["ad_shown"]:2,["offers_shown"]:3,
["subscriptions_landing_page"]:1004,["offer_selected"]:1006,
["payment_flow_start"]:1005,["payment_complete"]:1001,["custom"]:3E3},td={[0]:null,
[1]:"paywall",[2]:"ad_shown",[3]:"offers_shown",[4]:null,[5]:null,[1E3]:null,
[1001]:"payment_complete",[1002]:null,[1003]:null,
[1004]:"subscriptions_landing_page",[1005]:"payment_flow_start",
[1006]:"offer_selected",[2E3]:null,
[3E3]:"custom"},ud={["EVENT_SHOWCASE_METER_OFFERED"]:[3010,3011],
["EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION"]:[3007],
["EVENT_SHOWCASE_UNLOCKED_BY_METER"]:[3010,3008],
["EVENT_SHOWCASE_UNLOCKED_FREE_PAGE"]:[3012],
["EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL"]:[3009,22,23],
["EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL"]:[3009,1],
["EVENT_SHOWCASE_INELIGIBLE_PAYWALL"]:[3013,3009]},vd={[22]:2001,[3008]:1003,
[3007]:1001,[3012]:1002,[1]:2002,[3013]:2003},wd={[3]:{eventCategory:"NTG
paywall",eventAction:"paywall modal impression",eventLabel:"",nonInteraction:!0},
[26]:{eventCategory:"NTG membership",eventAction:"offer impressions",
eventLabel:"",nonInteraction:!0},[1006]:{eventCategory:"NTG
paywall",eventAction:"click",eventLabel:"",nonInteraction:!1},[1030]:
{eventCategory:"NTG subscription",eventAction:"marketing modal
click",eventLabel:"",nonInteraction:!1},[24]:{eventCategory:"NTG
subscription",eventAction:"marketing modal
impression",eventLabel:"",nonInteraction:!0},[1031]:{eventCategory:"NTG
membership",eventAction:"marketing modal click",eventLabel:"",nonInteraction:!1},
[25]:{eventCategory:"NTG membership",eventAction:"membership modal impression",
eventLabel:"",nonInteraction:!0}},xd={[1001]:{eventCategory:"NTG
subscription",eventAction:"submit",eventLabel:"success",nonInteraction:!
1}},yd={[1001]:{eventCategory:"NTG
membership",eventAction:"submit",eventLabel:"success",nonInteraction:!1}};function
zd(a,b=!1){a=E(a);if(!(a.gaa_at&&a.gaa_n&&a.gaa_sig&&a.gaa_ts)||!
b&&"na"===a.gaa_at)return!1;const c=parseInt(a.gaa_ts,16),d=Date.now()/1E3;return
c<d?!1:!0};function Ad(a,b){return Bd(a,b).then(c=>{var d=a.ab;a.ab=!1;const
e=a.Eb;a.Eb=!1;d||(a.h.callbacks().triggerEntitlementsResponse(Promise.resolve(c)),
(d=c.getEntitlementForThis())?e||Cd(a,d):a.h.eventManager().logSwgEvent(3009,!
1));return c})}function Dd(a,b,c,d,e){try{const f=a.ld.decode(b);if(c){const
h=Date.now();if(1E3*parseFloat(f.exp)<h)return null}const g=f.entitlements;return
g&&Ed(a,b,g,d,e)||null}catch(f){a.g.setTimeout(()=>{throw f;})}return null}
function Fd(a){return E(a.g.location.search).gaa_n}
function Gd(a,b,c,d,e="",f=null){const g=new
pb;g.setUsedEntitlement(b);g.setClientEventTime(sc());g.setEntitlementResult(c);g.s
etEntitlementSource(d);g.setToken(e);"boolean"===typeof
f&&g.setIsUserRegistered(f);let h="/publication/"+encodeURIComponent(a.L)
+"/entitlements";h=Hd(a.g.location,h);a.entitlementsPostPromise=(a.Ma?
Promise.resolve():oa(Tb(a.h.doc())).then(k=>{a.Ma=ma(ka(JSON.stringify({metering:
{resource:
{hashedCanonicalUrl:k}}})))})).then(()=>{h=F(h,"encodedParams",a.Ma);return
a.G.sendPost(H(h),
g)})}function Bd(a,b){return
Promise.all([a.H.get("ents"),a.H.get("isreadytopay")]).then(c=>{const
d=c[0],e=c[1],f=!(!b||!b.encryption);if(d&&!f){a:{switch(e){case "true":var g=!
0;break a;case "false":g=!1;break a}g=void 0}const h=Dd(a,d,!
0,g);if(h&&h.enablesThis())return a.Da=0,h}return
Id(a,b).then(h=>{h&&h.enablesThisWithCacheableEntitlements()&&h.raw&&a.H.set("ents"
,h.raw);return h})})}
function Id(a,b){let c=a.Da;a.Da=0;const d=()=>{c--;return
a.qa(b).then(e=>e.enablesThis()||0>=c?e:new
Promise(f=>{a.g.setTimeout(()=>{f(d())},550)}))};return d()}function Ed(a,b,c,d,e)
{return new
Gb("subscribe.google.com",b,Hb(c),a.R.getProductId(),a.Ad.bind(a),a.Hd.bind(a),d,e)
}
function Cd(a,b)
{if("google:metering"===b.source)a.h.eventManager().logSwgEvent(3010,!
1),Promise.resolve();else{var c=new z;c.setIsUserRegistered(!0);var
d="privileged"===b.source?3014:3007;a.h.eventManager().logSwgEvent(d,!
1,c);a.H.get("toast").then(e=>{if("1"!==e)return e=b.source||"google:metering",(new
rd(a.h,I("/toastiframe"),J({publicationId:a.L,source:e}))).open()})}}
function Jd(a,b)
{if((b=b.getEntitlementForThis())&&"google:metering"===b.source)try{const
c=a.ld.decode(b.subscriptionToken);return c.metering&&c.metering.showToast}catch(c)
{}}
class Kd{constructor(a,b,c,d)
{this.g=a;this.R=b;this.L=this.R.getPublicationId();this.G=c;this.h=d;this.ld=new
Fb;this.M=null;this.Da=0;this.Eb=this.ab=!
1;this.Ma=null;this.H=d.storage();this.Y=d.analytics();this.V=d.config();this.entit
lementsPostPromise=null;this.h.eventManager().registerEventListener(this.ae.bind(th
is))}reset(a){this.M=null;this.Da=Math.max(this.Da,a?
3:0);a&&(this.H.remove("ents"),this.H.remove("isreadytopay"))}clear()
{this.M=null;this.Da=0;this.unblockNextNotification();this.H.remove("ents");
this.H.remove("toast");this.H.remove("isreadytopay")}getEntitlements(a)
{"string"===typeof a&&(1600289016959<Date.now()&&n("[swg.js:getEntitlements]: If
present, the first param of getEntitlements() should be an object of type
GetEntitlementsParamsExternalDef."),a={encryption:
{encryptedDocumentKey:a}});this.M||(this.M=Ad(this,a));return this.M.then(b=>{null!
=b.isReadyToPay&&this.Y.setReadyToPay(b.isReadyToPay);return
b})}pushNextEntitlements(a,b){return(b=Dd(this,a,!0,b))&&b.enablesThis()?
(this.H.set("ents",
a),!0):!1}ae(a){if(zd(this.g.location.search,!0)){var b=vd[a.eventType];if(b)
{switch(a.eventOriginator){case 6:var c=3001;break;case
1:if(1003==b)return;c=1001;break;default:return}var d=Fd(this),e,f,g=null==a?void
0:null==(e=a.additionalParameters)?void 0:null==(f=e.getIsUserRegistered)?void
0:f.call(e);Gd(this,new ob,b,c,d,g)}}}setToastShown(a)
{this.H.set("toast",a?"1":"0")}blockNextNotification(){this.ab=!0}blockNextToast()
{this.Eb=!0}unblockNextNotification(){this.ab=!1}parseEntitlements(a){const b=
a.isReadyToPay;null==b?
this.H.remove("isreadytopay"):this.H.set("isreadytopay",String(b));const
c=a.signedEntitlements,d=a.decryptedDocumentKey,e=a.swgUserToken;if(c)
{if(a=Dd(this,c,!1,b,d))return e&&this.H.set("USER_TOKEN",e,!0),a}else{const
f=a.entitlements;if(f)return e&&this.H.set("USER_TOKEN",e,!
0),Ed(this,"",f,b,d)}return Ed(this,"",[],b)}Ad(a)
{a.getEntitlementForThis()&&this.setToastShown(!0)}Hd(a,b)
{if(a.enablesThisWithGoogleMetering()){const c=()=>{b&&b();{const
g=a.getEntitlementForThis();
if(g&&"google:metering"===g.source&&zd(this.g.location.search))
{this.h.eventManager().logSwgEvent(3008,!1);var e=Fd(this),f=new
ob;f.setSource(g.source);f.setJwt(g.subscriptionToken);Gd(this,f,1003,2001,e)}}};if
(!1===Jd(this,a))return c();const d=new nd(this.h);d.setOnConsumeCallback(c);return
d.start()}}qa(a){let b;const c=null==a?void 0:null==(b=a.encryption)?void
0:b.swgUserToken,d=c?Promise.resolve(c):this.H.get("USER_TOKEN",!0);let
e="/publication/"+encodeURIComponent(this.L)+"/entitlements";
return Promise.all([oa(Tb(this.h.doc())),d]).then(f=>{const
g=f[0];f=f[1];e=Hd(this.g.location,e);if(null==a?
0:a.encryption)e=F(e,"crypt",a.encryption.encryptedDocumentKey);f&&(e=F(e,"sut",f))
;let h;if(this.L&&(null==a?0:null==(h=a.metering)?
0:h.state)&&zd(this.g.location.search)){const
k=a.metering.state.id;if("string"===typeof k&&0<k.length){const m={metering:
{clientTypes:[1],owner:this.L,resource:{hashedCanonicalUrl:g},state:
{id:k,attributes:[]},token:Fd(this)}};function p({attributes:v,category:x}){v&&
Object.keys(v).forEach(D=>{const A=`${x}_$
{D}`,C=Number(v[D].timestamp),Ge=C>Date.now()/1E3*2;C&&!Ge||n(`SwG Entitlements:
Please specify a Unix timestamp, in seconds, for the "${D}" ${x} attribute. The
timestamp you passed (${v[D].timestamp}) looks
invalid.`);m.metering.state.attributes.push({name:A,timestamp:C})})}p({attributes:a
.metering.state.standardAttributes,category:"standard"});p({attributes:a.metering.s
tate.customAttributes,category:"custom"});this.Ma=ma(ka(JSON.stringify(m)));e=F(e,"
encodedParams",
this.Ma)}else n("SwG Entitlements: Please specify a metering state ID string,
ideally a hash to avoid PII.")}return
H(e)}).then(f=>{this.h.eventManager().logSwgEvent(1024,!1);return
this.G.fetchCredentialedJson(f)}).then(f=>{f.errorMessages&&0<f.errorMessages.lengt
h&&f.errorMessages.forEach(g=>{n("SwG Entitlements: "+g)});return
this.parseEntitlements(f)})}}function Hd(a,b){const c=E(a.hash)
["swg.deventitlement"];return void 0===c?b:F(b,"devEnt",c)};const
Ld=["GET","POST"],Md={document:1,text:2};
class Nd{constructor(a){this.win=a}qa(a,b){q("string"==typeof a,"Only URL
supported: %s",a);const c=b.credentials;q(void 0===c||"include"==c||"omit"==c,"Only
credentials=include|omit support: %s",c);return"document"==b.responseType?Od(a,b):
(this.win.fetch||Od).apply(null,arguments)}fetch(a,b){b=Pd(b);return
this.qa(a,b).catch(c=>{const d=B(a).origin;throw Error(`XHR Failed fetching ($
{d}/...): (Note: a CORS error above may indicate that this publisher or domain is
not configured in Publisher Center. The CORS error happens becasue 4xx responses do
not set CORS headers.)`,c&&
c.message);}).then(c=>Qd(c))}}function Pd(a){var b=a=a||{};var c=a.method;void
0===c?c="GET":(c=c.toUpperCase(),q(Ld.includes(c),"Only one of %s is currently
allowed. Got %s",Ld.join(", "),c));b.method=c;a.headers=a.headers||{};return a}
function Od(a,b){return new Promise(function(c,d){const
e=Rd(b.method||"GET",a);"include"==b.credentials&&(e.withCredentials=!
0);b.responseType in
Md&&(e.responseType=b.responseType);b.headers&&Object.keys(b.headers).forEach(funct
ion(f)
{e.setRequestHeader(f,b.headers[f])});e.onreadystatechange=()=>{2>e.readyState||
(100>e.status||599<e.status?(e.onreadystatechange=null,d(Error(`Unknown HTTP status
${e.status}`))):4==e.readyState&&c(new Sd(e)))};e.onerror=()=>{d(Error("Network
failure"))};e.onabort=
()=>{d(Error("Request aborted"))};"POST"==b.method?
e.send(b.body):e.send()})}function Rd(a,b){const c=new
XMLHttpRequest;if("withCredentials"in c)c.open(a,b,!0);else throw Error("CORS is
not supported");return c}function Qd(a){return new Promise(b=>{if(a.ok)return
b(a);b=a.status;const c=Error(`HTTP error ${b}`);c.retriable=415==b||
500<=b&&600>b;c.response=a;throw c;})}function Td(a){q(!a.bodyUsed,"Body already
used");a.bodyUsed=!0;return Promise.resolve(a.ka.responseText)}
class Sd{constructor(a)
{this.ka=a;this.status=this.ka.status;this.ok=200<=this.status&&300>this.status;thi
s.headers=new Ud(a);this.bodyUsed=!1;this.body=null}clone(){q(!this.bodyUsed,"Body
already used");return new Sd(this.ka)}text(){return Td(this)}json(){return
Td(this).then(Bb)}arrayBuffer(){return Td(this).then(ka)}}class Ud{constructor(a)
{this.ka=a}get(a){return this.ka.getResponseHeader(a)}has(a){return null!
=this.ka.getResponseHeader(a)}};class Vd{constructor(a){this.ka=new
Nd(a)}fetchCredentialedJson(a){return this.fetch(a,{method:"GET",headers:
{Accept:"text/plain,
application/json"},credentials:"include"}).then(b=>b.text().then(c=>{const
d=c.replace(/^(\)\]\}'\n)/,"");return Bb(d)}))}sendPost(a,b)
{b={method:"POST",headers:{"Content-Type":"application/x-www-form-
urlencoded;charset=UTF-
8"},credentials:"include",body:"f.req="+JSON.stringify(b.toArray(!1))};return
this.fetch(a,b).then(c=>c&&c.json()||{})}fetch(a,b){return this.ka.fetch(a,
b)}sendBeacon(a,b){navigator.sendBeacon?(b=new
Blob(["f.req="+JSON.stringify(b.toArray(!1))],{type:"application/x-www-form-
urlencoded;charset=UTF-8"}),navigator.sendBeacon(a,b)):this.sendPost(a,b)}};class
Wd{constructor(a){this.g=a.win();this.u=a.eventManager()}start()
{this.u.registerEventListener(this.Na.bind(this))}Na(a){if("function"==typeof
this.g.ga){var
b="";a.additionalParameters&&(b=a.additionalParameters.subscriptionFlow||
a.additionalParameters.getSubscriptionFlow());a=a.eventType;let
c=null;b&&("subscribe"==b?c=xd[a]:"contribute"==b&&(c=yd[a]));(b=c||
wd[a])&&this.g.ga("send","event",b)}}};class Xd{constructor(a)
{this.j=a;this.Vd=Promise.resolve()}error(a){const
b=Array.prototype.slice.call(arguments,0);return this.Vd.then(()=>{const
c=Yd.apply(null,b);c.reported||
(this.j.getWin().document.createElement("img").src="https://news.google.com/_/Subsc
ribewithgoogleClientUi/jserror?error="+encodeURIComponent(String(c))
+"&script="+encodeURIComponent("https://news.google.com/swg/js/v1/swg.js")
+"&line="+(c.lineNumber||1)+"&trace="+encodeURIComponent(c.stack),c.reported=!
0)})}}
function Yd(a){var b=null;let c="";for(let e=0;e<arguments.length;e++){var
d=arguments[e];if(d instanceof Error&&!b)a:
{b=d;if((d=Object.getOwnPropertyDescriptor(b,"message"))&&d.writable)break
a;d=b.stack;const f=Error(b.message);for(const g in b)f[g]=b[g];f.stack=d;b=f}else
c&&(c+=" "),c+=d}b?c&&(b.message=c+": "+b.message):b=Error(c);return b};class
Zd{constructor(a)
{this.h=a;this.m=a.activities();this.R=a.pageConfig();this.o=a.dialogManager()}star
t(a={}){this.h.callbacks().triggerFlowStarted("linkAccount");const
b="redirect"==this.h.config().windowOpenMode;a=a.ampReaderId?
J({publicationId:this.R.getPublicationId(),ampReaderId:a.ampReaderId}):J({publicati
onId:this.R.getPublicationId()});const c=this.m.open("swg-
link",I("/linkbackstart"),b?"_top":"_blank",a,
{});this.h.eventManager().logSwgEvent(12);this.o.popupOpened(c&&c.targetWin);return
Promise.resolve()}}
function $d(a){a.activities().onResult("swg-link",function(b)
{a.entitlementsManager().blockNextNotification();a.callbacks().triggerLinkProgress(
);a.dialogManager().popupClosed();return ba(b,B(G().frontEnd).origin,!1,!
1).then(c=>{a.eventManager().logSwgEvent(1011,!0);(new ae(a,c)).start()},c=>{u(c)?
(a.eventManager().logSwgEvent(1012,!
0),a.callbacks().triggerFlowCanceled("linkAccount")):a.eventManager().logSwgEvent(1
011,!0)})})}
class ae{constructor(a,b)
{this.h=a;this.g=a.win();this.D=a.clientConfigManager();this.m=a.activities();this.
o=a.dialogManager();this.$=a.entitlementsManager();this.C=a.callbacks();const
c=b&&b.index||"0";this.l=null;this.X=this.D.getClientConfig().then(d=>new
y(this.g,this.m,I("/linkconfirmiframe",
{},d.usePrefixedHostPath,"u/"+c),J({productId:a.pageConfig().getProductId(),publica
tionId:a.pageConfig().getPublicationId()}),!0));this.ed=null;this.Ed=new
Promise(d=>{this.ed=d})}start(){return this.X.then(a=>
{this.l=a;this.l.acceptResultAndVerify(B(G().frontEnd).origin,!0,!
0).then(b=>{this.P(b)}).catch(b=>{setTimeout(()=>{throw
b;})}).then(()=>{this.o.completeView(this.l)});this.h.eventManager().logSwgEvent(30
05,!0);this.h.eventManager().logSwgEvent(14,!0);return
this.o.openView(this.l)})}P(a){this.h.eventManager().logSwgEvent(1013,!
0);this.C.triggerLinkComplete();this.C.resetLinkProgress();this.$.setToastShown(!
0);this.$.unblockNextNotification();this.$.reset(a&&a.success||!
1);a&&a.entitlements&&this.$.pushNextEntitlements(a.entitlements);
this.ed()}whenComplete(){return this.Ed}}function be(a,b){a.P();let
c,d=null;b.linked?
(a.o.popupClosed(),a.h.callbacks().triggerFlowStarted("linkAccount"),d=new
ae(a.h,b),c=d.start()):c=Promise.reject(ya(a.g,"not linked"));return
c.then(()=>{a.h.callbacks().triggerLinkProgress();return
d.whenComplete()}).then(()=>!0)}
class ce{constructor(a,b)
{this.g=a.win();this.h=a;this.m=a.activities();this.o=a.dialogManager();this.T=b;th
is.l=this.fa=this.yd=null}getRequestPromise(){return this.yd}P()
{this.o.completeView(this.l)}ge(a){a&&a.getRequested()&&(this.yd=(new
Promise(b=>b(this.T()))).then(b=>{const c=new sb;if(b&&b.token){if(b.authCode)throw
Error("Both authCode and token are available");c.setToken(b.token)}else
if(b&&b.authCode)c.setAuthCode(b.authCode);else throw Error("Neither token or
authCode is available");this.l.execute(c);
return b}).catch(b=>{this.P();throw b;}))}start(){const
a=this.m.addDefaultArguments({isClosable:!0});this.l=new
y(this.g,this.m,I("/linksaveiframe"),a,!1,!
0);this.l.on(tb,this.ge.bind(this));this.fa=this.o.openView(this.l,!
0);this.h.eventManager().logSwgEvent(13);return
this.l.acceptResultAndVerify(B(G().frontEnd).origin,!0,!
0).then(b=>be(this,b)).catch(b=>{this.P();if(u(b))return
this.h.eventManager().logSwgEvent(1016,!
0),this.h.callbacks().triggerFlowCanceled("linkAccount"),!1;throw b;})}};class
de{constructor(a){this.u=a.eventManager()}sendSubscriptionState(a,b){if(!
N(Nb,a))throw Error("Invalid subscription state
provided");if(("subscriber"==a||"past_subscriber"==a)&&!b)throw Error("Entitlements
must be provided for users with active or expired subscriptions");if(b&&!M(b))throw
Error("Entitlements must be an Object");let
c=null;b&&(c=JSON.stringify(b));this.u.logEvent({eventType:4E3,eventOriginator:5,is
FromUserAction:null,additionalParameters:{state:a,productsOrSkus:c}})}sendEvent(a)
{let b=
null;if(!N(Ob,a.name)||!sd[a.name])throw Error("Invalid user event
provided("+a.name+")");if(a.data)if(M(a.data))b=Object.assign({},b,a.data);else
throw Error("Event data must be an Object("+a.data+")");if(O(a.active))b||
(b={}),Object.assign(b,{is_active:a.active});else if(null!=a.active)throw
Error("Event active must be a
boolean");this.u.logEvent({eventType:sd[a.name],eventOriginator:5,isFromUserAction:
a.active,additionalParameters:b})}};class ee{constructor(a)
{this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.Ta=nul
l;this.l=new
y(this.g,this.m,I("/loginiframe"),J({publicationId:a.pageConfig().getPublicationId(
),productId:a.pageConfig().getProductId(),userConsent:!1}),!0)}start()
{this.h.callbacks().triggerFlowStarted("showLoginNotification");this.Ta=this.o.open
View(this.l);return
this.l.acceptResult().then(()=>{this.o.completeView(this.l)},a=>{this.o.completeVie
w(this.l);throw a;})}};class fe{constructor(a)
{this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.Ta=nul
l;this.l=new
y(this.g,this.m,I("/loginiframe"),J({publicationId:a.pageConfig().getPublicationId(
),productId:a.pageConfig().getProductId(),userConsent:!0}),!0)}start()
{this.h.callbacks().triggerFlowStarted("showLoginPrompt");this.Ta=this.o.openView(t
his.l);return
this.l.acceptResult().then(()=>{this.o.completeView(this.l)},a=>{u(a)?
this.h.callbacks().triggerFlowCanceled("showLoginPrompt"):this.o.completeView(this.
l);
throw a;})}};class ge{constructor(a,b)
{this.V=a;this.G=b}getOffers(a=this.V.getProductId()){if(!a)throw Error("getOffers
requires productId in config or arguments");return this.qa(a)}qa(a)
{a=H("/publication/"+encodeURIComponent(this.V.getPublicationId())+"/offers?
label="+encodeURIComponent(a));return
this.G.fetchCredentialedJson(a).then(b=>b.offers||[])}};class he{constructor(a,b)
{let c,d;const e=a.indexOf(":");-1!=e?
(c=a,a=c.substring(0,e),d=c.substring(e+1)):d=c=null;this.L=a;this.Ea=c;this.Pa=d;t
his.Sd=b}getPublicationId(){return this.L}getProductId(){return this.Ea}getLabel()
{return this.Pa}isLocked(){return this.Sd}};function ie(a){var b=null;let
c="";for(let e=0;e<arguments.length;e++){var d=arguments[e];if(d instanceof
Error&&!b)a:
{b=d;if((d=Object.getOwnPropertyDescriptor(b,"message"))&&d.writable)break
a;d=b.stack;const f=Error(b.message);for(const g in b)f[g]=b[g];f.stack=d;b=f}else
c&&(c+=" "),c+=d}b?c&&(b.message=c+": "+b.message):b=Error(c);return b}function
je(a,b){a.xb&&(b.message?-
1===b.message.indexOf(a.xb)&&(b.message=a.xb):b.message=a.xb)}
class ke{constructor(a=""){this.xb=a}createError(a){const
b=ie.apply(null,Array.prototype.slice.call(arguments));je(this,b);return
b}createExpectedError(a){const
b=ie.apply(null,Array.prototype.slice.call(arguments));je(this,b);b.expected=!
0;return b}error(a){throw this.createError.apply(this,arguments);}expectedError(a)
{throw this.createExpectedError.apply(this,arguments);}}const le=new
ke(self.__AMP_TOP?"\u200b\u200b\u200b":"");new ke;const me="CreativeWork Article
NewsArticle Blog Comment Course HowTo Message Review WebPage".split(" "),ne=new
RegExp(me.join("|"));
class oe{constructor(a){this.j=bd(a);this.Aa=null;this.Fd=new
Promise(b=>{this.Aa=b});this.Ud=new pe(this.j);this.Rd=new qe(this.j);this.Wd=new
re(this.j)}resolveConfig()
{Promise.resolve().then(this.check.bind(this));this.j.whenReady().then(this.check.b
ind(this));return this.Fd}check(){if(!this.Aa)return null;let a=this.Ud.check();a||
(a=this.Rd.check());a||(a=this.Wd.check());a?
(this.Aa(a),this.Aa=null):this.j.isReady()&&(this.Aa(Promise.reject(le.createError(
"No config could be discovered in the page"))),
this.Aa=null);ca(a);return a}}class se{constructor(){}checkValue(a,b){if(a){var
c=this.checkArray;a=Array.isArray(a)?a:[a];c=c.call(this,a,b)}else c=!1;return
c}checkString(a,b){return a?this.checkArray(a.split(/\s+/),b):!1}checkArray(a,b)
{let c=!1;a.forEach(d=>{c=c||
b.includes(d.replace(/^http:\/\/schema.org\//i,""))});return c}}
class pe{constructor(a){this.j=a}check(){if(!this.j.getBody())return null;const
a=te(this.j.getRootNode(),"subscriptions-product-id");if(!a)return null;const
b=te(this.j.getRootNode(),"subscriptions-accessible-for-free"),c=!(!b||"false"!
==b.toLowerCase());return new he(a,c)}}function ue(a,b){a=a[b];return
null==a||""===a?null:Array.isArray(a)?a:[a]}function ve(a,b){const
c=ue(a,b);a=c&&c[0];return null==a||""===a?null:a}
class qe{constructor(a){this.j=a;this.Ha=new se}check(){if(!this.j.getBody())return
null;const
a=this.j.isReady(),b=this.j.getRootNode().querySelectorAll('script[type="applicatio
n/ld+json"]');for(let d=0;d<b.length;d++){const e=b[d];var c;if(!(c=e["__SWG-
SEEN__"]||!e.textContent)&&(c=!a)){a:{c=e;do if(c.nextSibling){c=!0;break
a}while((c=c.parentNode)&&void 0!=c);c=!1}c=!c}if(c)continue;e["__SWG-SEEN__"]=!
0;if(!ne.test(e.textContent))continue;const f=this.Tc(e);if(f)return f}return
null}Tc(a){let b=
Cb(a.textContent);if(!b)return null;Array.isArray(b)||(b=[b]);let c=b;for(var
d=0;d<c.length;d++){const
e=c[d];e["@graph"]&&Array.isArray(e["@graph"])&&(c=c.concat(e["@graph"]));if(!
this.Ha.checkValue(e["@type"],me))continue;a=null;const
f=ue(e,"isPartOf");if(f)for(let g=0;g<f.length&&!(a=this.Ob(f[g]));g++);if(a)return
d=ve(e,"isAccessibleForFree"),d=null==d||""===d?!0:"boolean"==typeof d?
d:"string"==typeof d&&"false"==d.toLowerCase()?!1:!0,new he(a,!d)}return null}Ob(a)
{return this.Ha.checkValue(a["@type"],
["Product"])?ve(a,"productID"):null}}function we(a,b,c){for(var d=b;d&&!
d[c];d=d.parentNode)if(d[c]=!0,d.hasAttribute&&d.hasAttribute("itemscope"))return
d=d.getAttribute("itemtype"),a.Ha.checkString(d,me);return!1}
function xe(a,b){const
c=b.querySelectorAll("[itemprop='isAccessibleForFree']");for(b=0;c[b];b++){const
d=c[b],e=d.getAttribute("content")||
d.textContent;if(e&&we(a,d,"alreadySeenForAccessInfo")){let
f=null;"true"==e.toLowerCase()?f=!0:"false"==e.toLowerCase()&&(f=!1);return
f}}return null}function ye(a){let b=null;null!=a.$a?b=!a.$a:a.j.isReady()&&(b=!
1);return null!=a.Ea&&null!=b?new he(a.Ea,b):null}
class re{constructor(a){this.j=a;this.Ea=this.$a=null;this.Ha=new se}Ob(a)
{a=a.querySelectorAll('[itemprop="productID"]');for(let c=0;a[c];c++){var
b=a[c];const d=b.getAttribute("content")||b.textContent;b=b.closest("[itemtype]
[itemscope]");if(!(-
1>=b.getAttribute("itemtype").indexOf("http://schema.org/Product"))&&we(this,b.pare
ntElement,"alreadySeenForProductInfo"))return d}return null}Tc(){var
a=ye(this);if(a)return a;const
b=Array.prototype.slice.call(this.j.getRootNode().querySelectorAll("[itemscope]
[itemtype]")).filter(c=>
this.Ha.checkString(c.getAttribute("itemtype"),me));for(let c=0;b[c]&&null==a;c+
+)a=b[c],null==this.$a&&(this.$a=xe(this,a)),this.Ea||
(this.Ea=this.Ob(a)),a=ye(this);return a}check(){return this.j.getBody()?
this.Tc():null}}function te(a,b){return(a=a.querySelector(`meta[name="${b}"]`))?
a.getAttribute("content"):null};/*

Copyright 2018 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");


you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software


distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
var
ze={LOCAL:"LOCAL",PREPROD:"PREPROD",PRODUCTION:"PRODUCTION",SANDBOX:"SANDBOX",TEST:
"TEST",TIN:"TIN"},Ae={CARD:"CARD",TOKENIZED_CARD:"TOKENIZED_CARD",UPI:"UPI"},Be={CR
YPTOGRAM_3DS:"CRYPTOGRAM_3DS",PAN_ONLY:"PAN_ONLY"},Ce={ESTIMATED:"ESTIMATED",FINAL:
"FINAL",NOT_CURRENTLY_KNOWN:"NOT_CURRENTLY_KNOWN"};class De{constructor()
{this.le=V.contentWindow}postMessage(a,b){this.le.postMessage(a,b)}};let
V=null,Ee=null,W=null,Fe=null,He=Date.now(),Ie=null,Je=!1,Ke=[];
function Le(){V||(W=(window.gpayInitParams||
{}).environment||"PRODUCTION",V=document.createElement("iframe"),V.src=`https://pay
${"PREPROD"==W?"-
preprod.sandbox":"SANDBOX"==W?".sandbox":""}.google.com/gp/p/ui/payframe?origin=$
{window.location.origin}&mid=%
{merchantId}`,X({eventType:15,clientLatencyStartMs:Date.now()}),V.height="0",V.widt
h="0",V.style.display="none",V.style.visibility="hidden",V.onload=function()
{X({eventType:17,clientLatencyStartMs:Date.now()});Me()},document.body?
(document.body.appendChild(V),
Ee=new De):document.addEventListener("DOMContentLoaded",
()=>{document.body.appendChild(V);Ee=new De}))}function X(a){if(Je)
{a=Object.assign({buyFlowActivityMode:Ie,googleTransactionId:Fe,originTimeMs:He},a)
;var b=Ee,c=b.postMessage;let d="https://pay";"SANDBOX"==W?
d+=".sandbox":"PREPROD"==W&&(d+="-
preprod.sandbox");c.call(b,a,d+".google.com")}else Ke.push(a)}function Me(){Je=!
0;Ke.forEach(function(a){X(a)});Ke.length=0}
function Ne(a,b){function c(e)
{e.data.isReadyToPayResponse&&(b(e),window.removeEventListener("message",c))}window
.addEventListener("message",c);const
d=Object.assign({eventType:6},a);X(d)};function Oe(a,b,c,d){let
e={};a&&(e=JSON.parse(JSON.stringify(a)));e.apiVersion||
(e.apiVersion=1);e.swg&&(e.allowedPaymentMethods=["CARD"]);b&&"TEST"==b&&(e.environ
ment=b);return new PaymentRequest([{supportedMethods:
["https://google.com/pay"],data:e}],{total:{label:"Estimated Total Price",amount:
{currency:c||"USD",value:d||"0"}}})}
function Pe(a,b){b=Oe(b,a.J,b.transactionInfo&&b.transactionInfo.currencyCode||void
0,b.transactionInfo&&b.transactionInfo.totalPrice||void
0);a.T(b.show().then(c=>{c.complete("success");return c.details}).catch(function(c)
{c.statusCode="CANCELED";throw c;}))}
class Qe{constructor(a){this.J=a;this.T=null}onResult(a){this.T=a}isReadyToPay(a)
{const b=Oe(a);return new
Promise(c=>{b.canMakePayment().then(d=>{window.sessionStorage.setItem("google.payme
nts.api.storage.isreadytopay.result",d.toString());const
e={result:d};2<=a.apiVersion&&a.existingPaymentMethodRequired&&(e.paymentMethodPres
ent=d);c(e)}).catch(function()
{window.sessionStorage.getItem("google.payments.api.storage.isreadytopay.result")?
c({result:"true"==window.sessionStorage.getItem("google.payments.api.storage.isread
ytopay.result")}):
c({result:!1})})})}prefetchPaymentData(a)
{Oe(a,this.J,a.transactionInfo.currencyCode,a.transactionInfo.totalPrice)}loadPayme
ntData(a){Pe(this,a)}};class Re{constructor(){var
a=window.document;this.j=a;this.Z=a.createElement("gpay-graypane");Se(this.Z,{"z-
index":2147483647,display:"none",position:"fixed",top:0,right:0,bottom:0,left:0,"ba
ckground-color":"rgba(32, 33, 36, .
6)"});this.nb=null;this.Z.addEventListener("click",
()=>{if(this.nb)try{this.nb.focus()}catch(b){}})}show(a){this.nb=a||
null;this.j.body.appendChild(this.Z);Se(this.Z,{display:"block",opacity:0});return
Te(this.Z,{opacity:1})}hide(){this.nb=null;if(this.Z.parentElement)return
Te(this.Z,
{opacity:0}).then(()=>{Se(this.Z,
{display:"none"});this.j.body.removeChild(this.Z)})}}function Se(a,b){for(const c
in b)a.style.setProperty(c,b[c].toString(),"important")}function Te(a,b){const
c=a.ownerDocument.defaultView,d=a.style.transition||"";return(new
Promise(e=>{c.setTimeout(()=>{c.setTimeout(e,300);Se(a,Object.assign({transition:"t
ransform 300ms ease-out, opacity 300ms ease-
out"},b))})})).then(()=>{Se(a,Object.assign({transition:d},b))})};function Ue()
{if(-1!=window.navigator.userAgent.indexOf("OPR/"))return!1;const
a=window.navigator.userAgent.match(/Android/i),b=window.navigator.userAgent.match(/
Chrome\/([0-9]+)\./i);return null!=a&&"PaymentRequest"in window&&"Google
Inc."==window.navigator.vendor&&null!=b&&59<=Number(b[1])}function Ve(a)
{if(2<=a.apiVersion){const
b=We(a);if(b&&1==b.length&&"CRYPTOGRAM_3DS"==b[0])return!0}return
1==a.allowedPaymentMethods.length&&"TOKENIZED_CARD"==a.allowedPaymentMethods[0]}
function Xe(a,b){return 2<=a.apiVersion&&(a=We(a))&&a.includes(b)?!0:!1}function
Ye(){return window.location.hostname.endsWith(".google.com")||void
0===window.isSecureContext?null:window.isSecureContext?null:"Google Pay APIs should
be called in secure context!"}function Ze(a){if(a.environment&&!
Object.values(ze).includes(a.environment))throw Error("Parameter environment in
PaymentOptions can optionally be set to PRODUCTION, otherwise it defaults to TEST.
"+a.environment);}
function $e(a){if(!a)return"isReadyToPayRequest must be set!";if(2<=a.apiVersion)
{if(!("apiVersionMinor"in a))return"apiVersionMinor must be set!";if(!
a.allowedPaymentMethods||!Array.isArray(a.allowedPaymentMethods)||
0==a.allowedPaymentMethods.length)return"for v2 allowedPaymentMethods must be set
to an array containing a list of accepted payment methods";for(var
b=0;b<a.allowedPaymentMethods.length;b++){let
e=a.allowedPaymentMethods[b];if("CARD"==e.type){if(!e.parameters)return"Field
parameters must be setup in each allowedPaymentMethod";
var c=e.parameters.allowedCardNetworks;if(!c||!Array.isArray(c)||
0==c.length)return"allowedCardNetworks must be setup in parameters for type
CARD";var d=e.parameters.allowedAuthMethods;if(!d||!Array.isArray(d)||
0==d.length||!d.every(af))return"allowedAuthMethods must be setup in parameters for
type 'CARD' and must contain 'CRYPTOGRAM_3DS' and/or 'PAN_ONLY'"}}}else if(!
a.allowedPaymentMethods||!Array.isArray(a.allowedPaymentMethods)||
0==a.allowedPaymentMethods.length||!
a.allowedPaymentMethods.every(bf))return"allowedPaymentMethods must be set to an
array containing 'CARD' and/or 'TOKENIZED_CARD'!";
return null}function bf(a){return Object.values(Ae).includes(a)}function af(a)
{return Object.values(Be).includes(a)}
function cf(a){if(!a)return"paymentDataRequest must be
set!";if(a.swg)return(a=a.swg)?a.skuId&&a.publicationId?null:"Both skuId and
publicationId must be provided":"Swg parameters must be
provided";if(a.transactionInfo)if(a.transactionInfo.currencyCode){if(!
a.transactionInfo.totalPriceStatus||!
Object.values(Ce).includes(a.transactionInfo.totalPriceStatus))return"totalPriceSta
tus in transactionInfo must be set to one of NOT_CURRENTLY_KNOWN, ESTIMATED or
FINAL!";if("NOT_CURRENTLY_KNOWN"!==a.transactionInfo.totalPriceStatus&&
!a.transactionInfo.totalPrice)return"totalPrice in transactionInfo must be set when
totalPriceStatus is ESTIMATED or FINAL!"}else return"currencyCode in
transactionInfo must be set!";else return"transactionInfo must be set!";var
b=df(a);if(b){if(!b.parameters)return"parameters must be set in
allowedPaymentMethod!";b=b.parameters;if(b.payeeVpa)if(b.payeeName)if(b.referenceUr
l){if(!b.mcc)return"mcc in allowedPaymentMethod parameters must be set!";if(!
b.transactionReferenceId)return"transactionReferenceId in allowedPaymentMethod
parameters must be set!"}else return"referenceUrl in allowedPaymentMethod
parameters must be set!";
else return"payeeName in allowedPaymentMethod parameters must be set!";else
return"payeeVpa in allowedPaymentMethod parameters must be set!";if("INR"!
==a.transactionInfo.currencyCode)return"currencyCode in transactionInfo must be set
to INR!";if("FINAL"!==a.transactionInfo.totalPriceStatus)return"totalPriceStatus in
transactionInfo must be set to FINAL!";if(!
a.transactionInfo.transactionNote)return"transactionNote in transactionInfo must be
set!"}return null}
function df(a){return!Ue()||2>a.apiVersion||!a.allowedPaymentMethods?
null:ef(a,"UPI")}function We(a){return
a.allowedPaymentMethods&&(a=ef(a,"CARD"))&&a.parameters?
a.parameters.allowedAuthMethods:null}function ef(a,b){for(var
c=0;c<a.allowedPaymentMethods.length;c++){const
d=a.allowedPaymentMethods[c];if(d.type==b)return d}return null};function ff(a)
{return"LOCAL"==a.J?"":"https://"+("PREPROD"==a.J?"pay-
preprod.sandbox":"SANDBOX"==a.J?"pay.sandbox":"pay")+".google.com"}
function gf(a,b){return new Promise((c,d)=>{const e=hf(a),f=new
XMLHttpRequest;f.open("POST",e,!0);"withCredentials"in f&&(f.withCredentials=!
0);f.onreadystatechange=()=>{if(!(2>f.readyState))if(100>f.status||
599<f.status)f.onreadystatechange=null,d(Error(`Unknown HTTP status $
{f.status}`));else if(4==f.readyState)try{c(JSON.parse(f.responseText))}catch(g)
{d(g)}};f.onerror=()=>{d(Error("Network failure"))};f.onabort=()=>{d(Error("Request
aborted"))};f.send(b)})}
function hf(a){let b=ff(a)+"/gp/p/apis/buyflow/process";a.xd&&(b+="?
rk="+encodeURIComponent(a.xd));return b}function jf(a,b)
{a.style.setProperty("transition",b);a.style.setProperty("-webkit-
transition",b)}function kf(a,b){jf(b,"all 250ms ease
0s");b.height="0px";setTimeout(()=>{a.parentNode&&a.parentNode.removeChild(a)},250)
}
class lf{constructor(a,b,c){var d=Y;this.J=a;this.activities=b||new
ab(window);this.da=new Re;this.qe=this.T=null;this.Hc=!
1;this.Jd=this.v=null;this.ne=d;this.xd=c||null;this.Wa=null}onResult(a){this.T||
(this.T=a,this.activities.onResult("GPAY",this.Yd.bind(this)))}Yd(a)
{this.da.hide();this.T(a.acceptResult().then(b=>{if(b.origin!=ff(this))throw
Error("channel mismatch");const c=b.data;if(c.redirectEncryptedCallbackData)return
Ie=3,gf(this,c.redirectEncryptedCallbackData).then(d=>{const e=Object.assign({},
c);delete e.redirectEncryptedCallbackData;return Object.assign(e,d)});if(!
b.originVerified||!b.secureChannel)throw Error("channel mismatch");return
c},b=>{const c=b.message;let d=b.message;try{d=JSON.parse(c.substring(7))}catch(e)
{}d.statusCode&&-
1==["DEVELOPER_ERROR","MERCHANT_ACCOUNT_ERROR"].indexOf(d.statusCode)&&(d={statusCo
de:"CANCELED"});"AbortError"==d&&(d={statusCode:"CANCELED"});return
Promise.reject(d)}))}isReadyToPay(a){return new Promise(b=>{if(Ve(a))b({result:!
1});else{var c=window.navigator.userAgent;
if(0<c.indexOf("GSA/")&&0<c.indexOf("Safari"))b({result:!1});else
if(0<c.indexOf("FxiOS"))b({result:!1});else{var d=0<c.indexOf("Chrome")||
0<c.indexOf("Firefox")||
0<c.indexOf("Safari");d&&2<=a.apiVersion&&a.existingPaymentMethodRequired?
(a.environment=this.J,Ne(a,function(e){const
f={result:d};a.existingPaymentMethodRequired&&(f.paymentMethodPresent="READY_TO_PAY
"==e.data.isReadyToPayResponse);b(f)})):b({result:d})}}})}prefetchPaymentData()
{}loadPaymentData(a){a.swg||a.apiVersion||(a.apiVersion=1);
a.environment=this.J;Ie=a.forceRedirect?
3:2;a=this.activities.open("GPAY","TIN"==this.J?"/ui/pay":ff(this)
+"/gp/p/ui/pay",a.forceRedirect?"_top":"gp-js-popup",a,
{width:600,height:600});this.da.show(a&&a.targetWin)}getIframeUrl(a,b){let
c=`https://pay.google.com/gp/p/ui/pay?origin=$
{b}`;if("SANDBOX"==a||"PREPROD"==a)c=`https://pay'+ (environment ==
Constants.Environment.PREPROD ? '-preprod' : '')+
'.sandbox.google.com/gp/p/ui/pay?origin=${b}`;return c}oe(){var
a=document.createElement("div");a.classList.add("google-payments-dialogContainer");
var b=document.createElement("div");b.classList.add("iframeContainer");var
c=document.createElement("iframe");c.classList.add("google-payments-
dialog");c.setAttribute("frameborder","0");c.setAttribute("scrolling","no");b.appen
dChild(c);a.appendChild(b);document.body.appendChild(a);a={container:a,iframe:c};b=
a.iframe;c=a.container;c.addEventListener("click",this.Cd.bind(this,a));c.style.dis
play="none";b.style.display="none";b.height="0px";jf(b,"all 250ms ease
0s");this.Hc=!1;return a}me(a){a.container.parentNode&&
(this.Jd(Promise.reject({errorCode:"CANCELED"})),kf(a.container,a.iframe),this.v&&t
his.v.disconnect())}Cd(a){a.container.parentNode&&history.back()}re(a,b)
{a.style.display="block";b.style.display="block";setTimeout(()=>{b.height="280px";s
etTimeout(()=>{this.Hc=!
0;this.Wa&&(jf(b,this.Wa.transition),b.height=this.Wa.height,this.Wa=null)},250)},1
)}pe(a,b,c){c.swg||c.apiVersion||(c.apiVersion=1);c.environment=this.J;let d;const
e=this.getIframeUrl(this.J,window.location.origin);return
this.activities.openIframe(b,
e,c).then(f=>{this.v=f;f.onMessage(g=>{"resize"===g.type&&this.Hc?(d||
(d=Date.now()),Date.now()<d+250?jf(b,g.transition+", height
250ms"):jf(b,g.transition),b.height=g.height):this.Wa={height:g.height,transition:g
.transition}});return f.acceptResult()}).then(f=>{kf(a,b);history.back();return
f.data},f=>{kf(a,b);history.back();return Promise.reject(f)})}};function mf(a)
{const
b=window.sessionStorage.getItem("google.payments.api.storage.upi.canMakePaymentCach
e");return b?Promise.resolve("true"===b):a.canMakePayment?
a.canMakePayment().then(c=>{c&&window.sessionStorage.setItem("google.payments.api.s
torage.upi.canMakePaymentCache",c.toString());return c}):Promise.resolve(!
0)}function nf(a){return a.show().then(b=>{b.complete("success");return
b.details})}
class of{constructor(){}isUpiRequest(a){return!!df(a)}isReadyToPay(a)
{if(df(a))return a.existingPaymentMethodRequired?Promise.resolve({result:!
0,paymentMethodPresent:!0}):Promise.resolve({result:!0});throw Error("No Upi
payment method found in handler");}loadPaymentData(a,b,c){const
d=b.parameters,e=a.transactionInfo,f=[{supportedMethods:
["https://tez.google.com/pay"],data:
{pa:d.payeeVpa,pn:d.payeeName,tr:d.transactionReferenceId,url:d.referenceUrl,mc:d.m
cc,tn:e.transactionNote}}];d.transactionId&&
(f[0].data.tid=d.transactionId);let g=new PaymentRequest(f,{total:
{label:"Total",amount:{currency:e.currencyCode,value:e.totalPrice}},displayItems:
[{label:"Original Amount",amount:
{currency:e.currencyCode,value:e.totalPrice}}]});c(mf(g).then(h=>{h?h=nf(g):
(window.location.replace("https://play.google.com/store/apps/details?
id=com.google.android.apps.nbu.paisa.user"),h=Promise.reject({errorMessage:"Cannot
redirect to Tez page in Google Play."}));return h}).then(h=>{var
k=JSON.parse(h.tezResponse);
if("FAILURE"===k.Status){switch(k.responseCode){case
"ZM":k={errorCode:3,errorMessage:"Payment failure due to invalid MPIN."};break;case
"Z9":k={errorCode:3,errorMessage:"Payment failure due to insufficient
funds."};break;case "91":k={errorCode:1,errorMessage:"Payment failure due to
transaction timeout or connection issue."};break;default:k={errorMessage:"Payment
cancelled."}}k=Promise.reject(k)}else
k=Promise.resolve({apiVersion:a.apiVersion,apiVersionMinor:a.apiVersionMinor,paymen
tMethodData:{type:b.type,
tokenizationData:{type:"DIRECT",token:
{protocolVersion:"ECv1",signature:"",signedMessage:
{paymentMethodType:"UPI",payeeVpa:b.parameters.payeeVpa,status:k.Status,transaction
ReferenceId:b.parameters.transactionReferenceId,transactionId:b.parameters.transact
ionId?
b.parameters.transactionId:k.txnId,transactionInfo:a.transactionInfo}}}}});return
k}).catch(h=>{h.statusCode="CANCELED";return Promise.reject(h)}))}};/*

Math.uuid.js (v1.4)
http://www.broofa.com
mailto:robert@broofa.com
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
var
pf="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");funct
ion qf(a){for(var b=Array(36),c=0,d,e=0;36>e;e++)8==e||13==e||18==e||23==e?
b[e]="-":14==e?b[e]="4":(2>=c&&(c=33554432+16777216*Math.random()|
0),d=c&15,c>>=4,b[e]=pf[19==e?d&3|8:d]);return b.join("")+"."+a};const
rf="actions.google.com amp-actions.sandbox.google.com amp-actions-
staging.sandbox.google.com amp-actions-autopush.sandbox.google.com
payments.developers.google.com payments.google.com".split(" ");function sf(a,b)
{console.error("DEVELOPER_ERROR in "+a+" : "+b)}function tf(a,b)
{if(a.Uc.isUpiRequest(b))return a.Uc.isReadyToPay(b);if(Ue()&&!uf(b))
{if(2<=b.apiVersion)return vf(a,b);const
c=a.xa.isReadyToPay(b),d=a.La.isReadyToPay(b);return Ve(b)?d:d.then(()=>c)}return
a.xa.isReadyToPay(b)}
function vf(a,b){let c=Promise.resolve({result:!
1});b.existingPaymentMethodRequired&&(c=Promise.resolve({result:!
1,paymentMethodPresent:!1}));var d=c;if(Xe(b,"CRYPTOGRAM_3DS")){const
f=JSON.parse(JSON.stringify(b));for(d=0;d<f.allowedPaymentMethods.length;d+
+)"CARD"==f.allowedPaymentMethods[d].type&&(f.allowedPaymentMethods[d].parameters.a
llowedAuthMethods=["CRYPTOGRAM_3DS"]);d=a.La.isReadyToPay(f)}let
e=c;Xe(b,"PAN_ONLY")&&(e=a.xa.isReadyToPay(b));return d.then(f=>1==(f&&f.result)?
f:e)}
function wf(a){const b={startTimeMs:Date.now(),googleTransactionId:Y};a.i=a.i?
Object.assign(b,a.i):b}
class xf{constructor(a,b,c)
{this.qd=b;Ze(a);this.md=null;this.J=a.environment||"TEST";Y||(Y=-1!
=rf.indexOf(window.location.hostname)&&a.i&&a.i.googleTransactionId?
a.i.googleTransactionId:qf(this.J));this.Zd=a;this.xa=new
lf(this.J,c,a.i&&a.i.redirectKey);this.Ga=5;const d=Ue();this.La=d?new
Qe(this.J):this.xa;this.Uc=new
of;this.xa.onResult(this.oc.bind(this));this.La.onResult(this.oc.bind(this));Le();d
&&(Ie=4);Fe=Y;X({eventType:9,clientLatencyStartMs:Date.now()});window.addEventListe
ner("message",
e=>{-1!
=rf.indexOf(window.location.hostname)&&"logPaymentData"===e.data.name&&X(e.data.dat
a)})}isReadyToPay(a){a&&(a=Object.assign({},this.Zd,a));const b=Date.now(),c=Ye()||
$e(a);if(c)return new
Promise((e,f)=>{sf("isReadyToPay",c);X({eventType:0,error:2});f({statusCode:"DEVELO
PER_ERROR",statusMessage:c})});const
d=tf(this,a);d.then(e=>{X({eventType:0,clientLatencyStartMs:b,isReadyToPayApiRespon
se:e});return e});return d}prefetchPaymentData(a){const b=Ye()||cf(a);b?
sf("prefetchPaymentData",b):(wf(a),
Ue()&&!uf(a)?
this.La.prefetchPaymentData(a):this.xa.prefetchPaymentData(a))}loadPaymentData(a)
{X({eventType:5});const b=Ye()||cf(a);this.Ga=a&&a.swg?6:5;if(b)this.qd(new
Promise((d,e)=>{X({eventType:1,error:2,buyFlowMode:this.Ga});sf("loadPaymentData",b
);e({statusCode:"DEVELOPER_ERROR",statusMessage:b})}));else{var c=df(a);c?
this.Uc.loadPaymentData(a,c,this.oc.bind(this)):(this.md=Date.now(),wf(a),uf(a)?
this.xa.loadPaymentData(a):this.La.loadPaymentData(a))}}createButton(){const
a=Date.now();X({eventType:2,
clientLatencyStartMs:a});return null}oc(a)
{a.then(()=>{X({eventType:1,clientLatencyStartMs:this.md,buyFlowMode:this.Ga})}).ca
tch(b=>{b.errorCode?
X({eventType:1,error:b.errorCode,buyFlowMode:this.Ga}):X({eventType:1,error:6,buyFl
owMode:this.Ga})});this.qd(a)}}var Y;function uf(a){return!
0===(a.i&&a.i.disableNative)};function yf(a,b,c,d){const e=t(a.j,"link",
{rel:c,href:b});d&&e.setAttribute("as",d);a.j.head.appendChild(e)}class
zf{constructor(a){this.j=a}preconnect(a){yf(this,a,"preconnect")}dnsPrefetch(a)
{yf(this,a,"dns-prefetch")}prefetch(a){yf(this,a,"preconnect
prefetch")}preload(a,b){yf(this,a,"preconnect preload",b)}};const
Af={PRODUCTION:"https://pay.google.com",SANDBOX:"https://pay.sandbox.google.com"};f
unction Bf(a){var b={environment:G().payEnv,i:{redirectKey:a.xc.restoreKey()}};var
c=a.ad.getTransactionId(),d=a.Od.bind(a);Y=c;b=new
xf(b,d,a.m.getOriginalWebActivityPorts());a.eb=b}function Cf(a,b,c){return
b.then(d=>{c&&(d.paymentRequest=c);return d}).catch(d=>"object"==typeof
d&&"CANCELED"==d.statusCode?(d=ya(a.g,void 0),d.productType=c?
c.i.productType:null,Promise.reject(d)):Promise.reject(d))}
class Df{constructor(a)
{this.g=a.win();this.m=a.activities();this.Dc=this.Ac=this.Cc=null;this.ad=a.analyt
ics();this.xc=new Ef(this.g);this.eb=null;this.td=new zf(this.g.document);var
b;if(b=P(this.g,"pay-client-redirect")){var
c=this.g.location.hash;b=/redirectEncryptedCallbackData/.test(c);c=/swgRequest/.tes
t(c);b=b&&c}b&&(this.preconnect(this.td),Bf(this));this.xc.prepare();this.u=a.event
Manager()}preconnect(a){a.prefetch(F(Af[G().payEnv]
+"/gp/p/ui/pay","_",Zb()));a.prefetch("https://payments.google.com/payments/v4/js/i
ntegrator.js?ss=md");
a.prefetch("https://clients2.google.com/gr/gr_full_2.0.6.js")}getType()
{return"PAYJS"}start(a,b={}){this.Ac=a;this.eb||
(this.preconnect(this.td),Bf(this));b.forceRedirect&&(a=Object.assign(a,
{forceRedirect:b.forceRedirect||!1}));a.i=Object.assign(a.i||{},
{["disableNative"]:b.forceDisableNative||this.g!=this.g.top});let c=null;const
d=new Promise(e=>c=e);this.xc.useVerifier(e=>{e&&(a.i=Object.assign(a.i||{},
{["redirectVerifier"]:e}));if(b.forceRedirect){const
f=this.eb;this.u.getReadyPromise().then(()=>
{this.ad.getLoggingPromise().then(()=>{f.loadPaymentData(a);c(!0)})})}else
this.eb.loadPaymentData(a),c(!0)});return d}onResponse(a){this.Cc=a;const
b=this.Dc;b&&Promise.resolve().then(()=>{b&&a(Cf(this,b,this.Ac))})}Od(a)
{this.Dc=a;this.Cc&&this.Cc(Cf(this,this.Dc,this.Ac))}}function Ff(a,b){Gf(a);a.kb?
b(a.qc):a.Va&&a.Va.then(c=>b(c));return a.Va}
function Gf(a){if(!a.kb&&!a.Va){try{var b=!!a.g.localStorage}catch(d){b=!1}var
c=a.g.crypto;b&&c&&c.getRandomValues&&c.subtle&&c.subtle.digest?a.Va=(new
Promise((d,e)=>{const f=new Uint8Array(16);c.getRandomValues(f);const
g=btoa(ia(f));c.subtle.digest({name:"SHA-384"},ha(g)).then(h=>{h=btoa(ia(new
Uint8Array(h)));d({key:g,verifier:h})},h=>{e(h)})})).catch(()=>null).then(d=>{a.kb=
!0;return a.qc=d}):(a.kb=!0,a.qc=null)}}
class Ef{constructor(a){this.g=a;this.kb=!1;this.Va=this.qc=null}prepare(){return
Ff(this,()=>{})}useVerifier(a)
{Ff(this,b=>{if(b)try{this.g.localStorage.setItem("subscribe.google.com:rk",b.key)}
catch(c){b=null}a(b&&b.verifier||null)})}restoreKey(){try{return
this.g.localStorage&&this.g.localStorage.getItem("subscribe.google.com:rk")||
null}catch(a){return null}}};function Hf(a,b)
{b=F(b,"u_tz","240");b=F(b,"v",String(a.ke));if(!a.Gb){var
c=a.g.document.cookie.match("(^|;)\\s*__gads\\s*=\\s*([^;]
+)");a.Gb=c&&encodeURIComponent(c.pop())}(c=a.Gb)&&(b=F(b,"cookie",c));return
b=F(b,"cdm",a.g.location.hostname)}
class If{constructor(a,b,c)
{this.g=a;this.h=b;this.L=this.h.pageConfig().getPublicationId();this.Gb=null;this.
G=c;this.ke=1;this.h.eventManager().registerEventListener(this.Na.bind(this))}sendS
ubscriptionState(a,b)
{a=F("https://pubads.g.doubleclick.net/subopt/data","states",this.L+":"+a);b&&(a=F(
a,"extrainfo",b));return this.G.fetch(Hf(this,a),
{method:"GET",credentials:"include"})}Na(a){if(6!
==a.eventOriginator&&(this.h.config().enablePropensity||
3===a.eventOriginator))if(4E3===a.eventType)this.sendSubscriptionState(a.additional
Parameters.state,
a.additionalParameters.productsOrSkus);else{var b=td[a.eventType];if(null!=b){var
c=a.additionalParameters;c instanceof z&&(c=void 0);O(a.isFromUserAction)&&(M(c)||
(c={}),c.is_active=a.isFromUserAction);a=JSON.stringify(c);let
d;d=F("https://pubads.g.doubleclick.net/subopt/data","events",this.L+":"+b);a&&(d=F
(d,"extrainfo",a));this.G.fetch(Hf(this,d),
{method:"GET",credentials:"include"})}}}getPropensity(a,b){return
this.G.fetch(Hf(this,"https://pubads.g.doubleclick.net/subopt/pts?
products="+this.L+"&type="+b+"&ref="+a),
{method:"GET",credentials:"include"}).then(c=>
c.json()).then(c=>{var d={};if(c.header)if(c.header.ok){const
e=c.scores;c=[];for(let f=0;f<e.length;f++){const g=e[f];c.push(g.score?
{product:g.product,score:{value:g.score,bucketed:2==g.score_type}}:
{product:g.product,error:g.error_message})}c&&(d={header:{ok:!0},body:
{scores:c}})}else d={header:{ok:!1},body:{error:c.error}};else d={header:{ok:!
1},body:{error:"No valid response"}};return d})}};class Jf{constructor(a,b,c)
{this.g=a;this.vd=new If(a,b,c);this.u=b.eventManager()}sendSubscriptionState(a,b)
{if(!Object.values(Nb).includes(a))throw Error("Invalid subscription state
provided");if(("subscriber"==a||"past_subscriber"==a)&&!b)throw Error("Entitlements
must be provided for users with active or expired subscriptions");if(b&&!M(b))throw
Error("Entitlements must be an Object");let
c=null;b&&(c=JSON.stringify(b));this.vd.sendSubscriptionState(a,c)}getPropensity(a)
{if(a&&!Object.values(Pb).includes(a))throw Error("Invalid propensity type
requested");
a||(a="general");return
this.vd.getPropensity(this.g.document.referrer,a)}sendEvent(a){const
b=sd[a.name];let c=null;if(!N(Ob,a.name)||!b)throw Error("Invalid user event
provided("+a.name+")");if(a.data)if(M(a.data))c={},Object.assign(c,a.data);else
throw Error("Event data must be an Object("+a.data+")");if(O(a.active))c||
(c={}),Object.assign(c,{is_active:a.active});else if(null!=a.active)throw
Error("Event active must be a
boolean");this.u.logEvent({eventType:b,eventOriginator:3,isFromUserAction:a.active,
additionalParameters:c})}};class Kf{constructor(a){this.g=a;this.Za={}}get(a,b=!1)
{this.Za[a]||(this.Za[a]=new Promise(c=>{const d=b?
this.g.localStorage:this.g.sessionStorage;if(d)try{c(d.getItem(Lf(a)))}catch(e)
{c(null)}else c(null)}));return this.Za[a]}set(a,b,c=!1)
{this.Za[a]=Promise.resolve(b);return new Promise(d=>{const e=c?
this.g.localStorage:this.g.sessionStorage;if(e)try{e.setItem(Lf(a),b)}catch(f)
{}d()})}remove(a,b=!1){delete this.Za[a];return new Promise(c=>{const d=b?
this.g.localStorage:this.g.sessionStorage;if(d)try{d.removeItem(Lf(a))}catch(e)
{}c()})}}
function Lf(a){return"subscribe.google.com:"+a};class Mf{constructor(a,b)
{this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.Ta=nul
l;this.zd=b||Promise.reject("No account promise provided");this.l=new
y(this.g,this.m,I("/waitforsubscriptionlookupiframe"),J({publicationId:a.pageConfig
().getPublicationId(),productId:a.pageConfig().getProductId()}),!0,!0)}start()
{this.Ta=this.o.openView(this.l);return
this.zd.then(a=>{this.o.completeView(this.l);return
a},a=>{this.o.completeView(this.l);throw a;})}};function Z(a,b){if(!a.Ib&&b){a.Ib=!
0;let c;a.uc?c=Promise.resolve(new he(a.uc,!1)):(a.Ua=new
oe(a.j),c=a.Ua.resolveConfig().then(d=>{a.Ua=null;return d}));c.then(d=>{a.Ja(new
Nf(a.j,d,
{configPromise:a.Jb},a.V));a.Ja=null},d=>{a.Ja(Promise.reject(d));a.Ja=null})}else
b&&a.Ua&&a.Ua.check();return a.Jb}
class Of{constructor(a)
{this.g=a;this.j=bd(a);this.tb=Promise.resolve();this.uc=null;this.V={};this.Ib=!
1;this.Ja=null;this.Jb=new Promise(b=>{this.Ja=b});this.Ua=null;this.na=new
Fc(this.j,this.Jb);this.na.init()}whenReady(){return
this.tb}startSubscriptionsFlowIfNeeded(){{var a=this.g.document;const
b=te(a,"subscriptions-control");a=b?b:(a=a.querySelector("script[subscriptions-
control]"))?a.getAttribute("subscriptions-
control"):null}ca(a,"mode");return"manual"==a?null:this.start()}init(a){q(!this.Ib,
"already configured");this.uc=a;Z(this,!0)}configure(a)
{Object.assign(this.V,a);return Z(this,!1).then(b=>b.configure(a))}start(){return
Z(this,!0).then(a=>a.start())}reset(){return Z(this,!0).then(a=>a.reset())}clear()
{return Z(this,!0).then(a=>a.clear())}getEntitlements(a){return Z(this,!
0).then(b=>b.getEntitlements(a))}setOnEntitlementsResponse(a){return Z(this,!
1).then(b=>b.setOnEntitlementsResponse(a))}getOffers(a){return Z(this,!
0).then(b=>b.getOffers(a))}showOffers(a){return Z(this,!0).then(b=>
b.showOffers(a))}showUpdateOffers(a){return Z(this,!
0).then(b=>b.showUpdateOffers(a))}showSubscribeOption(a){return Z(this,!
0).then(b=>b.showSubscribeOption(a))}showAbbrvOffer(a){return Z(this,!
0).then(b=>b.showAbbrvOffer(a))}showContributionOptions(a){return Z(this,!
0).then(b=>b.showContributionOptions(a))}waitForSubscriptionLookup(a){return
Z(this,!0).then(b=>b.waitForSubscriptionLookup(a))}setOnNativeSubscribeRequest(a)
{return Z(this,!
1).then(b=>b.setOnNativeSubscribeRequest(a))}setOnSubscribeResponse(a){return
Z(this,
!1).then(b=>b.setOnSubscribeResponse(a))}subscribe(a){return Z(this,!
0).then(b=>b.subscribe(a))}updateSubscription(a){return Z(this,!
0).then(b=>b.updateSubscription(a))}setOnContributionResponse(a){return Z(this,!
1).then(b=>b.setOnContributionResponse(a))}setOnPaymentResponse(a){return Z(this,!
1).then(b=>b.setOnPaymentResponse(a))}contribute(a){return Z(this,!
0).then(b=>b.contribute(a))}completeDeferredAccountCreation(a){return Z(this,!
0).then(b=>b.completeDeferredAccountCreation(a))}setOnLoginRequest(a){return
Z(this,
!1).then(b=>b.setOnLoginRequest(a))}triggerLoginRequest(a){return Z(this,!
1).then(b=>b.triggerLoginRequest(a))}setOnLinkComplete(a){return Z(this,!
1).then(b=>b.setOnLinkComplete(a))}linkAccount(a={}){return Z(this,!
0).then(b=>b.linkAccount(a))}setOnFlowStarted(a){return Z(this,!
1).then(b=>b.setOnFlowStarted(a))}setOnFlowCanceled(a){return Z(this,!
1).then(b=>b.setOnFlowCanceled(a))}saveSubscription(a){return Z(this,!
0).then(b=>b.saveSubscription(a))}showLoginPrompt(){return Z(this,!
0).then(a=>a.showLoginPrompt())}showLoginNotification(){return Z(this,
!0).then(a=>a.showLoginNotification())}createButton(a,b){return
this.na.create(a,b)}attachSmartButton(a,b,c){return Z(this,!
0).then(d=>d.attachSmartButton(a,b,c))}attachButton(a,b,c){return
this.na.attach(a,b,c)}getPropensityModule(){return Z(this,!
0).then(a=>a.getPropensityModule())}getLogger(){return Z(this,!
0).then(a=>a.getLogger())}getEventManager(){return Z(this,!
0).then(a=>a.getEventManager())}setShowcaseEntitlement(a){return Z(this,!
0).then(b=>b.setShowcaseEntitlement(a))}consumeShowcaseEntitlementJwt(a,
b){return Z(this,!
0).then(c=>c.consumeShowcaseEntitlementJwt(a,b))}showBestAudienceAction(){n("Not
implemented yet")}}
function Pf(a,b){let c="";for(const d in b){const e=b[d];switch(d){case
"windowOpenMode":"auto"!=e&&"redirect"!=e&&(c="Unknown windowOpenMode:
"+e);break;case "experiments":e.forEach(f=>{qc(a.g)[f]=!
0});a.analytics()&&a.analytics().addLabels(e);break;case "analyticsMode":0!=e&&1!
=e&&(c="Unknown analytics mode: "+e);break;case "enableSwgAnalytics":O(e)||
(c="Unknown enableSwgAnalytics value: "+e);break;case "enablePropensity":O(e)||
(c="Unknown enablePropensity value: "+e);break;case
"skipAccountCreationScreen":O(e)||
(c="Unknown skipAccountCreationScreen value: "+e);break;default:c="Unknown config
property: "+d}}q(!c,c||void 0);Object.assign(a.V,b)}
class Nf{constructor(a,b,c,d){c=c||{};c.configPromise=c.configPromise||
Promise.resolve();this.u=new
oc(c.configPromise);this.j=bd(a);this.g=this.j.getWin();this.V={windowOpenMode:"aut
o",analyticsMode:0,enableSwgAnalytics:!1,enablePropensity:!
1};xa(this.g)&&(this.V.windowOpenMode="redirect");d&&Pf(this,d);this.R=b;this.K=thi
s.j.whenReady();this.kd=new Xd(this.j);this.G=c.fetcher||new Vd(this.g);this.H=new
Kf(this.g);this.o=new jd(this.j);this.C=new
Hc;this.ac=this.bc=null;c.enableGoogleAnalytics&&
(this.Ld=new Wd(this),this.Ld.start());this.m=new lc(this);this.Y=new
wc(this,this.G);this.Y.start();this.rc=new Df(this);this.Td=new de(this);this.$=new
Kd(this.g,this.R,this.G,this);this.D=new
Pc(b.getPublicationId(),this.G);this.be=new
Jf(this.g,this,this.G);this.u.logSwgEvent(11,!1);this.Xd=new
ge(this.R,this.G);this.na=new Fc(this.j,Promise.resolve(this));const e=new
zf(this.g.document);e.prefetch("https://news.google.com/swg/js/v1/loader.svg");e.pr
econnect("https://www.gstatic.com/");e.preconnect("https://fonts.googleapis.com/");
e.preconnect("https://www.google.com/");$d(this);cc(this);wa(this.j,".swg-
dialog,.swg-toast{background-color:#fff!important;box-sizing:border-box}.swg-
toast{border:none!important;bottom:0!important;max-height:46px!
important;position:fixed!important;z-index:2147483647!important}@media (min-
width:871px) and (min-height:641px){.swg-dialog.swg-wide-dialog{left:-435px!
important;width:870px!important}}@media (max-height:640px),(max-width:640px){.swg-
dialog,.swg-toast{border-top-left-radius:8px!important;border-top-right-radius:8px!
important;box-shadow:0 1px 1px rgba(60,64,67,.3),0 1px 4px 1px rgba(60,64,67,.15)!
important;left:-240px!important;margin-left:50vw!important;width:480px!
important}}@media (min-width:641px) and (min-height:641px){.swg-dialog{background-
color:transparent!important;border:none!important;left:-315px!important;margin-
left:50vw!important;width:630px!important}.swg-toast{border-radius:4px!
important;bottom:8px!important;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0
rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)!important;left:8px!important}}@media
(max-width:480px){.swg-dialog,.swg-toast{left:0!important;margin-left:0!
important;right:0!important;width:100%!important}}\n/*#
sourceURL=/./src/components/dialog.css*/\n");
this.m.onRedirectError(f=>{this.Y.addLabels(["redirect"]);this.u.logSwgEvent(2E3,!
1);this.kd.error("Redirect error",f)})}doc(){return this.j}win(){return
this.g}pageConfig(){return this.R}jserror(){return this.kd}activities(){return
this.m}payClient(){return this.rc}dialogManager(){return
this.o}entitlementsManager(){return this.$}callbacks(){return this.C}storage()
{return this.H}clientConfigManager(){return this.D}analytics(){return this.Y}init()
{}configure(a){Pf(this,a)}config(){return this.V}reset(){this.$.reset();
this.closeDialog()}clear(){this.$.clear();this.closeDialog()}closeDialog()
{this.o.completeAll()}start(){if(!this.R.getProductId()||!this.R.isLocked())return
Promise.resolve();this.getEntitlements()}getEntitlements(a){return this.
$.getEntitlements(a).then(b=>{if(b)try{const
c=b.entitlements.map(d=>d.getSku()||"unknown
subscriptionToken");0<c.length&&this.Y.setSku(c.join(","))}catch(c){}return
b.clone()})}setOnEntitlementsResponse(a)
{this.C.setOnEntitlementsResponse(a)}getOffers(a){return this.Xd.getOffers(a&&
a.productId)}showOffers(a){return this.K.then(()=>{q(a?!a.oldSku:!0,"The
showOffers() method cannot be used to update a subscription. Use the
showUpdateOffers() method instead.");this.bc=new fc(this,a);return
this.bc.start()})}showUpdateOffers(a){q(P(this.g,"replace-subscription"),"Not yet
launched!");return this.K.then(()=>{q(a?!!a.oldSku:!1,"The showUpdateOffers()
method cannot be used for new subscribers. Use the showOffers() method
instead.");return(new fc(this,a)).start()})}showSubscribeOption(a){return
this.K.then(()=>
(new gc(this,a)).start())}showAbbrvOffer(a){return this.K.then(()=>(new
hc(this,a)).start())}showContributionOptions(a){return this.K.then(()=>{this.ac=new
Qc(this,a);return this.ac.start()})}getLastContributionsFlow(){return
this.ac}waitForSubscriptionLookup(a){return this.K.then(()=>(new
Mf(this,a)).start())}setOnLoginRequest(a)
{this.C.setOnLoginRequest(a)}triggerLoginRequest(a)
{this.C.triggerLoginRequest(a)}setOnLinkComplete(a)
{this.C.setOnLinkComplete(a)}linkAccount(a={}){return this.K.then(()=>
(new Zd(this)).start(a))}saveSubscription(a){return this.K.then(()=>(new
ce(this,a)).start())}showLoginPrompt(){return this.K.then(()=>(new
fe(this)).start())}showLoginNotification(){return this.K.then(()=>(new
ee(this)).start())}setOnNativeSubscribeRequest(a)
{this.C.setOnSubscribeRequest(a)}setOnSubscribeResponse(a)
{this.C.setOnSubscribeResponse(a)}setOnPaymentResponse(a)
{this.C.setOnPaymentResponse(a)}subscribe(a){q("string"===typeof a,"The subscribe()
method can only take a sku as its parameter; for subscription updates please use
the updateSubscription() method");
return this.K.then(()=>(new L(this,{skuId:a})).start())}updateSubscription(a)
{q(P(this.g,"replace-subscription"),"Not yet launched!");q(a?a.oldSku:!1,"The
updateSubscription() method should be used for subscription updates; for new
subscriptions please use the subscribe() method");return this.K.then(()=>(new
L(this,a)).start())}setOnContributionResponse(a)
{this.C.setOnContributionResponse(a)}contribute(a){const b="string"==typeof a?
{skuId:a}:a;return this.K.then(()=>(new
L(this,b,"UI_CONTRIBUTION")).start())}completeDeferredAccountCreation(a){return
this.K.then(()=>
(new Sc(this,a||null)).start())}setOnFlowStarted(a)
{this.C.setOnFlowStarted(a)}setOnFlowCanceled(a)
{this.C.setOnFlowCanceled(a)}createButton(a,b){return
this.na.create(a,b)}attachButton(a,b,c)
{this.na.attach(a,b,c)}attachSmartButton(a,b,c){q(P(this.g,"smartbox"),"Not yet
launched!");this.na.attachSmartButton(this,a,b,c)}getPropensityModule(){return
Promise.resolve(this.be)}eventManager(){return this.u}getLastOffersFlow(){return
this.bc}getEventManager(){return Promise.resolve(this.u)}getLogger(){return
Promise.resolve(this.Td)}setShowcaseEntitlement(a){var b;
if(b=a&&Wb(this.win().location)){b=(b=B(this.win().document.referrer))||Vb;var
c;if(c=Wb(b))b=b||Ub,c=Qb.test(b.hostname);b=c}if(!b||!
zd(this.win().location.search,!0))return Promise.resolve();const
d=ud[a.entitlement]||[];b=new
z;b.setIsUserRegistered(a.isUserRegistered);for(a=0;a<d.length;a+
+)this.eventManager().logEvent({eventType:d[a],eventOriginator:6,isFromUserAction:!
1,additionalParameters:b});return
Promise.resolve()}consumeShowcaseEntitlementJwt(a,b)
{this.entitlementsManager().parseEntitlements({signedEntitlements:a}).consume(b)}sh
owBestAudienceAction(){n("Not implemented yet")}}
function Qf(a)
{return{init:a.init.bind(a),configure:a.configure.bind(a),start:a.start.bind(a),res
et:a.reset.bind(a),clear:a.clear.bind(a),getEntitlements:a.getEntitlements.bind(a),
linkAccount:a.linkAccount.bind(a),showLoginPrompt:a.showLoginPrompt.bind(a),showLog
inNotification:a.showLoginNotification.bind(a),getOffers:a.getOffers.bind(a),showOf
fers:a.showOffers.bind(a),showUpdateOffers:a.showUpdateOffers.bind(a),showAbbrvOffe
r:a.showAbbrvOffer.bind(a),showSubscribeOption:a.showSubscribeOption.bind(a),
showContributionOptions:a.showContributionOptions.bind(a),waitForSubscriptionLookup
:a.waitForSubscriptionLookup.bind(a),subscribe:a.subscribe.bind(a),updateSubscripti
on:a.updateSubscription.bind(a),contribute:a.contribute.bind(a),completeDeferredAcc
ountCreation:a.completeDeferredAccountCreation.bind(a),setOnEntitlementsResponse:a.
setOnEntitlementsResponse.bind(a),setOnLoginRequest:a.setOnLoginRequest.bind(a),tri
ggerLoginRequest:a.triggerLoginRequest.bind(a),setOnLinkComplete:a.setOnLinkComplet
e.bind(a),
setOnNativeSubscribeRequest:a.setOnNativeSubscribeRequest.bind(a),setOnPaymentRespo
nse:a.setOnPaymentResponse.bind(a),setOnSubscribeResponse:a.setOnSubscribeResponse.
bind(a),setOnContributionResponse:a.setOnContributionResponse.bind(a),setOnFlowStar
ted:a.setOnFlowStarted.bind(a),setOnFlowCanceled:a.setOnFlowCanceled.bind(a),saveSu
bscription:a.saveSubscription.bind(a),createButton:a.createButton.bind(a),attachBut
ton:a.attachButton.bind(a),attachSmartButton:a.attachSmartButton.bind(a),getPropens
ityModule:a.getPropensityModule.bind(a),
getLogger:a.getLogger.bind(a),getEventManager:a.getEventManager.bind(a),setShowcase
Entitlement:a.setShowcaseEntitlement.bind(a),consumeShowcaseEntitlementJwt:a.consum
eShowcaseEntitlementJwt.bind(a),showBestAudienceAction:a.showBestAudienceAction.bin
d(a)}};l("Subscriptions Runtime: 0.1.22.197");(function(a){function b(e)
{e&&c.whenReady().then(()=>{e(d)})}if(!a.SWG||Array.isArray(a.SWG)){/MSIE|
Trident/.test(self.navigator.userAgent)&&n("IE Support is being deprecated, in
September 2021 IE will no longer be supported.");var c=new Of(a),d=Qf(c);
[].concat(a.SWG,a.SUBSCRIPTIONS).forEach(b);a.SWG=a.SUBSCRIPTIONS={push:b};c.startS
ubscriptionsFlowIfNeeded()}})(self);}).call(this);

//# sourceMappingURL=swg.js.map

You might also like