!function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=require("react")},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:[]).some(function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return p.has(e.substr(0,5))}(e)})}function u(){var e=document.cookie.match(/wp_geo=(.*?)(;|$)/),t=Array.isArray(e)?e[1]:"",n=t.split("|"),r={country_code:"",state:"",DMA:"",ZIP:""};return t&&(r.country_code=n[0]||"",r.state=n[1]||"",r.DMA=n[2]||"",r.ZIP=n[3]||""),r}var d=function(){var e=l("wp_geo");if(!e)return!1;var t=e.split("|");return"EEA"===(t[t.length-1]||"")};function f(){var e,t,n,r=s((t=u(),n=(null==t?void 0:null===(e=t.ZIP)||void 0===e?void 0:e.split("-"))||[],"US"===t.country_code?n.filter(function(e){return e}):[])),o=u().country_code,a=d();return r&&"US"===o?"L":o&&"US"!==o&&"CA"!==o&&!a?"I":a?"E":"CA"===o?"C":"N"}var p=new Set(["20001","20002","20003","20004","20005","20006","20007","20008","20009","20010","20011","20012","20015","20016","20017","20018","20019","20020","20024","20032","20036","20037","20105","20106","20109","20110","20111","20112","20115","20117","20119","20120","20121","20124","20129","20132","20135","20136","20137","20141","20143","20144","20147","20148","20151","20152","20155","20158","20164","20165","20166","20169","20170","20171","20175","20176","20180","20181","20184","20186","20187","20190","20191","20194","20197","20198","20373","20601","20602","20603","20606","20607","20608","20609","20610","20611","20612","20613","20615","20616","20617","20618","20619","20620","20621","20622","20623","20624","20625","20626","20627","20628","20629","20630","20632","20634","20635","20636","20637","20639","20640","20643","20645","20646","20650","20653","20656","20657","20658","20659","20660","20661","20662","20664","20667","20670","20674","20675","20676","20677","20678","20680","20682","20684","20685","20686","20687","20688","20689","20690","20692","20693","20695","20701","20705","20706","20707","20708","20710","20711","20712","20714","20715","20716","20720","20721","20722","20723","20724","20732","20733","20735","20736","20737","20740","20742","20743","20744","20745","20746","20747","20748","20751","20754","20755","20758","20759","20762","20763","20764","20769","20770","20772","20774","20776","20777","20778","20779","20781","20782","20783","20784","20785","20794","20814","20815","20816","20817","20818","20832","20833","20837","20841","20842","20850","20851","20852","20853","20854","20855","20860","20861","20866","20868","20871","20872","20874","20876","20877","20878","20879","20882","20886","20895","20896","20901","20902","20903","20904","20905","20906","20910","20912","21012","21029","21032","21035","21036","21037","21042","21043","21044","21045","21046","21048","21054","21075","21076","21108","21113","21114","21140","21144","21146","21157","21158","21163","21401","21402","21403","21405","21601","21613","21619","21623","21629","21631","21632","21638","21643","21655","21658","21662","21663","21666","21671","21701","21702","21703","21704","21710","21713","21716","21717","21718","21719","21727","21737","21738","21740","21742","21743","21746","21754","21755","21757","21758","21762","21765","21767","21769","21770","21771","21773","21774","21777","21781","21783","21784","21787","21788","21793","21794","21795","21797","21798","21801","21802","21803","21804","21811","21842","21851","21853","21863","22003","22015","22021","22024","22026","22027","22030","22031","22032","22033","22039","22041","22042","22043","22044","22046","22060","22066","22079","22101","22102","22110","22111","22124","22134","22150","22151","22152","22153","22172","22180","22181","22182","22191","22192","22193","22201","22202","22203","22204","22205","22206","22207","22209","22211","22213","22301","22302","22303","22304","22305","22306","22307","22308","22309","22310","22311","22312","22314","22315","22405","22406","22407","22408","22432","22435","22441","22442","22443","22448","22469","22473","22480","22482","22485","22488","22507","22508","22511","22520","22524","22539","22542","22554","22556","22560","22572","22576","22578","22579","22601","22602","22603","22604","22611","22620","22624","22625","22626","22627","22630","22637","22641","22644","22645","22650","22654","22655","22656","22657","22660","22663","22664","22701","22712","22713","22716","22724","22727","22728","22734","22736","22740","22742","22747","22801","22802","22810","22812","22815","22821","22824","22827","22830","22831","22834","22835","22842","22844","22846","22849","22850","22851","22853","22901","22902","22903","22904","22911","22923","22932","22936","22937","22939","22940","22942","22946","22947","22949","22958","22959","22960","22963","22968","22973","22974","22980","22989","23093","23168","23185","23186","23188","23336","24073","24401","24402","24477","24482","24486","24590"]),b=function(){var e,t=(null===(e=window)||void 0===e?void 0:e.location.href)||"",n="prod";return/(sandbox\.|\.preview\.now\.washingtonpost\.com|local(host)?\.washingtonpost\.com)/.test(t)?n="sandbox":/localhost/.test(t)&&(n="dev"),n};var m=function(){var e=g(),t=document.createElement("a");return t.href=e,t.pathname||""};function g(){var e,t;return(null===(e=window)||void 0===e?void 0:null===(t=e.wpMetaData)||void 0===t?void 0:t.canonical_url)||"".concat(location.protocol,"//").concat(location.host).concat(location.pathname)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function O(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return e.includes("100")||e.includes("110")||e.includes("120")?"wall_retargeting":"wall_standard"}function w(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(",").map(function(e){return e.replace(/\/|^wp - /g,"").replace(/,/g,";").trim()}).join(";").toLocaleLowerCase()}function E(e,t){var n,r,o;return{label:"o1",browserUserAgentHit:navigator.userAgent,promoCode:"o1",acqEntranceType:y(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.actionCodes),geoMarket:f(),acqTemplate:"",acqEntrancePage:m(),arcId:t||"",contentTags:w(null===(r=window)||void 0===r?void 0:null===(o=r.wpMetaData)||void 0===o?void 0:o.ct_tags),actionCode:"".concat(null==e?void 0:e.action)}}var _=n(2),P=n.n(_);function I(e){var t=e.children;return P.a.createPortal(t,document.body)}var A=o.a.createContext({}),L="wp_nl";function T(e){return{softwall:"sw","softwall-nl":"sw","softwall-subscribe":"sw",regwall:"rw","paywall-purchase":"pw","paywall-default":"pw"}[e]}function S(){return"undefined"!=typeof window?JSON.parse(localStorage.getItem(L)||"{}"):{}}function R(e){localStorage.setItem(L,JSON.stringify(e))}function j(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:48,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:720,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"softwall",a=S(),i=T(o);if(t){var l=Date.now()+60*n*60*1e3;a[i]=l,R(a)}else if(e){var c=Date.now()+60*r*60*1e3;a[e]=c,R(a)}}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=S(),n=(t[e]||0)+1;t[e]=n,R(t)}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x(e){for(var t=1;t$/,"").trim())))))}}};function H(){return(H=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ce=function(e){var t=e.children,n=e.color,a=void 0===n?"WaPo blue":n,l=e.href,c=e.className,s=e.style,u=e.onClick,d=e.rounded,f=e.sendMessages,p=void 0!==f&&f,b=e.contentId,m=void 0===b?"":b,g=e.buttonStyle,h=void 0===g?"Button":g,O=e.innerHTML,v=void 0===O?"Subscribe":O,y=e.isLoading,w=void 0!==y&&y,E=le(e,ne),_=G(m),P=_.onChange,I=_.isContentEditable,L=Object(r.useContext)(A).wallConfig,T=null==L?void 0:L.DEFAULT_FONT_COLOR,S="",R="Link"===h||"Arrow"===h;S=R||"White"!==a&&"Black"!==a&&"WaPo blue"!==a?R?i()({"subs-theme":"White"!==a&&"WaPo blue"!==a&&"Black"!==a},"".concat([Y[a]]," bold")):"btn subs-theme bg-".concat(Y[a]):"btn btn-".concat(Y[a]),v=w?" ".concat(v):v;var j=t||o.a.createElement("span",{dangerouslySetInnerHTML:{__html:v},id:m,contentEditable:!!m&&I}),C=ae({role:"button",href:l,style:ae(ae({whiteSpace:R?"normal":"nowrap",boxSizing:"border-box",borderRadius:d?"31px":0},s),{},{borderColor:"White"!==a?"unset":void 0,padding:R?"":null==s?void 0:s.padding,border:"white"===T?"unset":"initial"}),onBlur:P,onClick:function(e){m&&!I||!m?u&&u(e):I&&e.preventDefault()},className:i()(c,"ma-0 pointer",{dib:!R},S),children:o.a.createElement(o.a.Fragment,null,j,"Arrow"===h?o.a.createElement(te,{angle:0,size:16,color:(null==s?void 0:s.color)||a,style:{marginLeft:"5px",verticalAlign:"middle"}}):null)},E),N="".concat(m,"_CTA_WRAPPER");if(l||I&&m||R){var x="_self";return l&&p&&!parent.location.href.includes("wall-builder")&&(x="_top"),o.a.createElement("a",re({id:N},C,{target:x}))}return o.a.createElement("button",re({id:N},C))},se=["children","innerHTML","contentId","sendMessages"];function ue(){return(ue=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var be=function(e){var t=e.children,n=e.innerHTML,r=e.contentId,a=e.sendMessages,i=void 0!==a&&a,l=pe(e,se),c=G(r),s=c.onChange,u=c.isContentEditable,d=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"usw_paywall",t=arguments.length>1?arguments[1]:void 0,n=encodeURIComponent(g()),r=n||"https://washingtonpost.com",o=new URL("https://www.washingtonpost.com/subscribe/".concat("sandbox"===b()?"stage/":"","signin/"));return o.searchParams.append("next_url",r),o.searchParams.append("tid",e||""),t&&o.searchParams.append("case","fms"),o.toString()}function he(e){return function(e){if(Array.isArray(e))return Oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oe(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n$100 $22 for a full year of unlimited digital access to The Washington Post.",PAYWALL_V2_SUPPORTING_TEXT:"Then just $22 for a full year. With the largest political reporting team in The Post’s history, count on us for the most comprehensive coverage.",PROMO_LABEL_HAS_LOGO:!0,PAYWALL_V2_CTA_BUTTON_TEXT:"Try 4 weeks FREE",GTM_LOADER:"gtm",PAYWALL_V2_IMAGE_LOCATION:"right",PROMO_LABEL_PRIMARY_COLOR:"Offblack",AUTO_DISMISS:!0,CTA_BUTTON_COLOR:"Blue",PROMO_LABEL_SECONDARY:"",PROMO_LABEL_SECONDARY_COLOR:"Offblack",US:{SUPPORTING_TEXT:"Then just $100 $22 for a full year of unlimited digital access to The Washington Post.",HEADER:'

Real news, real time. 
FREE for 4 weeks.

'},EEA:{PAYWALL_V2_SUPPORTING_TEXT:"Then just €22 for a full year. With the largest political reporting team in The Post’s history, count on us for the most comprehensive coverage.",SUPPORTING_TEXT:"Then just €50 €22 for a full year of unlimited digital access to The Washington Post.",SUBSCRIPTION_EXPERIENCE:"EUR_22_0222_2",HEADER:'

Real news, real time. 
FREE for 4 weeks.

',SUBSCRIPTION_PRICING:"EUR_22_0222_2",PAYWALL_V2_HEADER:'Your U.S. election source, 
FREE for 4 weeks
'},MAX_SNOOZE:2,CLOSE_BUTTON_EXPIRATION_HOUR:24,DEPLOYMENT_TOKEN:1645798814984,SIGN_IN:"Sign in",PAYWALL_V2_TEXT_ALIGNMENT:"center",PRIMARY_IMAGE_LOCATION:"right",DEFAULT_FONT_COLOR:"offblack",WALL_CONFIG_ID:"dcee842b-b7ff-48e8-bfd5-09975a0e4e15",BACKGROUND_COLOR:"White",AU:{PAYWALL_V2_SUPPORTING_TEXT:"Then just A$22 for a full year. With the largest political reporting team in The Post’s history, count on us for the most comprehensive coverage.",HAS_SIGNIN_LINK:!1,SUPPORTING_TEXT:"Then just A$70 A$22 for a full year of unlimited digital access to The Washington Post.",SUBSCRIPTION_EXPERIENCE:"AU_22_0222",HEADER:'

Real news, real time. 
FREE for 4 weeks.

',SUBSCRIPTION_PRICING:"AU_22_0222",PAYWALL_V2_HEADER:'Your U.S. election source, 
FREE for 4 weeks
'},PAYWALL_V2_MOBILE_IMAGE_URL:"https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/PAAZVREHQFDDXPW7GZG32TTGTM.png",DEFAULT_LINK_COLOR:"gray-dark",PAYWALL_CTA_PROMO_CODE:"",PAYWALL_V2_CLICK_TRIGGER:"You can cancel anytime.",REGION_LIST:["US","AU","CA","GB","EEA","INTL"],PAYWALL_V2_SIGN_IN_DESCRIPTION:"",PAYWALL_V2_DESCRIPTION:"",HEADER:'

Real news, real time. 
FREE for 4 weeks.

',TEMPLATE_ID:"paywall-default",AUTO_DISMISS_SECOND:"15",PROMO_LABEL_PRIMARY:"SPECIAL OFFER",ASSET_BASE_URL:"https://www.washingtonpost.com/subscribe",DESCRIPTION:"",NOTE:"",CTA_BUTTON_TEXT:"Start your FREE trial",INCLUDE_LOGGING:!0,PRICING_STRATEGY:"Annual",TEXT_ALIGNMENT:"center",GB:{PAYWALL_V2_SUPPORTING_TEXT:"Then just £22 for a full year. With the largest political reporting team in The Post’s history, count on us for the most comprehensive coverage.",SUPPORTING_TEXT:"Then just £50 £22 for a full year of unlimited digital access to The Washington Post.",SUBSCRIPTION_EXPERIENCE:"UK_22_0222_2",HEADER:'

Real news, real time. 
FREE for 4 weeks.

',SUBSCRIPTION_PRICING:"UK_22_0222_2",PAYWALL_V2_HEADER:'Your U.S. election source, 
FREE for 4 weeks
'},CA:{PAYWALL_V2_SUPPORTING_TEXT:"Then just CA$22 for a full year. With the largest political reporting team in The Post’s history, count on us for the most comprehensive coverage.",SUPPORTING_TEXT:"Then just CA$80 CA$22 for a full year of unlimited digital access to The Washington Post.",SUBSCRIPTION_EXPERIENCE:"CA_22_0222",HEADER:'

Real news, real time. 
FREE for 4 weeks.

',SUBSCRIPTION_PRICING:"CA_22_0222",PAYWALL_V2_HEADER:'Your U.S. election source, 
FREE for 4 weeks
'},HEADER_COLOR:"Offblack",PAYWALL_V2_HEADER_COLOR:"Offblack",PAYWALL_V2_SECONDARY_SUPPORTING_TEXT:"",PAYWALL_V2_IMAGE_URL:"https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/PAAZVREHQFDDXPW7GZG32TTGTM.png",PAYWALL_V2_CTA_BUTTON_COLOR:"Blue",IMAGE_LOCATION:"right",PAYWALL_V2_BACKGROUND_COLOR:"White",CLICK_TRIGGER:"You can cancel anytime.",SIGN_IN_DESCRIPTION:"",PRIMARY_IMAGE_URL:"https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/CI6TYRJZW5D2HIWUUTNZMVKSIQ.png",MOBILE_IMAGE_URL:"https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/CI6TYRJZW5D2HIWUUTNZMVKSIQ.png",SUBSCRIPTION_EXPERIENCE:"US_22_0222",SUBSCRIPTION_PRICING:"US_22_0222",PAYWALL_V2_HEADER:'
Kick off election season 
with 4 weeks FREE
',PAYWALL_V2_SIGN_IN:"Sign in",INTL:{PAYWALL_V2_SUPPORTING_TEXT:"Then just $22 USD for a full year. With the largest political reporting team in The Post’s history, count on us for the most comprehensive coverage.",SUPPORTING_TEXT:"Then just $60 USD $22 USD for a full year of unlimited digital access to The Washington Post.",SUBSCRIPTION_EXPERIENCE:"INTL_USD_22_0222",HEADER:'

Real news, real time. 
FREE for 4 weeks.

',SUBSCRIPTION_PRICING:"INTL_USD_22_0222",PAYWALL_V2_HEADER:'Your U.S. election source, 
FREE for 4 weeks
'},PAYWALL_TEMPLATE_ID:"paywall-849dcee842b"},VERSION:"3.1.1"};function Xe(e){var t=e.wallState,n=e.children;return o.a.createElement(A.Provider,{value:t},n,o.a.createElement(ze,null),o.a.createElement("span",{id:"wall-templates-version",style:{display:"none"}},Fe.VERSION))}function qe(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"inject",a="";if(null!=r&&null!==(e=r.data)&&void 0!==e&&e.wallMeterType)a=r.data.wallMeterType;else{if(2!==(null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.articleWeight))return n;a="double"}var i=n.split("_");switch(o){case"inject":i.splice(1,0,a);break;case"prefix":i.splice(0,0,a);break;case"suffix":i.splice(i.length,0,a)}return i.join("_")}function $e(){var e;return null!==(e=Object(r.useContext)(A).wallConfig)&&void 0!==e&&e.INCLUDE_LOGGING?o.a.createElement("img",{src:"".concat({prod:"https://www.washingtonpost.com/subscribe",sandbox:"https://subs-stage.washingtonpost.com",dev:"https://subscribe.digitalink.com"}[b()],"/static/paywall-log.png"),alt:"paywall-log",height:"0",width:"0"}):null}function Ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=Ke(Object(r.useState)(!1),2),i=a[0],l=a[1];var c=!1;function s(r,o){console.info("Opt - NAME/VALUE: ".concat(o,"/").concat(r," - ended? ").concat(c));var a=window.dataLayer&&window.dataLayer.filter(function(e){return e["optimize.".concat(t,".").concat(o,".").concat(r,".complete")]})[0]||!1;if(!c&&e.includes(o)&&(a||"timeout"===r)){if(n(window["".concat(o).concat(r,"_").concat(t,"Cfg")]||{}),l(!0),"timeout"!==r){var i={optExpActive:"".concat(t,"|").concat(o,".").concat(r)};window&&window.dataLayer&&window.dataLayer.push(i)}c=!0,console.info("Opt - NAME/VALUE: ".concat(o,"/").concat(r," complete"))}}var u=Object(r.useCallback)(function(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"optimize.wall"})},[t]);return Object(r.useEffect)(function(){if(e.length>0){!function(){window.dataLayer&&window.dataLayer.push(arguments)}("event","optimize.callback",{callback:s});var t=2e3,n=o&&parent&&!parent.location.href.includes("wall-builder");e.forEach(function(e){var r,o=void 0!==(null===(r=window.google_optimize)||void 0===r?void 0:r.get(e));t=o||n?t:0}),u(),setTimeout(function(){e.forEach(function(e){s("timeout",e)})},t)}else l(!0)},[e]),{isOptimize:e.length>0,isExperimentComplete:i}};function Qe(){return(Qe=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"")},st=function(){return"2"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")};var ut=function(){var e;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(",").map(function(e){return e.trim()}).includes((e=l("wp_devicetype"),st(e)?"tablet":ct(e)?"mobile":"desktop"))};function dt(e){var t=ut(e.EXCLUDING_PLATFORMS),n=!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"softwall",n=S(),r=T(t);if(!n[r]&&!n[e])return!0;var o=Date.now(),a=!n[r]||n[r]0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=S()[e]||0;return n>=t&&0!==n||-1===n}(e.PAYWALL_TEMPLATE_ID,e.MAX_SNOOZE);return{isExcluded:t,shouldCloseWall:!/\/wall-builder\//.test(location.href)&&(t||!(null!=e&&e.SHOW_ALWAYS)&&n)&&!window.pendingIframeResize}}var ft=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","NO","CH","LI"],pt=["AU","CA","GB","IN","US"];function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mt(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var o=l("wp_country");ft.includes(o)?o="EEA":ft.includes(o)||pt.includes(o)||(o="INTL"),e=mt(mt({},e),e[o])}return e}(N,n.currentRegion),parent.location.href.includes("wall-builder")||(n.wallConfig=N),Object.keys(y).length&&(n.wallConfig=vt(vt({},N),y),N=n.wallConfig);var x=Je(null===(t=N)||void 0===t?void 0:t.EXPERIMENT_ID,"paywall",w,h),M=x.isOptimize,k=x.isExperimentComplete,U=wt(Object(r.useState)(!1),2),W=U[0],G=U[1],H=N,Y=H.PAYWALL_CTA_PROMO_CODE,V=H.SUBSCRIPTION_PRICING,z=H.SUBSCRIPTION_LOCATION,X=H.SUBSCRIPTION_EXPERIENCE,q=H.PRICING_STRATEGY,$=H.PAYWALL_TEMPLATE_ID,K=H.PRIMARY_IMAGE_URL,Z=H.MOBILE_IMAGE_URL,J=H.PRIMARY_IMAGE_LOCATION,Q=void 0===J?"left":J,ee=H.PRIMARY_IMAGE_MAX_WIDTH,te=H.PRIMARY_IMAGE_MAX_HEIGHT,ne=H.BACKGROUND_COLOR,re=H.TEXT_ALIGNMENT,oe=H.DESCRIPTION,ae=H.SIGN_IN_DESCRIPTION,ie=H.SIGN_IN,le=H.HEADER_COLOR,se=H.HEADER,ue=H.SUPPORTING_TEXT,de=H.CTA_BUTTON_COLOR,fe=H.CTA_BUTTON_TEXT,pe=H.PROMO_LABEL_HAS_LOGO,be=H.PROMO_LABEL_PRIMARY_COLOR,he=H.PROMO_LABEL_SECONDARY_COLOR,Oe=H.HAS_PROMO_LABEL,ve=H.MODAL_DISPLAY,ye=void 0===ve||ve,we=H.DEFAULT_FONT_COLOR,Ee=void 0===we?"offblack":we,_e=H.DEFAULT_LINK_COLOR,Pe=void 0===_e?"gray-dark":_e,Ie=H.HAS_SIGNIN_LINK,Ae=H.AUTO_DISMISS,Le=H.AUTO_DISMISS_SECOND,Te=H.SECONDARY_SUPPORTING_TEXT,Se=H.CLICK_TRIGGER,Re=H.CLOSE_BUTTON_EXPIRATION_HOUR,Ce=H.TEMPLATE_ID,Ne=dt(N).shouldCloseWall&&!ye,xe=s?Z:K,Me=function(e,t){var n=e.pwapiResponse,r=e.arcId,o=function(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)};return{GAData:O(O({},E(n,r)),t),addEvent:o,addEventWithArticleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(O(O(O({userAgentHit:window.navigator.userAgent,userAgentSession:window.navigator.userAgent},E(n,r)),t),e))},addMarketingEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"paywall";o({event:"acq_marketing_".concat(e),category:"acquisition",action:"acq_marketing"})},addGAParamsToURL:function(e,o){var a=O(O(O({},E(n,r)),t),o),i=encodeURIComponent(g()),l={promo:a.promoCode,arcId:a.arcId,acqEntType:a.acqEntranceType,destination:i,next_url:i,p:a.subscription_pricing,s_l:a.subscription_location,e:a.subscription_experience},c=new URL(e);return Object.keys(l).forEach(function(e){l[e]&&c.searchParams.append(e,l[e])}),c.toString()}}}(n,vt(vt({},function(e,t){var n=qe(e,t);return{label:d()?"RPW5:".concat(n=n||"o1_eu"):"C"===f()?"RPW5:".concat(n=n||"o1_ca"):"RPW5:".concat(n),promoCode:n}}(Y,p)),{},{category:"acquisition",action:"acquisition-".concat(S),arcId:m?m._id:u})),De=Me.addEventWithArticleData,Ue=Me.addMarketingEvent,We=Me.GAData,He=Me.addGAParamsToURL;We.acqEntranceType="Monthly"===q||void 0===q?"wall_standard":void 0,We.subscription_pricing=V,We.subscription_location=qe(z,p,"suffix").toUpperCase(),We.subscription_experience=X;var Be=Object(r.useMemo)(function(){return He({prod:"https://subscribe.washingtonpost.com/acquisition?",sandbox:"https://subs-stage.washingtonpost.com/acquisition?",dev:"https://subscribe.digitalink.com/acquisition?"}[b()],We)},[Y,We]);Object(r.useEffect)(function(){Ne||De(vt(vt({},We),{},{event:"acquisition-".concat(S)}))},[N]);var Ye=Object(r.useRef)(!0);if(Object(r.useEffect)(function(){var e;I(!0),6===p.action&&window.postMessage("CloseRegwall","*"),!ye&&Ae&&Le&&"number"==typeof(e=parseFloat(Le||"3.5"))&&setTimeout(function(){Ye.current&&(j("",!0,Re,void 0,Ce),R&&R(!1),h&&parent&&!parent.location.href.includes("wall-builder")&&parent.postMessage(JSON.stringify({wall:!0,wallType:S,wallAction:"close"}),"*"),De({event:"acquisition-".concat(S,"-dismiss-auto"),category:"acquisition",action:"acquisition-".concat(S,"-dismiss-auto")}))},1e3*e),function(){if("undefined"!=typeof window){var e=RegExp("^[A-Za-z0-9-.]+$"),t=l("wapo_login_id")&&l("wapo_secure_login_id")?l("wapo_login_id"):"",n=l("wp_crtid"),r=t?"&id=".concat(t):"",o=n?"&cartaId=".concat(n):"";if(r&&e.test(t)||o&&e.test(n)){var a=-1!=window.location.hostname.indexOf("washingtonpost.com")?"https://login.washingtonpost.com/identity/campaign/paywallHitEngagement?campaignId=1":"https://idstg.digitalink.com/identity/campaign/paywallHitEngagement?campaignId=1";fetch(a+r+o,{method:"POST"})}}}(),G(!!c()),l("wp_wv")||Ne||setTimeout(function(){Ue()},0)},[]),Object(r.useEffect)(function(){h&&parent&&!parent.location.href.includes("wall-builder")&&parent.postMessage(JSON.stringify({background:"transparent",element:"#wallIframe",height:"calc(100% - 60px)",scrollAllowed:!ye,top:"60px",wall:!0,wallAction:"open",wallType:S}),"*")},[]),Object(r.useEffect)(function(){!h||!parent||parent.location.href.includes("wall-builder")||n.isShowing&&!Ne||parent.postMessage(JSON.stringify({wall:!0,wallType:S,wallAction:"close"}),"*")},[n.isShowing,Ne]),!ye&&(!n.isShowing||Ne)&&"test"!==Fe.NODE_ENV&&!/\/wall-builder\//.test(location.href))return Ye.current=!1,null;var ze={},Ke=!n.isPortrait&&"undefined"!=typeof window&&window.matchMedia("(max-height: 420px)").matches;M&&!k?ze.display="none":ye||(ze.display=Ke?"":"flex",ze.justifyContent="center",ze.alignItems="center",ze.maxHeight="calc(100% - 110px)");var Ze="left"===Q||"right"===Q;return o.a.createElement(Xe,e,o.a.createElement(D,{id:ye?$||"":"paywall__overlay-backdrop",style:ze,className:i()("paywall-overlay transition-all duration-400 ease-in",{"pr-sm pl-sm":s&&!ye,"o-0":!P&&!ye||xe&&!ye&&!L}),isDismissible:!ye,isBackgroundScrollable:!ye,trackingEvent:function(){return De({event:"acquisition-".concat(S,"-dismiss"),category:"acquisition",action:"acquisition-".concat(S,"-dismiss")})},isOnClickActivated:P&&!ye&&xe&&L||P&&!ye&&!xe},o.a.createElement(Ge,{imageURL:xe,imageLocation:Q,maxImageHeight:te,maxImageWidth:ee,backgroundColor:ne,isModal:ye,onImageLoad:function(e){return T(e)}},ye?null:o.a.createElement(o.a.Fragment,null,o.a.createElement(lt,{onClick:function(){return De({event:"acquisition-".concat(S,"-dismiss"),category:"acquisition",action:"acquisition-".concat(S,"-dismiss")})}})),o.a.createElement("div",{className:i()({"flex items-center":Ze})},o.a.createElement(Ve,{alignment:re,desktopWidth:"auto",className:i()({"pr-xl pl-xl":!s,"mb-xxl":ye,"mb-lg":!ye}),style:ye?{}:{minWidth:!s&&Ze?"450px":""}},Ie?o.a.createElement("div",je(n,{defaultClass:"mt-sm ".concat(Pe," center"),smallClass:"font-xxxs mb-md",largeClass:i()({"mb-xxl":"top"!==Q||!K,"mb-lg":"top"===Q&&K}),mediumClass:i()({"mb-xxl":"top"!==Q||!K,"mb-lg":"top"===Q&&K})}),o.a.createElement(B,{contentId:"DESCRIPTION",innerHTML:oe,className:" light font--subhead ".concat(Pe)})," ",o.a.createElement("span",je(n,{largeClass:W?"db":"dib",mediumClass:W?"db":"dib",smallClass:"db"}),o.a.createElement(B,{contentId:"SIGN_IN_DESCRIPTION",innerHTML:ae||"",className:" light font--subhead ".concat(Pe)})," ",o.a.createElement(me,{contentId:"SIGN_IN",innerHTML:W?"Find your subscription":ie||"",destURL:ge("usw_paywall",W),className:"".concat(Pe," underline"),sendMessages:h}))):o.a.createElement("div",{className:"pt-sm"}),("top"===Q||s&&"center"!==Q)&&xe&&o.a.createElement(ke,{imageURL:xe,maxImageWidth:"400",maxImageHeight:"150",location:"top",className:"mw-100 ml-auto mr-auto db ".concat(s?"-mb-sm":""),onImageLoad:function(e){return T(e)}}),Oe?o.a.createElement(ot,{primaryContentId:"PROMO_LABEL_PRIMARY",secondaryContentId:"PROMO_LABEL_SECONDARY",hasLogo:pe,primaryColor:be,secondaryColor:he,wallConfig:N,style:{top:"top"===Q&&K?"-11px":void 0}}):null,o.a.createElement(F,ht({color:"white"===Ee?"White":le},je(n,{defaultClass:"mt-sm pl-sm pr-sm center",largeClass:"font-lg",smallClass:ye?"":"font-md",defaultStyle:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}}),{contentId:"HEADER",innerHTML:se})),o.a.createElement(B,{contentId:"SUPPORTING_TEXT",className:i()("".concat("white"===Ee?Ee:"gray-darkest"," font-xs db pl-sm pr-sm"),{"mt-md":!s&&ye,"mt-sm":s&&ye,"mt-xs":"center"===Q,"mb-md":"center"===Q,"font-xxs":s&&!ye}),innerHTML:ue}),"center"===Q&&xe&&o.a.createElement(ke,{imageURL:xe,maxImageWidth:s?"300":"400",maxImageHeight:"110",location:"top",className:"mw-100 ml-auto mr-auto db",onImageLoad:function(e){return T(e)}}),o.a.createElement(B,{contentId:"SECONDARY_SUPPORTING_TEXT",className:"".concat("white"===Ee?Ee:"gray-darkest"," font-xxs db pl-sm pr-sm mt-sm"),innerHTML:Te}),o.a.createElement(ce,{contentId:"CTA_BUTTON_TEXT",className:i()("btn-md",{"mt-lg":ye,"mt-sm":!ye}),style:{minWidth:"225px",borderRadius:"31px"},color:de||"WaPo blue",href:Be,innerHTML:fe,rounded:!0,sendMessages:h,onClick:function(){ye||(j("",!0,Re,void 0,Ce),N.MAX_SNOOZE&&C($||""))}}),o.a.createElement(B,{contentId:"CLICK_TRIGGER",className:i()("".concat("white"===Ee?Ee:"gray-dark"," font-xxxxs db pt-xs")),innerHTML:Se}))),o.a.createElement($e,null))))});t.default=_t}])); //# sourceURL=browsertools://www.washingtonpost.com/subscribe/remote-component1645798820522.js