!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=11)}([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;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}},t._createSuper=function(e){var t=u();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?p(e):t}(this,n)}},t._defineProperty=i,t._extends=c,t._inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)},t._objectSpread2=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},t._slicedToArray=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||m(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.")}()},t._toConsumableArray=function(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(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.")}()},t._typeof=o,t._wrapNativeSuper=d},function(e,t){e.exports=require("react-dom")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0);n(5);var a=n(8),i=n(9),c=n(10);var l,s,u=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(o),f={consentCountry:"",tos:""},d=function(){var e="undefined"==typeof window?"":window.location&&window.location.hostname||"";return/(subscribe\.|subscription\.|localhost.digitalink\.)/.test(e)},p={configUrl:{dev:"https://subscribe.digitalink.com",sandbox:"https://subs-stage.washingtonpost.com",prod:"https://www.washingtonpost.com/subscribe"},subsUrl:{dev:"https://subscribe.digitalink.com",sandbox:"https://subs-stage.washingtonpost.com",prod:"https://subscribe.washingtonpost.com"}},m=function(){try{var e=(new Date).toString();window.localStorage.setItem(e,e);var t=window.localStorage.getItem(e)===e;return window.localStorage.removeItem(e),t}catch(e){return!1}},b=function(e){return p[e][(t="undefined"==typeof window?"":window.location&&window.location.hostname||"",n="prod",/(pb-impact\.|subs-stage\.|sandbox\.|.preview.now.washingtonpost.com|localhost.washingtonpost.com)/.test(t)?n="sandbox":/dev\.washpost|localhost|digitalink\.com/.test(t)&&(n="dev"),n)]||p[e].prod;var t,n},y=function(){return!!a.getCookie("wapo_actmgmt")},h=function(e){var t;if(m()&&(t=JSON.parse(localStorage.getItem("wapo_identity"))),t){var n={privacySetting:r._objectSpread2(r._objectSpread2({},t.privacySetting),e)},o=r._objectSpread2(r._objectSpread2({},t),n);localStorage.setItem("wapo_identity",JSON.stringify(o))}},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=b("subsUrl"),o={appName:"SC",locationId:"SC:TermsOfService",message:"no message",state:{}};o=r._objectSpread2(r._objectSpread2({},o),t);var c=a.getCookie("wapo_login_id")||"";return c&&(o.state.wapo_login_id=c),i.JSONFetch("".concat(n,"/logging/").concat(e),{method:"POST",credentials:"include",body:JSON.stringify(o)})},g=function(e){var t=b("subsUrl"),n=null;return i.JSONFetch("".concat(t,"/user/auth-status?_v=").concat((new Date).getTime()),{method:"GET",credentials:"include"}).then(function(e){e&&"SUCCESS"===e.status&&!d()&&function(e){if(m()){var t=localStorage.getItem("wapo_identity");t=t&&JSON.parse(t)||{};var n=Object.assign(t,e),r=Date.now()+864e5;n.e=r,localStorage.setItem("wapo_identity",JSON.stringify(n))}}(e.userState),n=e}).catch(function(e){return console.error(e)}).finally(function(){return d()||h(e),n})},O=function(){var e,t=(m()&&(e=y()?JSON.parse(localStorage.getItem("wapo_identity")):{}),e?e.privacySetting||f:{});return 0===Object.keys(t).length&&y()&&d()?g().then(function(e){var t;return(null==e||null===(t=e.userState)||void 0===t?void 0:t.privacySetting)||f}):Promise.resolve(t)},w=function(e){return Object.keys(e).reduce(function(t,n){return t[n.toLowerCase()]=e[n],t},{})},E=function(e,t){var n=new RegExp(Object.keys(t).join("|"),"gi");return null==e?void 0:e.replace(n,function(e){return t[e]})};c.styleInject("input[type=checkbox].index-module_tos-checkbox__3XQ6z{-webkit-appearance:none;align-self:baseline}input[type=checkbox].index-module_tos-checkbox__3XQ6z:checked{background-color:#000}");var S=function(e){var t=e.onChange,n=e.isChecked,r=e.checkboxLabelClass,o=e.id,a=e.children,i=e.labelSizeSm,c=e.disabled,f="db gray-dark relative flex pt-xxs pb-xxs items-start ".concat(r),d=i?"16px":"18px",p=c?"not-allowed":"";return u.default.createElement("label",{htmlFor:o,className:f,"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"},u.default.createElement("span",{className:"relative mr-xs",style:{height:d,width:d},"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"},u.default.createElement("input",{id:o,className:"".concat("index-module_tos-checkbox__3XQ6z"," inset-shadow bg-white brad-2 relative outline-none appearance-none ma-0 ").concat(p),type:"checkbox",checked:n,onChange:t,"data-testid":o,style:{height:d,width:d},disabled:c,"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"}),u.default.createElement("svg",{className:"absolute top-50 left-0 -translate-y-50 ".concat(""," ").concat(n?"dib":"dn"),viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{height:d,width:d},"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"},l||(l=u.default.createElement("title",{"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"},"Check")),s||(s=u.default.createElement("path",{d:"M10.052 16.245L3.265 9.46l-1.767 1.768 7.778 7.778a1.25 1.25 0 0 0 1.863-.107L23.415 3.413 21.456 1.86 10.052 16.245z",fill:"#fff",fillRule:"nonzero","data-sc-v":"4.39.0","data-sc-c":"toscheckbox"})))),a)},_=function(e){var t=e.htmlText,n=e.checkboxLabelClass,r=e.isRequired,o=e.id;return u.default.createElement("span",{style:{paddingTop:"1px"},className:"db ".concat(n||""),"data-sc-v":"4.39.0","data-sc-c":"toslabel"},u.default.createElement("span",{"data-testid":"".concat(o,"Text"),dangerouslySetInnerHTML:{__html:t},"data-sc-v":"4.39.0","data-sc-c":"toslabel"}),r&&u.default.createElement("span",{className:"red font-xxs",style:{lineHeight:"0"},"data-sc-v":"4.39.0","data-sc-c":"toslabel"},"*"))},j={tosConfig:{_:{tos:{_:{text:"I agree to The Washington Post's {{TERMS_OF_SERVICE}} and {{PRIVACY_POLICY}}.",required:!0,implicit:!1,prechecked:!1},checkout:{text:null,required:!1,implicit:!0},freeTrial:{text:"By signing up for this free trial, you agree to the {{TERMS_OF_SERVICE}} and {{PRIVACY_POLICY}}.",implicit:!1}},marketingConsent:{_:{text:null,implicit:!0,prechecked:!1}}},us:{tos:{},marketingConsent:{}},ca:{tos:{},marketingConsent:{_:{text:"The Washington Post may use my email address to provide me occasional special offers via email and through other platforms. I can opt out at any time.",implicit:!1},checkout:{prechecked:!0}}},"gb|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":{tos:{freeTrial:{text:"By signing up for this free trial of our , you agree to the use by us and our {{THIRD_PARTY_PARTNERS}} of cookies and data gathered from your use of our sites, apps and newsletters to customize your experience, perform analytics and deliver personalized advertising on our platforms and across the Internet. You can manage the collection and use of such data here, or if you do not consent to the use of cookies and tracking on our sites and apps for personalized advertising, you may subscribe to our Premium EU Ad-Free subscription. See our {{TERMS_OF_SERVICE}} and {{PRIVACY_POLICY}} for more information about the use of the data and your rights.",implicit:!1}},marketingConsent:{_:{text:"The Washington Post may use my email address to provide me occasional special offers via email and through other platforms. I can opt out at any time.",implicit:!1},checkout:{prechecked:!0}}}},tosMapObj:{"{{TERMS_OF_SERVICE}}":"Terms of Service","{{PRIVACY_POLICY}}":"Privacy Policy","{{THIRD_PARTY_PARTNERS}}":"third-party partners"}},C=function(e){var t,n=e.propTosConfig,i=e.propMcConfig,c=e.isToSNeeded,l=e.type,s=e.isConfigNeeded,u=e.overrideTosHidden,f=e.userConfigReady,d=o.useState(!1),p=r._slicedToArray(d,2),m=p[0],y=p[1],h=o.useState({isChecked:!1}),v=r._slicedToArray(h,2),g=v[0],O=v[1],S=o.useState({isChecked:!1}),_=r._slicedToArray(S,2),C=_[0],P=_[1],L=(t=a.getCookie("wp_geo")||"")&&t.split("|")[0]?t.split("|")[0].toLowerCase():null,A=function(e){var t=null==e?void 0:e.tosConfig,o=null==e?void 0:e.tosMapObj;t||(t=j.tosConfig,o=j.tosMapObj);var a=function(e){var t=e.s3Config,n=e.country,o=e.propTosConfig,a=void 0===o?{}:o,i=e.propMcConfig,c=void 0===i?{}:i,l=e.isToSNeeded,s=e.type,u=e.overrideTosHidden,f=e.s3MapObj,d=t._||{},p=r._objectSpread2(r._objectSpread2({},null==d?void 0:d.tos._),null==d?void 0:d.tos[s]),m=r._objectSpread2(r._objectSpread2({},null==d?void 0:d.marketingConsent._),null==d?void 0:d.marketingConsent[s]),b={},y={},h=Object.keys(t).find(function(e){return e.toLowerCase().indexOf(n)>-1});if(h){var v,g,O,S,_=w(a),j=r._objectSpread2(r._objectSpread2({},_._),_[h]),C=w(c),P=r._objectSpread2(r._objectSpread2({},C._),C[h]);b=r._objectSpread2(r._objectSpread2(r._objectSpread2({},null===(v=t[h])||void 0===v?void 0:v.tos._),null===(g=t[h])||void 0===g?void 0:g.tos[s]),j),y=r._objectSpread2(r._objectSpread2(r._objectSpread2({},null===(O=t[h])||void 0===O?void 0:O.marketingConsent._),null===(S=t[h])||void 0===S?void 0:S.marketingConsent[s]),P)}var L=!u&&(!l||b.prechecked);return b=r._objectSpread2(r._objectSpread2(r._objectSpread2({},p),b),{},{isChecked:!!L}),y=r._objectSpread2(r._objectSpread2(r._objectSpread2({},m),y),{},{isChecked:!!y.prechecked}),f&&(b.text=E(b.text,f),y.text=E(y.text,f)),{tos:b,mc:y}}({s3Config:t,country:L,propTosConfig:n,propMcConfig:i,isToSNeeded:c,type:l,overrideTosHidden:u,s3MapObj:o}),s=a.tos,f=a.mc;O(s),P(f),y(!0)};return o.useEffect(function(){var e;f&&(s||n||i?(e=b("configUrl"),Promise.race([fetch("".concat(e,"/static/config/tos/tos.json"),{method:"GET"}),new Promise(function(e,t){return setTimeout(function(){return t(new Error("timeout"))},8e3)})])).then(function(e){return e.json()}).then(function(e){A(e)}).catch(function(e){console.error(e),A(j)}):y(!0))},[f,s,c]),{tosConfig:g,mcConfig:C,ready:m,country:L,updateConfigValue:function(e,t){"tos"===e?O(t):"mc"===e&&P(t)}}},P=function(e){var t=e.isSubmitted,n=void 0!==t&&t,a=e.type,c=void 0===a?"account":a,l=e.email,s=e.className,f=void 0===s?"":s,p=e.checkboxLabelClass,m=void 0===p?"":p,w=e.tosConfig,E=e.mcConfig,j=e.onChange,P=void 0===j?function(){console.error("onChange function missing"),v("logFailure",{message:"onChange function missing"})}:j,L=e.tosConfigReady,A=void 0===L?function(){}:L,T=e.overrideTosHidden,x=void 0!==T&&T,I=e.labelSizeSm,R=void 0===I||I,N=e.disabled,k=void 0!==N&&N,D=o.useState({}),M=r._slicedToArray(D,2),U=M[0],B=M[1];o.useEffect(function(){var e,t,n;(e=x,t=!1,n=!1,O().then(function(r){var o=r.marketingConsent,a=void 0===o?{}:o,i=r.tos,c=void 0===i?{}:i;return t="Y"!==c.consent,void 0!==a.consent&&0==a.consent||(n=!0),{tos:c,marketingConsent:a,isConfigNeeded:e||t||n,isToSNeeded:t,isMcNeeded:n,userConfigReady:!0}})).then(function(e){B(e)})},[x]);var W=U.tos,z=void 0===W?{}:W,V=U.marketingConsent,H=void 0===V?{}:V,F=U.isConfigNeeded,q=U.isToSNeeded,G=U.isMcNeeded,Y=U.userConfigReady,X=C({propTosConfig:w,propMcConfig:E,isToSNeeded:q,type:c,isConfigNeeded:F,overrideTosHidden:x,userConfigReady:Y}),J=X.tosConfig,$=X.mcConfig,Z=X.ready,K=X.country,Q=X.updateConfigValue;o.useEffect(function(){Z&&((J.required||$.required)&&F||P(!0),A())},[Z]),o.useEffect(function(){J.required&&$.required?P(J.isChecked&&$.isChecked):J.required?P(J.isChecked):$.required&&P($.isChecked)},[J.isChecked,$.isChecked]);o.useEffect(function(){n&&function(){var e=z.consent,t=z.consentCountry,n=H.consent,r=H.consentCountry,o=$.isChecked?0:1,a=$.implicit?-1:o,c=K,s=J.isChecked||!q||J.implicit?"Y":"N";10==n?(a=a<0?1:a,c=K):(void 0!==n&&!G||n>-1&&a<0||n==a)&&(a=n,c=r),function(e,t){t&&(e.email=t);var n=b("subsUrl"),r=JSON.stringify(e);i.JSONFetch("".concat(n,"/user/save-identity-preferences"),{method:"POST",credentials:"include",body:r}).then(function(t){if("SUCCESS"===t.status&&y()){var n=JSON.parse(localStorage.getItem("wapo_identity"));n&&n.signedIn?d()||h(e.privacySetting):g(e.privacySetting)}}).catch(function(e){console.error(e),v("logFailure",{message:"SIP failed",locationId:"SC:TermsOfService:api:/user/save-identity-preferences",state:{status:"failure",request:r}})})}({privacySetting:{tos:{consent:"".concat(s),consentCountry:"Y"!==e||q||x?K:t},marketingConsent:{consent:"".concat(a),consentCountry:c}}},l)}()},[n]);var ee=R?"font-xxxxs":"font-xxxs",te=u.default.createElement(_,{htmlText:J.text,isRequired:J.required,id:"tosCheckbox",checkboxLabelClass:J.implicit?"".concat(ee," ").concat(m," pt-xxs pb-xxs gray-dark"):ee}),ne=u.default.createElement(_,{htmlText:$.text,isRequired:$.required,id:"mcCheckbox",checkboxLabelClass:$.implicit?"gray-dark ".concat(ee," ").concat(m):ee}),re=q||x;return u.default.createElement("div",{className:"db mt-xs mb-xs ".concat(f),"data-sc-v":"4.39.0","data-sc-c":"termsofservice"},re&&J.text&&!J.implicit&&u.default.createElement(S,{htmlText:J.text,onChange:function(){return Q("tos",r._objectSpread2(r._objectSpread2({},J),{},{isChecked:!J.isChecked}))},isChecked:J.isChecked,checkboxLabelClass:m,isRequired:J.required,id:"tosCheckbox",labelSizeSm:R,disabled:k},te),re&&J.text&&J.implicit&&te,G&&$.text&&!$.implicit&&u.default.createElement(S,{htmlText:$.text,onChange:function(){return Q("mc",r._objectSpread2(r._objectSpread2({},$),{},{isChecked:!$.isChecked}))},isChecked:$.isChecked,checkboxLabelClass:m,isRequired:$.required,id:"mcCheckbox",labelSizeSm:R,disabled:k},ne),G&&$.text&&$.implicit&&ne)};P.defaultProps={labelSizeSm:!0},t.TermsOfService=P},function(e,t,n){e.exports=n(6)()},function(e,t,n){"use strict";var r=n(7);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";t.getCookie=function(e){if("undefined"!=typeof window){var t=document.cookie.match("(^|;) ?".concat(e,"=([^;]*)(;|$)"));return t?t[2]:null}},t.setCookie=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];document.cookie="".concat(e,"=").concat(t,";")+(n&&"domain=.".concat(window.origin.split(".").slice(-2).join("."),"; path=/;"))}},function(e,t,n){"use strict";var r=n(2),o=function(e){return new Promise(function(t){return e.json().then(function(n){return t({status:e.status,ok:e.ok,json:n})})})},a=function(e){if(!e.ok)throw e.json||e;return e.json},i={Accept:"application/json","Content-Type":"application/json"};t.JSONFetch=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{method:"GET"},n=t;return n.headers=r._objectSpread2(r._objectSpread2({},t.headers),i),fetch(e,n).then(o).then(a)}},function(e,t,n){"use strict";t.styleInject=function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"SoftwallNL",function(){return ln});var r=n(0),o=n.n(r),a=o.a.createContext({}),i=n(1),c=n.n(i);function l(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(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 s(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 s(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);n0&&void 0!==arguments[0]?arguments[0]:[]).some(function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.has(e.substr(0,5))}(e)})}function D(){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 M=function(){var e=N("wp_geo");if(!e)return!1;var t=e.split("|");return"EEA"===(t[t.length-1]||"")};function U(){var e,t,n,r=k((t=D(),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=D().country_code,a=M();return r&&"US"===o?"L":o&&"US"!==o&&"CA"!==o&&!a?"I":a?"E":"CA"===o?"C":"N"}var B=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"]),W=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":/dev|localhost/.test(t)&&(n="dev"),n};function z(){return{prod:"https://www.washingtonpost.com/subscribe",sandbox:"https://subs-stage.washingtonpost.com",dev:"https://subscribe.digitalink.com"}[W()]}var V=function(){var e=H(),t=document.createElement("a");return t.href=e,t.pathname||""};function H(){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 F(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 q(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 X(){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 J(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:U(),acqTemplate:"",acqEntrancePage:V(),arcId:t||"",contentTags:X(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 $=function(e,t){var n=e.pwapiResponse,r=e.arcId,o=function(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)};return{GAData:q(q({},J(n,r)),t),addEvent:o,addEventWithArticleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(q(q(q({userAgentHit:window.navigator.userAgent,userAgentSession:window.navigator.userAgent},J(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=q(q(q({},J(n,r)),t),o),i=encodeURIComponent(H()),c={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},l=new URL(e);return Object.keys(c).forEach(function(e){c[e]&&l.searchParams.append(e,c[e])}),l.toString()}}},Z="wp_nl",K="sw";function Q(){return"undefined"!=typeof window?JSON.parse(localStorage.getItem(Z)||"{}"):{}}function ee(e){localStorage.setItem(Z,JSON.stringify(e))}function te(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=Q();if(t){var a=Date.now()+60*n*60*1e3;o[K]=a,ee(o)}else if(e){var i=Date.now()+60*r*60*1e3;o[e]=i,ee(o)}}function ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=Q(),n=(t[e]||0)+1;t[e]=n,ee(t)}var re=function(){return"1"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")},oe=function(){return"2"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")};function ae(){var e=N("wp_devicetype");return oe(e)?"tablet":re(e)?"mobile":"desktop"}var ie=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(",").map(function(e){return e.trim()}).includes(ae())};function ce(e){var t=ie(e.EXCLUDING_PLATFORMS),n=!function(e){var t=Q();if(!t[K]&&!t[e])return!0;var n=Date.now(),r=!t[K]||t[K]0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Q()[e]||0;return n>=t&&0!==n||-1===n}(e.PAYWALL_TEMPLATE_ID,e.MAX_SNOOZE);return{isExcluded:t,shouldCloseSoftwall:t||!(null!=e&&e.SHOW_ALWAYS)&&n}}var le=function(){var e=Object(r.useContext)(a).setSizes,t=function(){requestAnimationFrame(function(){e&&e({isSmall:v(),isMedium:g(),isLarge:O(),isExtraLarge:w()})})};return Object(r.useEffect)(function(){return"undefined"!=typeof window&&(e&&e({isExtraLarge:w()}),window.addEventListener("resize",t,!1)),function(){"undefined"!=typeof window&&window.removeEventListener("resize",t,!1)}},[]),null},se={NODE_ENV:"production",SERVICE_URL:"https://subscribe.washingtonpost.com",WALL_CONFIG:{TEMPLATE_ID:"softwall-nl",SOFTWALL_V2_HAS_PROMO_LABEL:"both",SOFTWALL_V2_CTA_BUTTON_TEXT:"Sign Up",SOFTWALL_V2_CTA_BUTTON_COLOR:"Blue",SOFTWALL_V2_CTA_BUTTON_HEX_COLOR_OVERRIDE:"",SOFTWALL_V2_CTA_BUTTON_STYLE:"Arrow",SOFTWALL_V2_EXPANDED_HEADER:"The 5-Minute Fix newsletter makes keeping up easy \n",SOFTWALL_V2_COLLAPSED_HEADER:"A 5-minute breakdown to track a new president",SOFTWALL_V2_SUPPORTING_TEXT:"Every weekday afternoon, we help you understand what's happening in politics — fast — with fresh analysis written just for your inbox as Joe Biden's term gets underway.",SOFTWALL_V2_REGISTRATION_SUCCESS_HEADER:"You're all set!",SOFTWALL_V2_IMAGE_URL:"",SOFTWALL_V2_MOBILE_IMAGE_URL:"",SOFTWALL_V2_BACKGROUND_COLOR:"White",NEWSLETTER_ID:"2cca3d4c-fa5c-11e0-ab9a-123139103031",NEWSLETTER_NAME:"The 5-Minute Fix",INCLUDE_LOGGING:!1,EXCLUDING_PLATFORMS:"mobile",CLOSE_BUTTON_EXPIRATION_HOUR:48,SUBMIT_EXPIRATION_HOUR:720,PAGE_RELOAD_AFTER_SIGN_UP:!1,SHOW_CLOSE_ON_MIN:!0,MIN_ON_LOAD:!0,EXPAND_ON_SCROLL:!0,DEPLOYMENT_TOKEN:1633975792301,ASSET_BASE_URL:"https://www.washingtonpost.com/subscribe",ACQ_BASE_URL:"https://subscribe.washingtonpost.com",PROMO_LABEL_PRIMARY:"NEWSLETTER",PROMO_LABEL_SECONDARY:"EVERY WEEKDAY",PROMO_LABEL_HAS_LOGO:!0,HAS_PROMO_LABEL:"both",nl_start_method:"REGWALL_SOFT",nl_start_location:"URL",PAYWALL_TEMPLATE_ID:"softwall-nl-5982fcc047c"},VERSION:"2.13.2"};function ue(e){var t=e.wallState,n=e.children;return Object(r.useEffect)(function(){try{if("undefined"!=typeof window&&"undefined"!=typeof performance&&performance.getEntriesByName("SUBS - wall invoked").length&&(performance.mark("SUBS - wall ready"),performance.measure("SUBS - wall time to display","SUBS - wall invoked","SUBS - wall ready"),performance.measure("renderCompleted",void 0,"SUBS - wall ready"),performance.measure("procStarted",void 0,"SUBS - wall invoked"),window.BOOMR&&"function"==typeof window.BOOMR.sendTimer)){var e={};e.compCompleted=performance.getEntriesByName("SUBS - wall time to display")[0].duration,e.renderCompleted=performance.getEntriesByName("renderCompleted")[0].duration,e.procStarted=performance.getEntriesByName("procStarted")[0].duration,window.BOOMR.sendTimers(e)}}catch(e){}},[]),o.a.createElement(a.Provider,{value:t},n,o.a.createElement(le,null),o.a.createElement("span",{id:"wall-templates-version",style:{display:"none"}},se.VERSION))}function fe(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 de(e){for(var t=1;t$/,"").trim())))}}},_e=["children","color","href","className","style","onClick","rounded","contentId","buttonStyle","innerHTML","isLoading"];function je(){return(je=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 Te=function(e){var t=e.children,n=e.color,r=void 0===n?"WaPo blue":n,a=e.href,i=e.className,l=e.style,s=e.onClick,u=e.rounded,f=e.contentId,d=void 0===f?"":f,p=e.buttonStyle,m=void 0===p?"Button":p,b=e.innerHTML,y=void 0===b?"Subscribe":b,h=e.isLoading,v=void 0!==h&&h,g=Ae(e,_e),O=Se(d),w=O.onChange,E=O.isContentEditable,S="",_="Link"===m||"Arrow"===m;S=_||"White"!==r&&"Black"!==r&&"WaPo blue"!==r?_?c()({"subs-theme":"White"!==r&&"WaPo blue"!==r&&"Black"!==r},"".concat([C[r]]," bold")):"btn subs-theme bg-".concat(C[r]):"btn btn-".concat(C[r]),y=v?" ".concat(y):y;var j=t||o.a.createElement("span",{dangerouslySetInnerHTML:{__html:y},id:d,contentEditable:!!d&&E}),P=Pe({role:"button",href:a,style:Pe(Pe({whiteSpace:_?"normal":"nowrap",boxSizing:"border-box",borderRadius:u?"31px":0},l),{},{borderColor:"White"!==r?"unset":void 0,padding:_?"":null==l?void 0:l.padding}),onBlur:w,onClick:function(e){d&&!E||!d?s&&s(e):E&&e.preventDefault()},className:c()(i,"ma-0 pointer",{dib:!_},S),children:o.a.createElement(o.a.Fragment,null,j,"Arrow"===m?o.a.createElement(ge,{angle:0,size:16,color:(null==l?void 0:l.color)||r,style:{marginLeft:"5px",verticalAlign:"middle"}}):null)},g),L="".concat(d,"_CTA_WRAPPER");return a||E&&d||_?o.a.createElement("a",je({id:L},P)):o.a.createElement("button",je({id:L},P))};function xe(){return(xe=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)){Ke.push(e);var t=document.createElement("script");t.src=e,t.async=!0;var n=function(){a({loaded:!0,error:!1})},r=function(){var n=Ke.indexOf(e);n>=0&&Ke.splice(n,1),t.remove(),a({loaded:!0,error:!0})};return t.addEventListener("load",n),t.addEventListener("error",r),document.body.appendChild(t),function(){t.removeEventListener("load",n),t.removeEventListener("error",r)}}a({loaded:!0,error:!1})},[e]),n.loaded,n.error),o.a.createElement("div",{id:"recaptcha_wall",className:"grecaptcha"})});function et(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,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tt(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 tt(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 tt(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=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}function Ot(e){var t=e.id,n=e.label,a=e.style,i=e.value,l=e.onChange,s=e.className,u=e.validators,f=e.inputStyle,d=e.fieldButton,p=e.errorMessage,m=gt(e,dt),b=ht(Object(r.useState)(!1),2),y=b[0],h=b[1],v=ht(Object(r.useState)([]),2),g=v[0],O=v[1],w=Object(r.useRef)(null),E=function(){return(!!g.length||p)&&o.a.createElement("span",{className:"red absolute",style:{top:"-20px"}},g[0]||p)||null};return o.a.createElement("div",{className:"relative flex",style:bt({},a)},o.a.createElement(E,null),o.a.createElement("input",pt({style:bt({transition:"padding 200ms linear 200ms",borderTopRightRadius:0,borderBottomRightRadius:0,border:p||null!=g&&g.length?"solid 1px #d8070e":""},f),className:c()(s,"pl-sm","pr-sm","font--subhead","font-xxs","h-md","light","brad-2","b","form-input-valid","bg-white","gray-darkest","flex-grow-1","ma-0","border-box",{"pt-sm":y||i}),value:i,onChange:function(e){var t;l&&l(e),null==w||null===(t=w.current)||void 0===t||t.setCustomValidity("")},onFocus:function(){return h(!0)},onBlur:function(){h(!1),Array.isArray(u)&&O(u.map(function(e){var t,n=e(i);return null==w||null===(t=w.current)||void 0===t||t.setCustomValidity(n||""),n}).filter(function(e){return e}))},id:t,ref:w},m)),o.a.createElement("label",{htmlFor:t,className:"absolute",style:{transition:"all 200ms ease-in-out 0s",transform:i||y?"scale(0.7) translate3D(25px, -130%, 0)":"translate3D(16px, -50%, 0)",transformOrigin:"top left",top:"50%",color:"#5a5a5a"}},n),d)}var wt=function(e){if(!(null!=e&&e.trim()&&/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)||!e))return"Invalid email address"};function Et(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 St(e){for(var t=1;te.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);n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=Ht(Object(r.useState)(!1),2),a=o[0],i=o[1],c="procCompleted";var l=!1;function s(r,o){console.info("Opt - NAME/VALUE: ".concat(o,"/").concat(r," - ended? ").concat(l));var a=window.dataLayer&&window.dataLayer.filter(function(e){return e["optimize.".concat(t,".").concat(o,".").concat(r,".complete")]})[0]||!1;if(!l&&e.includes(o)&&(a||"timeout"===r)){if(n(window["".concat(o).concat(r,"_").concat(t,"Cfg")]||{}),i(!0),"timeout"!==r){var s={optExpActive:"".concat(t,"|").concat(o,".").concat(r)};window&&window.dataLayer&&window.dataLayer.push(s)}l=!0;try{performance.mark(c),performance.measure(c,void 0,c),window.BOOMR.sendTimer(c,performance.getEntriesByName(c)[0].duration)}catch(e){}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;e.forEach(function(e){var n,r=void 0!==(null===(n=window.google_optimize)||void 0===n?void 0:n.get(e));t=r?t:0}),u(),setTimeout(function(){e.forEach(function(e){s("timeout",e)})},t)}else i(!0)},[e]),{isOptimize:e.length>0,isExperimentComplete:a}};function Gt(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,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yt(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 Yt(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 Yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&(i(!1),l())};return Object(r.useEffect)(function(){var e;return t&&c?(window.postMessage("CloseRegwall","*"),i(!1)):c&&!n?(i(!0),window.addEventListener("message",s,!1),!(e=document.getElementById("slug_fixedBottom"))||e&&e.offsetHeight<=0?(i(!1),l()):e&&e.offsetHeight>0&&setTimeout(function(){e=document.getElementById("slug_fixedBottom");var t=window.googletag||{};Array.isArray(t.cmd)&&0===t.cmd.length&&(!e||e.childElementCount<=0)&&(i(!1),l())},2e3)):i(!1),function(){l()}},[]),a};function Jt(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,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $t(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 $t(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 $t(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]:"both",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:70,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],c=Jt(Object(r.useState)({scrollUp:!1,scrollDown:!1}),2),l=c[0],s=c[1],u=function(){t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(function(){e||(e=window.pageYOffset||document.documentElement.scrollTop);var t=window.pageYOffset||document.documentElement.scrollTop,r=t>e+a;te.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